Naoki Sakamoto created CLOUDSTACK-4202:
------------------------------------------
Summary: [IPv4][dnsmasq] VM not able get ip from dhcp which is
previously assigned to vm
Key: CLOUDSTACK-4202
URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4202
Project: CloudStack
Issue Type: Bug
Security Level: Public (Anyone can view this level - this is the default.)
Components: Network Devices
Affects Versions: 4.2.0
Environment: CentOS 6.3 64bit for KVM Host.
Reporter: Naoki Sakamoto
Fix For: 4.2.0
Related :
CLOUDSTACK-3533 [IPv6][dnsmasq] VM not able get ip from dhcp which is
previously assigned to vm
IPv4 has same issue.
1. Create VPC (Super CIDR = 10.0.0.0/16)
2. Create Tier (CIDR = 10.0.0.0/30, GW = 10.0.0.1, Netmask = 255.255.255.252)
3. Deploy VM01 (IP = 10.0.0.2)
4. Destroy VM01
5. Deploy VM02 (IP = 10.0.0.2)
VM02 Guest OS is not getting IP Address.
I confirmed in bigger range Tier (CIDR = 10.0.0.0/27, Netmask =
255.255.255.224) about 30 VMs and same issue occurred.
New VM can't get IP that is exhousted and released.
On Virtual Router
/var/log/dnsmasq.log
Aug 8 08:53:16 dnsmasq[13590]: read /etc/hosts - 6 addresses
Aug 8 08:53:16 dnsmasq-dhcp[13590]: read /etc/dhcphosts.txt
Aug 8 08:53:16 dnsmasq-dhcp[13590]: read /etc/dhcpopts.txt
Aug 8 08:54:27 dnsmasq-dhcp[13590]: not using configured address 10.0.0.2
because it is leased to 02:00:68:25:00:07
Aug 8 08:54:27 dnsmasq-dhcp[13590]: DHCPDISCOVER(eth2) 10.0.2.15
02:00:5d:19:00:09 no address available
Aug 8 08:54:31 dnsmasq-dhcp[13590]: not using configured address 10.0.0.2
because it is leased to 02:00:68:25:00:07
Aug 8 08:54:31 dnsmasq-dhcp[13590]: DHCPDISCOVER(eth2) 10.0.2.15
02:00:5d:19:00:09 no address available
Aug 8 08:54:41 dnsmasq-dhcp[13590]: not using configured address 10.0.0.2
because it is leased to 02:00:68:25:00:07
Aug 8 08:54:41 dnsmasq-dhcp[13590]: DHCPDISCOVER(eth2) 10.0.2.15
02:00:5d:19:00:09 no address available
Aug 8 08:55:02 dnsmasq-dhcp[13590]: not using configured address 10.0.0.2
because it is leased to 02:00:68:25:00:07
Aug 8 08:55:02 dnsmasq-dhcp[13590]: DHCPDISCOVER(eth2) 10.0.2.15
02:00:5d:19:00:09 no address available
Aug 8 08:55:21 dnsmasq-dhcp[13590]: not using configured address 10.0.0.2
because it is leased to 02:00:68:25:00:07
Aug 8 08:55:21 dnsmasq-dhcp[13590]: DHCPDISCOVER(eth2) 10.0.2.15
02:00:5d:19:00:09 no address available
02:00:68:25:00:07 is VM01's Mac Address.
On Virtual Router
/var/log/messages
(on issue time)
Aug 8 08:53:01 r-11-VM cloud: Password server failed with error code 1.
Restarting socat...
Aug 8 08:53:04 r-11-VM cloud: Password server failed with error code 1.
Restarting socat...
Aug 8 08:53:07 r-11-VM cloud: Password server failed with error code 1.
Restarting socat...
Aug 8 08:53:10 r-11-VM cloud: Password server failed with error code 1.
Restarting socat...
Aug 8 08:53:13 r-11-VM cloud: Password server failed with error code 1.
Restarting socat...
Aug 8 08:53:16 r-11-VM cloud: edithosts: releasing 10.0.0.2
Aug 8 08:53:16 r-11-VM cloud: edithosts: released 10.0.0.2
Aug 8 08:53:16 r-11-VM cloud: edithosts: update 02:00:5d:19:00:09 10.0.0.2
sakamoto035 to hosts
Aug 8 08:53:16 r-11-VM cloud: Password server failed with error code 1.
Restarting socat...
Aug 8 08:53:19 r-11-VM cloud: Password server failed with error code 1.
Restarting socat...
Aug 8 08:53:22 r-11-VM cloud: Password server failed with error code 1.
Restarting socat...
Aug 8 08:53:25 r-11-VM cloud: Password server failed with error code 1.
Restarting socat...
Aug 8 08:53:28 r-11-VM cloud: Password server failed with error code 1.
Restarting socat...
I found "edithosts: releasing 10.0.0.2" and "edithosts: released 10.0.0.2".
Then I think no_dhcp_release = 0 in "edithosts.sh" at that time.
I used latest edithosts.sh.
I could recover as following.
1. On Virtual Router
# service dnsmasq restart
2. Restart VM02 by GUI.
VM02 got IP Address 10.0.0.2.
System template version :
root@r-11-VM:~# sh /opt/cloud/bin/get_template_version.sh
Cloudstack Release 4.2.0 Thu Jun 13 04:15:09 UTC
2013&51faf0c40beaa004fda92a7cabce6094
root@r-11-VM:~#
dhcp_release version :
root@r-11-VM:~# which dhcp_release
/usr/bin/dhcp_release
root@r-11-VM:~#
root@r-11-VM:~# ls -lrth /usr/bin/dhcp_release
-rwxr-xr-x 1 root root 9.5K Feb 13 02:56 /usr/bin/dhcp_release
root@r-11-VM:~#
root@r-11-VM:~# md5sum /usr/bin/dhcp_release
5d68314ce7084a2036e8d2d204e764cb /usr/bin/dhcp_release
root@r-11-VM:~#
Please help me, Marcus Sorensen.
I will have summer vacations next week named OBON in Japan.
I will be able to reply after vacation.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira