[rhos-list] dnsmasq cannot start properly
Shixiong Shang (shshang)
shshang at cisco.com
Mon Feb 18 04:48:05 UTC 2013
Hi, guys:
I am using dnsmasq as DHCP server to assign IP address to VMs. The "dnsmasq" process seemed to start ok.
nobody 2919 1 0 23:16 ? 00:00:00 /usr/sbin/dnsmasq --strict-order --bind-interfaces --local=// --domain-needed --pid-file=/var/run/libvirt/network/default.pid --conf-file= --except-interface lo --listen-address 192.168.122.1 --dhcp-range 192.168.122.2,192.168.122.254 --dhcp-leasefile=/var/lib/libvirt/dnsmasq/default.leases --dhcp-lease-max=253 --dhcp-no-override --dhcp-hostsfile=/var/lib/libvirt/dnsmasq/default.hostsfile --addn-hosts=/var/lib/libvirt/dnsmasq/default.addnhosts
However, I noticed that, all three config files referred by dnsmasq process were all empty. Based on dhcp_agent.ini file, dnsmasq should go to /var/lib/quantum for config files….Why did they load files from /var/lib/libvirt/dnsmasq?
[root at as-net1 bin]# cd /var/lib/libvirt/dnsmasq/
[root at as-net1 dnsmasq]# ls -lh
total 0
-rw-r--r--. 1 root root 0 Feb 17 23:14 default.addnhosts
-rw-r--r--. 1 root root 0 Feb 17 23:14 default.hostsfile
-rw-r--r--. 1 root root 0 Feb 4 10:03 default.leases
In addition, system log threw the following error message at the time when I restarted dhcp agent:
Feb 17 23:37:19 as-net1 kernel: type=1400 audit(1361162239.626:560): avc: denied { read } for pid=13252 comm="dnsmasq" name="sh" dev=dm-0 ino=1572867 scontext=system_u:system_r:dnsmasq_t:s0 tcontext=system_u:object_r:bin_t:s0 tclass=lnk_file
Feb 17 23:37:19 as-net1 dnsmasq[13251]: cannot run lease-init script /usr/bin/quantum-dhcp-agent-dnsmasq-lease-update: No such file or directory
Feb 17 23:37:19 as-net1 dnsmasq[13251]: FAILED to start up
Feb 17 23:37:22 as-net1 dnsmasq[13297]: cannot run lease-init script /usr/bin/quantum-dhcp-agent-dnsmasq-lease-update: No such file or directory
Feb 17 23:37:22 as-net1 dnsmasq[13297]: FAILED to start up
When I tried to execute the script manually, it gave me this traceback…..
[dmd at as-net1 bin]$ /usr/bin/quantum-dhcp-agent-dnsmasq-lease-update
Traceback (most recent call last):
File "/usr/bin/quantum-dhcp-agent-dnsmasq-lease-update", line 20, in <module>
dhcp.Dnsmasq.lease_update()
File "/usr/lib/python2.6/site-packages/quantum/agent/linux/dhcp.py", line 341, in lease_update
action = sys.argv[1]
IndexError: list index out of range
Would you please shed some light here? Thank you!
Shixiong
[cid:image001.png at 01CE0A3A.4C739FF0]
Shixiong Shang
Solution Architect
WWSP Digital Media Solution Architect
Cisco Services
CCIE R&S - #17235
shshang at cisco.com<mailto:shshang at cisco.com>
Phone: +1 919 392 5192
Mobile: +1 919 272 1358
Cisco Systems, Inc.
7200-4 Kit Creek Road
RTP, NC 27709-4987
United States
Cisco.com<http://www.cisco.com/>
!--- Stay Hungry Stay Foolish ---!
This email may contain confidential and privileged material for the sole use of the intended recipient. Any review, use, distribution or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive for the recipient), please contact the sender by reply email and delete all copies of this message.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/rhos-list/attachments/20130218/1955e189/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 9461 bytes
Desc: image001.png
URL: <http://listman.redhat.com/archives/rhos-list/attachments/20130218/1955e189/attachment.png>
More information about the rhos-list
mailing list