[Users] questions about vdsm supervdsmserver

Yaniv Bronheim ybronhei at redhat.com
Thu May 2 08:07:52 UTC 2013


Hey,

Thanks for the review bigclouds.
For next time, it is much easier and better to write your comments on the gerrit page itself. Just make a user and you can start contributing by reviewing patches :)

For your comments:
1. respawn is a bash script that takes care of restarting supervdsmServer.py. supervdsmd.init executes the process using respawn (you can see the command line by 'ps aux | grep supervdsmServer'), respawn executes the same command automatically when the pid is killed (check respawn code for more details). 

2. you're right. Thanks for notice, I'll either move the deletion to be at each start of the process or take your suggestion. I'll upload new version today, continue to follow.

Regards,
Yaniv Bronhaim

----- Original Message -----
> From: "bigclouds" <bigclouds at 163.com>
> To: "Yaniv Bronheim" <ybronhei at redhat.com>
> Cc: users at ovirt.org, vdsm-devel at fedorahosted.org
> Sent: Thursday, May 2, 2013 6:23:33 AM
> Subject: Re:Re: [Users] questions about vdsm supervdsmserver
> 
> 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 at 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 at 163.com>
> >> To: users at 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 at ovirt.org
> >> http://lists.ovirt.org/mailman/listinfo/users
> >> 
> 



More information about the Users mailing list