[Users] questions about vdsm supervdsmserver

Yaniv Bronheim ybronhei at redhat.com
Sun Apr 28 08:55:04 UTC 2013


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