<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
Hi, guys:
<div><br>
</div>
<div>I am using dnsmasq as DHCP server to assign IP address to VMs. The "dnsmasq" process seemed to start ok.</div>
<div><br>
</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>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</div>
<div><br>
</div>
<div>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?</div>
<div><br>
</div>
<div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>[root@as-net1 bin]# cd /var/lib/libvirt/dnsmasq/</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>[root@as-net1 dnsmasq]# ls -lh</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>total 0</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>-rw-r--r--. 1 root root 0 Feb 17 23:14 default.addnhosts</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>-rw-r--r--. 1 root root 0 Feb 17 23:14 default.hostsfile</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>-rw-r--r--. 1 root root 0 Feb  4 10:03 default.leases</div>
<div><br>
</div>
</div>
<div><br>
</div>
<div>In addition, system log threw the following error message at the time when I restarted dhcp agent:</div>
<div><br>
</div>
<div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>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</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>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</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>Feb 17 23:37:19 as-net1 dnsmasq[13251]: FAILED to start up</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>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</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>Feb 17 23:37:22 as-net1 dnsmasq[13297]: FAILED to start up</div>
<div><br>
</div>
<div>When I tried to execute the script manually, it gave me this traceback…..</div>
<div><br>
</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>[dmd@as-net1 bin]$ /usr/bin/quantum-dhcp-agent-dnsmasq-lease-update</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>Traceback (most recent call last):</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>  File "/usr/bin/quantum-dhcp-agent-dnsmasq-lease-update", line 20, in <module></div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>    dhcp.Dnsmasq.lease_update()</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>  File "/usr/lib/python2.6/site-packages/quantum/agent/linux/dhcp.py", line 341, in lease_update</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>    action = sys.argv[1]</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>IndexError: list index out of range</div>
<div><br>
</div>
<div>Would you please shed some light here? Thank you!</div>
<div><br>
</div>
<div>Shixiong</div>
<div><br>
</div>
<div><br>
</div>
<div apple-content-edited="true">
<div>
<div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" width="543" style="width: 407.25pt; ">
<tbody>
<tr>
<td style="padding: 0in; "></td>
</tr>
</tbody>
</table>
</div>
<div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; ">
<span style="font-size: 13.5pt; font-family: Calibri, sans-serif; "><br class="Apple-interchange-newline">
<span><img height="76" width="116" id="25c7ba7d-93f4-4dd6-921f-f9226b71c6fc" apple-width="yes" apple-height="yes" src="cid:image001.png@01CE0A3A.4C739FF0"></span>
<div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; ">
<span class="xapple-style-span"><span style="font-family: Helvetica, sans-serif; "><br class="Apple-interchange-newline">
 </span></span></div>
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" width="543" style="width: 407.25pt; ">
<tbody>
<tr>
<td style="padding: 0in; "></td>
</tr>
</tbody>
</table>
<p class="MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; ">
<span class="xapple-style-span"></span></p>
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" width="543" style="width: 407.25pt; ">
<tbody>
<tr>
<td nowrap="" valign="top" style="padding: 0in 0in 11.25pt 0.25in; ">
<p class="xmsonormal" style="margin-right: 0in; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; margin-bottom: 12pt; ">
<b><span style="font-size: 9pt; font-family: Arial, sans-serif; color: rgb(102, 102, 102); ">Shixiong Shang</span></b><span style="font-size: 9pt; font-family: Arial, sans-serif; color: rgb(102, 102, 102); "><br>
<b>Solution Architect</b><br>
<b>WWSP Digital Media Solution Architect</b><br>
<b>Cisco Services</b></span><span style="font-size: 11pt; font-family: Calibri, sans-serif; "><o:p></o:p></span></p>
<p class="xmsonormal" style="margin-right: 0in; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; margin-bottom: 12pt; ">
<b><span style="font-size: 9pt; font-family: Arial, sans-serif; color: rgb(102, 102, 102); ">CCIE R&S - #17235</span></b><span style="font-size: 11pt; font-family: Calibri, sans-serif; "><o:p></o:p></span></p>
<p class="xmsonormal" style="margin-right: 0in; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; margin-bottom: 12pt; ">
<b><span style="font-size: 9pt; font-family: Arial, sans-serif; color: rgb(102, 102, 102); "><a href="mailto:shshang@cisco.com" style="color: purple; "><span style="color: rgb(102, 102, 102); ">shshang@cisco.com</span></a><br>
Phone: +1 919 392 5192<br>
Mobile: +1 919 272 1358</span></b><span style="font-size: 11pt; font-family: Calibri, sans-serif; "><o:p></o:p></span></p>
</td>
<td nowrap="" valign="top" style="padding: 0in 0in 7.5pt 15pt; ">
<p class="xmsonormal" style="margin-right: 0in; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; margin-bottom: 12pt; ">
<b><span style="font-size: 9pt; font-family: Arial, sans-serif; color: rgb(102, 102, 102); ">Cisco Systems, Inc.<br>
7200-4 Kit Creek Road<br>
RTP, NC 27709-4987 <br>
United States<br>
<a href="http://www.cisco.com/" style="color: purple; "><span style="color: rgb(102, 102, 102); ">Cisco.com</span></a></span></b><span style="font-size: 11pt; font-family: Calibri, sans-serif; "><o:p></o:p></span></p>
</td>
<td width="179" style="width: 134.15pt; padding: 0in; ">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; ">
<span style="font-size: 9pt; color: rgb(54, 95, 145); "> </span><span style="font-size: 11pt; font-family: Calibri, sans-serif; "><o:p></o:p></span></div>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; ">
<span class="xapple-style-span"></span></p>
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" width="400" style="width: 300pt; ">
<tbody>
<tr>
<td style="padding: 0in 0.25in; ">
<div>
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; ">
<b><span style="font-size: 9pt; font-family: Arial, sans-serif; color: rgb(102, 102, 102); ">!--- Stay Hungry Stay Foolish ---!</span></b><span style="font-size: 11pt; font-family: Calibri, sans-serif; "><o:p></o:p></span></div>
</div>
<div>
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; ">
<span style="font-size: 9pt; font-family: Arial, sans-serif; color: rgb(0, 153, 0); "><br>
</span><span style="font-size: 9pt; font-family: Arial, sans-serif; color: rgb(153, 153, 153); "><br>
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.</span></div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">
<br>
</div>
<br class="Apple-interchange-newline">
</span></div>
</div>
</div>
</div>
<br>
</div>
</body>
</html>