<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 26 Jul 2016, at 08:02, lifuqiong &lt;<a href="mailto:lifuqiong@cncloudsec.com" class="">lifuqiong@cncloudsec.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="WordSection1" style="page: WordSection1; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 宋体;" class=""><span lang="EN-US" style="font-size: 10.5pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""><o:p class="">&nbsp;</o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 宋体;" class=""><span lang="EN-US" style="font-size: 10.5pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class="">I do make a mistake because I just print os.getuid() show the user root; but os.geteuid() show the current user is still vdsm;<o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 宋体;" class=""><span lang="EN-US" style="font-size: 10.5pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""><o:p class="">&nbsp;</o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 宋体;" class=""><span lang="EN-US" style="font-size: 10.5pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class="">Anyway , I still don’t know how to debug vdsm, I cann’t log in to centos with user VDSM, because I don’t know the passwd of user vdsm and if I changed the password, the service vdsmd will cann’t start.</span></div></div></div></blockquote><div><br class=""></div>the vdsm account is intentionally disabled for interactive login</div><div><br class=""><blockquote type="cite" class=""><div class=""><div class="WordSection1" style="page: WordSection1; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 宋体;" class=""><span lang="EN-US" style="font-size: 10.5pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""><o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 宋体;" class=""><span lang="EN-US" style="font-size: 10.5pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""><o:p class="">&nbsp;</o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 宋体;" class=""><span lang="EN-US" style="font-size: 10.5pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class="">You told me “</span><span lang="EN-US" class="">should follow the devel setup wiki</span><span lang="EN-US" style="font-size: 10.5pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class="">” , what’s the true link of vdsm devel setup wiki ?&nbsp; I can’t get useful information in<span class="Apple-converted-space">&nbsp;</span><a href="http://ovirt.org/" style="color: purple; text-decoration: underline;" class="">ovirt.org</a><span class="Apple-converted-space">&nbsp;</span>or google.</span></div></div></div></blockquote><div><br class=""></div><a href="http://www.ovirt.org/develop/developer-guide/vdsm/developers/" class="">http://www.ovirt.org/develop/developer-guide/vdsm/developers/</a>&nbsp;has tips how to build from source and what packages are needed</div><div>Anything specific you’re troubleshooting?</div><div><br class=""></div><div>Thanks,</div><div>michal</div><div><br class=""><blockquote type="cite" class=""><div class=""><div class="WordSection1" style="page: WordSection1; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 宋体;" class=""><span lang="EN-US" style="font-size: 10.5pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""><o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 宋体;" class=""><span lang="EN-US" style="font-size: 10.5pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""><o:p class="">&nbsp;</o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 宋体;" class=""><span lang="EN-US" style="font-size: 10.5pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""><o:p class="">&nbsp;</o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 宋体;" class=""><span lang="EN-US" style="font-size: 10.5pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class="">Thank you<o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 宋体;" class=""><span lang="EN-US" style="font-size: 10.5pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""><o:p class="">&nbsp;</o:p></span></div><div class=""><div style="border-style: solid none none; border-top-color: rgb(181, 196, 223); border-top-width: 1pt; padding: 3pt 0cm 0cm;" class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 宋体;" class=""><b class=""><span style="font-size: 10pt;" class="">发件人<span lang="EN-US" class="">:</span></span></b><span lang="EN-US" style="font-size: 10pt;" class=""><span class="Apple-converted-space">&nbsp;</span>Michal Skrivanek [<a href="mailto:mskrivan@redhat.com" class="">mailto:mskrivan@redhat.com</a>]<span class="Apple-converted-space">&nbsp;</span><br class=""></span><b class=""><span style="font-size: 10pt;" class="">发送时间<span lang="EN-US" class="">:</span></span></b><span lang="EN-US" style="font-size: 10pt;" class=""><span class="Apple-converted-space">&nbsp;</span>2016</span><span style="font-size: 10pt;" class="">年<span lang="EN-US" class="">7</span>月<span lang="EN-US" class="">26</span>日<span lang="EN-US" class=""><span class="Apple-converted-space">&nbsp;</span>5:00<br class=""></span><b class="">收件人<span lang="EN-US" class="">:</span></b><span lang="EN-US" class=""><span class="Apple-converted-space">&nbsp;</span>lifuqiong<br class=""></span><b class="">抄送<span lang="EN-US" class="">:</span></b><span lang="EN-US" class=""><span class="Apple-converted-space">&nbsp;</span>users; devel<br class=""></span><b class="">主题<span lang="EN-US" class="">:</span></b><span lang="EN-US" class=""><span class="Apple-converted-space">&nbsp;</span>Re: [ovirt-devel] Debug vdsm 4.0.0 report error: libvirt: XML-RPC error : Failed to connect socket to '/var/run/libvirt/libvirt-sock': Permission denied<o:p class=""></o:p></span></span></div></div></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 宋体;" class=""><span lang="EN-US" class=""><o:p class="">&nbsp;</o:p></span></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 宋体;" class=""><span lang="EN-US" class=""><o:p class="">&nbsp;</o:p></span></div></div><div class=""><p class="MsoNormal" style="margin: 0cm 0cm 12pt; font-size: 12pt; font-family: 宋体;"><span lang="EN-US" class=""><br class="">On 25 Jul 2016, at 21:50, Sandro Bonazzola &lt;<a href="mailto:sbonazzo@redhat.com" style="color: purple; text-decoration: underline;" class="">sbonazzo@redhat.com</a>&gt; wrote:<o:p class=""></o:p></span></p></div><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div class=""><p style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 宋体;" class=""><span lang="EN-US" class="">Adding some people from virt team.<o:p class=""></o:p></span></p><p style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 宋体;" class=""><span lang="EN-US" class="">Il 23/Lug/2016 11:44, "lifuqiong" &lt;<a href="mailto:lifuqiong@cncloudsec.com" style="color: purple; text-decoration: underline;" class="">lifuqiong@cncloudsec.com</a>&gt; ha scritto:<br class="">&gt;<br class="">&gt; I debugged vdsm with PyCharm, And I logged on my Centos 7.2 with root, &nbsp;and get an error as follows:<br class="">&gt;<br class="">&gt; &nbsp;<br class="">&gt;<br class="">&gt; Problem:<br class="">&gt;<br class="">&gt; &nbsp;<br class="">&gt;<br class="">&gt; Traceback (most recent call last):<br class="">&gt;<br class="">&gt; &nbsp; File "/usr/share/vdsm/vdsm", line 149, in run<br class="">&gt;<br class="">&gt; &nbsp;&nbsp;&nbsp; serve_clients(log)<br class="">&gt;<br class="">&gt; &nbsp; File "/usr/share/vdsm/vdsm", line 104, in serve_clients<br class="">&gt;<br class="">&gt; &nbsp;&nbsp;&nbsp; cif = clientIF.getInstance(irs, log, scheduler)<br class="">&gt;<br class="">&gt; &nbsp; File "/usr/share/vdsm/clientIF.py", line 204, in getInstance<br class="">&gt;<br class="">&gt; &nbsp;&nbsp;&nbsp; cls._instance = clientIF(irs, log, scheduler)<br class="">&gt;<br class="">&gt; &nbsp; File "/usr/share/vdsm/clientIF.py", line 106, in __init__<br class="">&gt;<br class="">&gt; &nbsp;&nbsp;&nbsp; secret.clear()<br class="">&gt;<br class="">&gt; &nbsp; File "/usr/lib/python2.7/site-packages/vdsm/virt/secret.py", line 92, in clear<br class="">&gt;<br class="">&gt; &nbsp;&nbsp;&nbsp; con = libvirtconnection.get()<br class="">&gt;<br class="">&gt; &nbsp; File "/usr/lib/python2.7/site-packages/vdsm/libvirtconnection.py", line 163, in get<br class="">&gt;<br class="">&gt; &nbsp;&nbsp;&nbsp; password)<br class="">&gt;<br class="">&gt; &nbsp; File "/usr/lib/python2.7/site-packages/vdsm/libvirtconnection.py", line 99, in open_connection<br class="">&gt;<br class="">&gt; &nbsp;&nbsp;&nbsp; return utils.retry(libvirtOpen, timeout=10, sleep=0.2)<br class="">&gt;<br class="">&gt; &nbsp; File "/usr/lib/python2.7/site-packages/vdsm/utils.py", line 546, in retry<br class="">&gt;<br class="">&gt; &nbsp;&nbsp;&nbsp; return func()<br class="">&gt;<br class="">&gt; &nbsp; File "/usr/lib64/python2.7/site-packages/libvirt.py", line 105, in openAuth<br class="">&gt;<br class="">&gt; &nbsp;&nbsp;&nbsp; if ret is None:raise libvirtError('virConnectOpenAuth() failed')<br class="">&gt;<br class="">&gt; libvirtError: Failed to connect socket to '/var/run/libvirt/libvirt-sock': Permission denied<br class="">&gt;<br class="">&gt; &nbsp;<br class="">&gt;<br class="">&gt; Investitate:<br class="">&gt;<br class="">&gt; According to the traceback above, the code in libvirt.py as below, and &nbsp;os.geteuid() get ‘0’ which shows the current user is root;<o:p class=""></o:p></span></p></div></blockquote><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 宋体;" class=""><span lang="EN-US" class=""><o:p class="">&nbsp;</o:p></span></div></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 宋体;" class=""><span lang="EN-US" class="">vdsm is not supposed to be run under root user. For debugging you should follow the devel setup wiki and not change a regular host.&nbsp;<o:p class=""></o:p></span></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 宋体;" class=""><span lang="EN-US" class="">Depends what you modified, it's impossible to say from what you described....but a general advice is you simply don't do that:)<br class=""><br class=""><o:p class=""></o:p></span></div><div class=""><p style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 宋体;" class=""><span lang="EN-US" class="">&gt;<br class="">&gt; &nbsp;<br class="">&gt;<br class="">&gt; def openAuth(uri, auth, flags=0):<br class="">&gt;<br class="">&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #print os.geteuid()<br class="">&gt;<br class="">&gt; &nbsp;&nbsp;&nbsp; ret = libvirtmod.virConnectOpenAuth(uri, auth, flags)<br class="">&gt;<br class="">&gt; &nbsp;&nbsp;&nbsp; if ret is None:raise libvirtError('virConnectOpenAuth() failed')<br class="">&gt;<br class="">&gt; return virConnect(_obj=ret)<br class="">&gt;<br class="">&gt; &nbsp;<br class="">&gt;<br class="">&gt; [root@server117 libvirt]# ll /var/run/libvirt/libvirt-sock<br class="">&gt;<br class="">&gt; srwxrwx---. 1 root qemu 0 Jul 19 23:43 /var/run/libvirt/libvirt-sock<br class="">&gt;<br class="">&gt; &nbsp;<br class="">&gt;<br class="">&gt; According that, root should not get an Permission denied error ? But why?<br class="">&gt;<br class="">&gt; &nbsp;<br class="">&gt;<br class="">&gt; And I setenforce=0 , and still show Perssion denied error.<br class="">&gt;<br class="">&gt; &nbsp;<br class="">&gt;<br class="">&gt; What’s the reason? And how to solve it?<br class="">&gt;<br class="">&gt; &nbsp;<br class="">&gt;<br class="">&gt; Thank you.<br class="">&gt;<br class="">&gt;<br class="">&gt; _______________________________________________<br class="">&gt; Devel mailing list<br class="">&gt;<span class="Apple-converted-space">&nbsp;</span><a href="mailto:Devel@ovirt.org" style="color: purple; text-decoration: underline;" class="">Devel@ovirt.org</a><br class="">&gt;<span class="Apple-converted-space">&nbsp;</span><a href="http://lists.ovirt.org/mailman/listinfo/devel" style="color: purple; text-decoration: underline;" class="">http://lists.ovirt.org/mailman/listinfo/devel</a></span></p></div></div></div></div></blockquote></div><br class=""></body></html>