------=_Part_152998_1393841865.1367465013497
Content-Type: text/plain; charset=GBK
Content-Transfer-Encoding: 7bit
hi, Yaniv Bronheim:
i have read your new code of supervdsmserver, i think it is fine,please let us confirm two
questions
1.supervdsm.py will kill serive when relanuch, who respond to start service again?
i suggest "let supervdsmd.init take care of its start and stop" is a normal
way
2.line 398 in supervdsmServer.py.i suggest to give double checks on processID. like
this:
finally:
if (os.getpid() == pid in PIDFILE):
if os.path.exists(address):
utils.rmFile(address)
else:
error,another supervdsmServer.py is alive.
thanks
At 2013-04-28 16:55:04,"Yaniv Bronheim" <ybronhei(a)redhat.com> wrote:
Hey bigclouds,
Supervdsm allows vdsm to run root commands, like mount, dmidecode, lsblk, scan folders
that are unprivileged for vdsm user, and more. Due to this method we avoid executing root
commands using execv with sudo, that way we don't create subprocess for each
operation.
We have to have supervdsm as external deamon, as it runs as different user (root, vdsm
runs as user vdsm). Supervdsm deamon doesn't related to libvirt or uses libvirt at
all, most of supervdsm functionality is used by vdsm in different flows. you can check
supervdsm API in supervdsmServer.py and see where we call it.
We need to have only one instance of supervdsm with a socket file under /var/run/vdsm/ ,
supervdsm creates this file and vdsm communicate with it.
Due to your netstat output, most of the time you should have 2 or 3 entries
unix 2 [ ACC ] STREAM LISTENING 18895145 /var/run/vdsm/svdsm.sock
unix 2 [ ] STREAM CONNECTED 18895172 /var/run/vdsm/svdsm.sock
unix 3 [ ] STREAM CONNECTED 18895158 /var/run/vdsm/svdsm.sock
(multiprocessing package implementation, you can check there)
might be that other subprocesses or subthreads also hold a request to svdsm.sock at the
time you checked,
I don't understand the reason for /var/run/mcvda folder at all.. maybe you changed
something in the configuration? is it always appear? what else do you have under this
folder?
Normal run shouldn't have more entries as far as I checked.
In addition, I'm working on making supervdsm external service, you can take a look and
maybe help me with review :)
[
http://gerrit.ovirt.org/#/c/11051/]
Regards,
Yaniv Bronhaim.
----- Original Message -----
> From: "bigclouds" <bigclouds(a)163.com>
> To: users(a)ovirt.org
> Sent: Friday, April 26, 2013 9:59:47 AM
> Subject: [Users] questions about vdsm supervdsmserver
>
> hi,all.
> i have 2 questions about supervdsmserver,
> 1.why it is created separately as a daemon?
> its many function have never been used, and its function can be done by
> calling libvirt directly, why supervdsmserver is need?
> 2.it seems that only one supervdsmserver should be exist, by killing old ones
> to assure that . but look at this, and please explain to me.
> unix 2 [ ACC ] STREAM LISTENING 1339963 4968/python /var/run/vdsm/svdsm.sock
> unix 2 [ ACC ] STREAM LISTENING 384165 39716/python &nb sp;
> /var/run/vdsm/svdsm.sock
> unix 2 [ ACC ] STREAM LISTENING 1100509 49487/python /var/run/vdsm/svdsm.sock
> unix 2 [ ACC ] STREAM LISTENING 1326232 3813/python /var/run/mcvda/svdsm.sock
> unix 3 [ ] STREAM CONNECTED 1448193 4968/python /var/run/mcvda/svdsm.sock
> unix 3 [ ] STREAM CONNECTED 1447937 4968/python /var /run/mcvda/svdsm.sock
> unix 3 [ ] STREAM CONNECTED 1424959 4968/python /var/run/mcvda/svdsm.sock
> unix 3 [ ] STREAM CONNECTED 1414835 4968/python /var/run/mcvda/svdsm.sock
> unix 3 [ ] STREAM CONNECTED 1327873 3813/python /var/run/mcvda/svdsm.sock
> unix 2 [ ] STREAM CONNECTED 1309612 49487/python & nbsp;
> /var/run/mcvda/svdsm.sock
> unix 3 [ ] STREAM CONNECTED 384221 39716/python /var/run/mcvda/svdsm.sock
> thanks
>
>
>
> _______________________________________________
> Users mailing list
> Users(a)ovirt.org
>
http://lists.ovirt.org/mailman/listinfo/users
>
------=_Part_152998_1393841865.1367465013497
Content-Type: text/html; charset=GBK
Content-Transfer-Encoding: 7bit
<div
style="line-height:1.7;color:#000000;font-size:14px;font-family:arial"><div>hi,
Yaniv Bronheim:</div><div>i have read your new code of supervdsmserver, i
think it is fine,please let us confirm two questions</div><div>1.supervdsm.py
will kill serive when relanuch, who respond to start service again?
</div><div> i suggest "let supervdsmd.init take care of its
start and stop" is a normal way</div><div>2.line 398
in supervdsmServer.py.i suggest to give double checks on
processID. like this:</div><div><span style="font: bold 12px/normal
"Lucida Console", "Lucida Sans Typewriter", Monaco,
monospace; color: rgb(0, 0, 102); text-transform: none; text-indent: 0px; letter-spacing:
normal; word-spacing: 0px; white-space: pre; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;"
class="kwd">finally</span><span style="font: 12px/normal
"Lucida Console", "Lucida Sans Typewriter", Monaco,
monospace; color: rgb(68, 68, 0); text-transform: none; text-indent: 0px; letter-spacing:
normal; word-spacing: 0px; white-space: pre; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;"
class="pun">:</span> </div><div>
if <font face="Lucida Console"><font color="#444400"
size="2">(</font><span style="font: 12px/normal
"Lucida Console", "Lucida Sans Typewriter", Monaco,
monospace; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing:
normal; word-spacing: 0px; white-space: pre; font-size-adjust: none; font-stretch: normal;
-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"
class="pln">os</span><span style="font: 12px/normal
"Lucida Console", "Lucida Sans Typewriter", Monaco,
monospace; color: rgb(68, 68, 0); text-transform: none; text-indent: 0px; letter-spacing:
normal; word-spacing: 0px; white-space: pre; font-size-adjust: none; font-stretch: normal;
-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"
class="pun">.</span><span style="font: 12px/normal
"Lucida Console", "Lucida Sans Typewriter", Monaco,
monospace; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing:
normal; word-spacing: 0px; white-space: pre; font-size-adjust: none; font-stretch: normal;
-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"
class="pln">getpid</span><span style="font: 12px/normal
"Lucida Console", "Lucida Sans Typewriter", Monaco,
monospace; color: rgb(68, 68, 0); text-transform: none; text-indent: 0px; letter-spacing:
normal; word-spacing: 0px; white-space: pre; font-size-adjust: none; font-stretch: normal;
-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"
class="pun">() == pid in <span style="font: 12px/normal
"Lucida Console", "Lucida Sans Typewriter", Monaco,
monospace; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing:
normal; word-spacing: 0px; float: none; display: inline !important; white-space: pre;
font-size-adjust: none; font-stretch: normal; background-color: rgb(153, 255, 153);
-webkit-text-size-adjust: auto; -webkit-text-stroke-width:
0px;">PIDFILE)</span></span><font color="#444400"
size="2">:</font></font></div><div><span
style="font: bold 12px/normal "Lucida Console", "Lucida
Sans Typewriter", Monaco, monospace; color: rgb(0, 0, 102); text-transform: none;
text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: pre;
-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"
class="kwd"> if</span><span style="font:
12px/normal "Lucida Console", "Lucida Sans
Typewriter", Monaco, monospace; color: rgb(0, 0, 0); text-transform: none;
text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: pre;
-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"
class="pln"> os</span><span style="font: 12px/normal
"Lucida Console", "Lucida Sans Typewriter", Monaco,
monospace; color: rgb(68, 68, 0); text-transform: none; text-indent: 0px; letter-spacing:
normal; word-spacing: 0px; white-space: pre; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;" class="pun">.</span><span
style="font: 12px/normal "Lucida Console", "Lucida Sans
Typewriter", Monaco, monospace; color: rgb(0, 0, 0); text-transform: none;
text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: pre;
-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"
class="pln">path</span><span style="font: 12px/normal
"Lucida Console", "Lucida Sans Typewriter", Monaco,
monospace; color: rgb(68, 68, 0); text-transform: none; text-indent: 0px; letter-spacing:
normal; word-spacing: 0px; white-space: pre; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;" class="pun">.</span><span
style="font: 12px/normal "Lucida Console", "Lucida Sans
Typewriter", Monaco, monospace; color: rgb(0, 0, 0); text-transform: none;
text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: pre;
-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"
class="pln">exists</span><span style="font: 12px/normal
"Lucida Console", "Lucida Sans Typewriter", Monaco,
monospace; color: rgb(68, 68, 0); text-transform: none; text-indent: 0px; letter-spacing:
normal; word-spacing: 0px; white-space: pre; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;" class="pun">(</span><span
style="font: 12px/normal "Lucida Console", "Lucida Sans
Typewriter", Monaco, monospace; color: rgb(0, 0, 0); text-transform: none;
text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: pre;
-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"
class="pln">address</span><span style="font: 12px/normal
"Lucida Console", "Lucida Sans Typewriter", Monaco,
monospace; color: rgb(68, 68, 0); text-transform: none; text-indent: 0px; letter-spacing:
normal; word-spacing: 0px; white-space: pre; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;"
class="pun">):</span></div><div><span style="font:
12px/normal "Lucida Console", "Lucida Sans
Typewriter", Monaco, monospace; color: rgb(68, 68, 0); text-transform: none;
text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: pre;
-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"
class="pun"> <span
style="font: 12px/normal "Lucida Console", "Lucida Sans
Typewriter", Monaco, monospace; color: rgb(0, 0, 0); text-transform: none;
text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: pre;
-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"
class="pln"> utils</span><span style="font: 12px/normal
"Lucida Console", "Lucida Sans Typewriter", Monaco,
monospace; color: rgb(68, 68, 0); text-transform: none; text-indent: 0px; letter-spacing:
normal; word-spacing: 0px; white-space: pre; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;" class="pun">.</span><span
style="font: 12px/normal "Lucida Console", "Lucida Sans
Typewriter", Monaco, monospace; color: rgb(0, 0, 0); text-transform: none;
text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: pre;
-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"
class="pln">rmFile</span><span style="font: 12px/normal
"Lucida Console", "Lucida Sans Typewriter", Monaco,
monospace; color: rgb(68, 68, 0); text-transform: none; text-indent: 0px; letter-spacing:
normal; word-spacing: 0px; white-space: pre; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;" class="pun">(</span><span
style="font: 12px/normal "Lucida Console", "Lucida Sans
Typewriter", Monaco, monospace; color: rgb(0, 0, 0); text-transform: none;
text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: pre;
-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"
class="pln">address</span><span style="font: 12px/normal
"Lucida Console", "Lucida Sans Typewriter", Monaco,
monospace; color: rgb(68, 68, 0); text-transform: none; text-indent: 0px; letter-spacing:
normal; word-spacing: 0px; white-space: pre; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;"
class="pun">)</span></span></div><div><span
style="font: 12px/normal "Lucida Console", "Lucida Sans
Typewriter", Monaco, monospace; color: rgb(68, 68, 0); text-transform: none;
text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: pre;
-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"
class="pun"><span style="font: 12px/normal "Lucida
Console", "Lucida Sans Typewriter", Monaco, monospace; color:
rgb(68, 68, 0); text-transform: none; text-indent: 0px; letter-spacing: normal;
word-spacing: 0px; white-space: pre; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;" class="pun">
else:</span></span></div><div><span style="font:
12px/normal "Lucida Console", "Lucida Sans
Typewriter", Monaco, monospace; color: rgb(68, 68, 0); text-transform: none;
text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: pre;
-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"
class="pun"><span style="font: 12px/normal "Lucida
Console", "Lucida Sans Typewriter", Monaco, monospace; color:
rgb(68, 68, 0); text-transform: none; text-indent: 0px; letter-spacing: normal;
word-spacing: 0px; white-space: pre; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;"
class="pun"> error,another
supervdsmServer.py is alive.</span></span></div><div><span
style="font: 12px/normal "Lucida Console", "Lucida Sans
Typewriter", Monaco, monospace; color: rgb(68, 68, 0); text-transform: none;
text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: pre;
-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"
class="pun"><span style="font: 12px/normal "Lucida
Console", "Lucida Sans Typewriter", Monaco, monospace; color:
rgb(68, 68, 0); text-transform: none; text-indent: 0px; letter-spacing: normal;
word-spacing: 0px; white-space: pre; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;"
class="pun"></span></span> </div><div><span
style="font: 12px/normal "Lucida Console", "Lucida Sans
Typewriter", Monaco, monospace; color: rgb(68, 68, 0); text-transform: none;
text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: pre;
-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"
class="pun"><span style="font: 12px/normal "Lucida
Console", "Lucida Sans Typewriter", Monaco, monospace; color:
rgb(68, 68, 0); text-transform: none; text-indent: 0px; letter-spacing: normal;
word-spacing: 0px; white-space: pre; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;"
class="pun">thanks</span></span></div><div><span
style="font: 12px/normal "Lucida Console", "Lucida Sans
Typewriter", Monaco, monospace; color: rgb(68, 68, 0); text-transform: none;
text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: pre;
-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"
class="pun"><span style="font: 12px/normal "Lucida
Console", "Lucida Sans Typewriter", Monaco, monospace; color:
rgb(68, 68, 0); text-transform: none; text-indent: 0px; letter-spacing: normal;
word-spacing: 0px; white-space: pre; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;" class="pun">
</span></span><br><br></div><div></div><div
id="divNeteaseMailCard"></div><div></div><pre><br>At 2013-04-28 16:55:04,"Yaniv Bronheim" <ybronhei@redhat.com> wrote:
>Hey bigclouds,
>Supervdsm allows vdsm to run root commands, like mount, dmidecode, lsblk, scan folders that are unprivileged for vdsm user, and more. Due to this method we avoid executing root commands using execv with sudo, that way we don't create subprocess for each operation.
>
>We have to have supervdsm as external deamon, as it runs as different user (root, vdsm runs as user vdsm). Supervdsm deamon doesn't related to libvirt or uses libvirt at all, most of supervdsm functionality is used by vdsm in different flows. you can check supervdsm API in supervdsmServer.py and see where we call it.
>
>We need to have only one instance of supervdsm with a socket file under /var/run/vdsm/ , supervdsm creates this file and vdsm communicate with it.
>
>Due to your netstat output, most of the time you should have 2 or 3 entries
>unix 2 [ ACC ] STREAM LISTENING 18895145 /var/run/vdsm/svdsm.sock
>unix 2 [ ] STREAM CONNECTED 18895172 /var/run/vdsm/svdsm.sock
>unix 3 [ ] STREAM CONNECTED 18895158 /var/run/vdsm/svdsm.sock
>(multiprocessing package implementation, you can check there)
>might be that other subprocesses or subthreads also hold a request to svdsm.sock at the time you checked,
>I don't understand the reason for /var/run/mcvda folder at all.. maybe you changed something in the configuration? is it always appear? what else do you have under this folder?
>Normal run shouldn't have more entries as far as I checked.
>
>In addition, I'm working on making supervdsm external service, you can take a look and maybe help me with review :)
>[http://gerrit.ovirt.org/#/c/11051/]
>
>Regards,
>Yaniv Bronhaim.
>
>----- Original Message -----
>> From: "bigclouds" <bigclouds@163.com>
>> To: users@ovirt.org
>> Sent: Friday, April 26, 2013 9:59:47 AM
>> Subject: [Users] questions about vdsm supervdsmserver
>>
>> hi,all.
>> i have 2 questions about supervdsmserver,
>> 1.why it is created separately as a daemon?
>> its many function have never been used, and its function can be done by
>> calling libvirt directly, why supervdsmserver is need?
>> 2.it seems that only one supervdsmserver should be exist, by killing old ones
>> to assure that . but look at this, and please explain to me.
>> unix 2 [ ACC ] STREAM LISTENING 1339963 4968/python /var/run/vdsm/svdsm.sock
>> unix 2 [ ACC ] STREAM LISTENING 384165 39716/python &nb sp;
>> /var/run/vdsm/svdsm.sock
>> unix 2 [ ACC ] STREAM LISTENING 1100509 49487/python /var/run/vdsm/svdsm.sock
>> unix 2 [ ACC ] STREAM LISTENING 1326232 3813/python /var/run/mcvda/svdsm.sock
>> unix 3 [ ] STREAM CONNECTED 1448193 4968/python /var/run/mcvda/svdsm.sock
>> unix 3 [ ] STREAM CONNECTED 1447937 4968/python /var /run/mcvda/svdsm.sock
>> unix 3 [ ] STREAM CONNECTED 1424959 4968/python /var/run/mcvda/svdsm.sock
>> unix 3 [ ] STREAM CONNECTED 1414835 4968/python /var/run/mcvda/svdsm.sock
>> unix 3 [ ] STREAM CONNECTED 1327873 3813/python /var/run/mcvda/svdsm.sock
>> unix 2 [ ] STREAM CONNECTED 1309612 49487/python & nbsp;
>> /var/run/mcvda/svdsm.sock
>> unix 3 [ ] STREAM CONNECTED 384221 39716/python /var/run/mcvda/svdsm.sock
>> thanks
>>
>>
>>
>> _______________________________________________
>> Users mailing list
&gt;&gt;&nbsp;Users(a)ovirt.org
>> http://lists.ovirt.org/mailman/listinfo/users
>>
</pre></div><br><br><span
title="neteasefooter"><span
id="netease_mail_footer"></span></span>
------=_Part_152998_1393841865.1367465013497--