When I start a VM, why it has "two" processes related with it?

Asked by Havent

I start sever VMs by Nova+Quantum+Openvswitch environment,
here is result of execute command ps -ef:
# ps -ef | grep dnsmasq
nobody 10008 1 0 Jun15 ? 00:00:13 /usr/sbin/dnsmasq --strict-order --bind-interfaces --conf-file= --domain=novalocal --pid-file=/var/lib/nova/networks/nova-gw-87a6f352-35.pid --listen-address=192.168.151.1 --except-interface=lo --dhcp-range=192.168.151.2,static,120s --dhcp-lease-max=256 --dhcp-hostsfile=/var/lib/nova/networks/nova-gw-87a6f352-35.conf --dhcp-script=/usr/bin/nova-dhcpbridge --leasefile-ro
root 10009 10008 0 Jun15 ? 00:00:05 /usr/sbin/dnsmasq --strict-order --bind-interfaces --conf-file= --domain=novalocal --pid-file=/var/lib/nova/networks/nova-gw-87a6f352-35.pid --listen-address=192.168.151.1 --except-interface=lo --dhcp-range=192.168.151.2,static,120s --dhcp-lease-max=256 --dhcp-hostsfile=/var/lib/nova/networks/nova-gw-87a6f352-35.conf --dhcp-script=/usr/bin/nova-dhcpbridge --leasefile-ro
root 22662 1891 0 15:42 pts/12 00:00:00 grep --color=auto dnsmasq
nobody 27412 1 0 Jun15 ? 00:00:11 /usr/sbin/dnsmasq --strict-order --bind-interfaces --conf-file= --domain=novalocal --pid-file=/var/lib/nova/networks/nova-gw-e7863e30-1c.pid --listen-address=192.168.153.1 --except-interface=lo --dhcp-range=192.168.153.2,static,120s --dhcp-lease-max=256 --dhcp-hostsfile=/var/lib/nova/networks/nova-gw-e7863e30-1c.conf --dhcp-script=/usr/bin/nova-dhcpbridge --leasefile-ro
root 27413 27412 0 Jun15 ? 00:00:01 /usr/sbin/dnsmasq --strict-order --bind-interfaces --conf-file= --domain=novalocal --pid-file=/var/lib/nova/networks/nova-gw-e7863e30-1c.pid --listen-address=192.168.153.1 --except-interface=lo --dhcp-range=192.168.153.2,static,120s --dhcp-lease-max=256 --dhcp-hostsfile=/var/lib/nova/networks/nova-gw-e7863e30-1c.conf --dhcp-script=/usr/bin/nova-dhcpbridge --leasefile-ro
nobody 27825 1 0 Jun15 ? 00:00:12 /usr/sbin/dnsmasq --strict-order --bind-interfaces --conf-file= --domain=novalocal --pid-file=/var/lib/nova/networks/nova-gw-3faffe59-5d.pid --listen-address=192.168.152.1 --except-interface=lo --dhcp-range=192.168.152.2,static,120s --dhcp-lease-max=256 --dhcp-hostsfile=/var/lib/nova/networks/nova-gw-3faffe59-5d.conf --dhcp-script=/usr/bin/nova-dhcpbridge --leasefile-ro
root 27826 27825 0 Jun15 ? 00:00:00 /usr/sbin/dnsmasq --strict-order --bind-interfaces --conf-file= --domain=novalocal --pid-file=/var/lib/nova/networks/nova-gw-3faffe59-5d.pid --listen-address=192.168.152.1 --except-interface=lo --dhcp-range=192.168.152.2,static,120s --dhcp-lease-max=256 --dhcp-hostsfile=/var/lib/nova/networks/nova-gw-3faffe59-5d.conf --dhcp-script=/usr/bin/nova-dhcpbridge --leasefile-ro

for each gw*, it has a process of dnsmasq(i.e. pid=10008) and the other process(i.e.pid=10009 and ppid=10008), why?

Question information

Language:
English Edit question
Status:
Solved
For:
neutron Edit question
Assignee:
No assignee Edit question
Solved by:
dan wendlandt
Solved:
Last query:
Last reply:
Revision history for this message
dan wendlandt (danwent) said :
#1

This is normal. One is the parent process (owned by user 'nobody') and one
is the child (owned by user 'root').

dan

On Mon, Jun 18, 2012 at 1:05 AM, Havent <
<email address hidden>> wrote:

> New question #200751 on quantum:
> https://answers.launchpad.net/quantum/+question/200751
>
> I start sever VMs by Nova+Quantum+Openvswitch environment,
> here is result of execute command ps -ef:
> # ps -ef | grep dnsmasq
> nobody 10008 1 0 Jun15 ? 00:00:13 /usr/sbin/dnsmasq
> --strict-order --bind-interfaces --conf-file= --domain=novalocal
> --pid-file=/var/lib/nova/networks/nova-gw-87a6f352-35.pid
> --listen-address=192.168.151.1 --except-interface=lo
> --dhcp-range=192.168.151.2,static,120s --dhcp-lease-max=256
> --dhcp-hostsfile=/var/lib/nova/networks/nova-gw-87a6f352-35.conf
> --dhcp-script=/usr/bin/nova-dhcpbridge --leasefile-ro
> root 10009 10008 0 Jun15 ? 00:00:05 /usr/sbin/dnsmasq
> --strict-order --bind-interfaces --conf-file= --domain=novalocal
> --pid-file=/var/lib/nova/networks/nova-gw-87a6f352-35.pid
> --listen-address=192.168.151.1 --except-interface=lo
> --dhcp-range=192.168.151.2,static,120s --dhcp-lease-max=256
> --dhcp-hostsfile=/var/lib/nova/networks/nova-gw-87a6f352-35.conf
> --dhcp-script=/usr/bin/nova-dhcpbridge --leasefile-ro
> root 22662 1891 0 15:42 pts/12 00:00:00 grep --color=auto dnsmasq
> nobody 27412 1 0 Jun15 ? 00:00:11 /usr/sbin/dnsmasq
> --strict-order --bind-interfaces --conf-file= --domain=novalocal
> --pid-file=/var/lib/nova/networks/nova-gw-e7863e30-1c.pid
> --listen-address=192.168.153.1 --except-interface=lo
> --dhcp-range=192.168.153.2,static,120s --dhcp-lease-max=256
> --dhcp-hostsfile=/var/lib/nova/networks/nova-gw-e7863e30-1c.conf
> --dhcp-script=/usr/bin/nova-dhcpbridge --leasefile-ro
> root 27413 27412 0 Jun15 ? 00:00:01 /usr/sbin/dnsmasq
> --strict-order --bind-interfaces --conf-file= --domain=novalocal
> --pid-file=/var/lib/nova/networks/nova-gw-e7863e30-1c.pid
> --listen-address=192.168.153.1 --except-interface=lo
> --dhcp-range=192.168.153.2,static,120s --dhcp-lease-max=256
> --dhcp-hostsfile=/var/lib/nova/networks/nova-gw-e7863e30-1c.conf
> --dhcp-script=/usr/bin/nova-dhcpbridge --leasefile-ro
> nobody 27825 1 0 Jun15 ? 00:00:12 /usr/sbin/dnsmasq
> --strict-order --bind-interfaces --conf-file= --domain=novalocal
> --pid-file=/var/lib/nova/networks/nova-gw-3faffe59-5d.pid
> --listen-address=192.168.152.1 --except-interface=lo
> --dhcp-range=192.168.152.2,static,120s --dhcp-lease-max=256
> --dhcp-hostsfile=/var/lib/nova/networks/nova-gw-3faffe59-5d.conf
> --dhcp-script=/usr/bin/nova-dhcpbridge --leasefile-ro
> root 27826 27825 0 Jun15 ? 00:00:00 /usr/sbin/dnsmasq
> --strict-order --bind-interfaces --conf-file= --domain=novalocal
> --pid-file=/var/lib/nova/networks/nova-gw-3faffe59-5d.pid
> --listen-address=192.168.152.1 --except-interface=lo
> --dhcp-range=192.168.152.2,static,120s --dhcp-lease-max=256
> --dhcp-hostsfile=/var/lib/nova/networks/nova-gw-3faffe59-5d.conf
> --dhcp-script=/usr/bin/nova-dhcpbridge --leasefile-ro
>
> for each gw*, it has a process of dnsmasq(i.e. pid=10008) and the other
> process(i.e.pid=10009 and ppid=10008), why?
>
>
>
> --
> You received this question notification because you are an answer
> contact for quantum.
>

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Dan Wendlandt
Nicira, Inc: www.nicira.com
twitter: danwendlandt
~~~~~~~~~~~~~~~~~~~~~~~~~~~

Revision history for this message
Havent (guestly) said :
#2

Thanks Dan!
But furthermore, what is the purpose of doing this? Does this situation only appear in nova or in any cases? When requests of DHCP client for IP address arrive, which process replies them, the parent or the child?

Revision history for this message
Best dan wendlandt (danwent) said :
#3

On Mon, Jun 18, 2012 at 6:05 PM, Havent <
<email address hidden>> wrote:

> Question #200751 on quantum changed:
> https://answers.launchpad.net/quantum/+question/200751
>
> Status: Answered => Open
>
> Havent is still having a problem:
> Thanks Dan!
> But furthermore, what is the purpose of doing this? Does this situation
> only appear in nova or in any cases? When requests of DHCP client for IP
> address arrive, which process replies them, the parent or the child?
>

to be honest, I'm not sure whether this is just an artifact of how rootwrap
works, or if its some kind of intentional active/backup mechanism. Maybe
send an email to the main list, as QuantumManager just uses the same logic
as nova-network.

dan

>
> --
> You received this question notification because you are an answer
> contact for quantum.
>

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Dan Wendlandt
Nicira, Inc: www.nicira.com
twitter: danwendlandt
~~~~~~~~~~~~~~~~~~~~~~~~~~~

Revision history for this message
Havent (guestly) said :
#4

Thanks dan wendlandt, that solved my question.