Bret Mette created CLOUDSTACK-6741:
--------------------------------------

             Summary: VM in shared networking unable to get IP from virtual 
router
                 Key: CLOUDSTACK-6741
                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-6741
             Project: CloudStack
          Issue Type: Bug
      Security Level: Public (Anyone can view this level - this is the default.)
          Components: Management Server, Network Devices, Virtual Router
    Affects Versions: 4.3.0
         Environment: CloudStack 4.3.0
XenServer 6.2.0
            Reporter: Bret Mette
            Priority: Critical


I created an instance using the web GUI. I then created a template from that 
instance, stopped the instance and created a new instance from the template. 
All was well. I noticed I wanted to change something in the template so I 
stopped the instance, destroyed it and started up the instance I made the 
template from. The instance I made the template from was not able to get an IP 
from DHCP.

I destroyed the instance, destroyed the template and created a new instance 
with the same name using the instance wizard.

The new instance was also unable to get an IP from DHCP on the VR. I logged 
into the VR and checked the basics. The MAC for the new instance was showing as 
"incomplete" when I ran arp -n. 

root@r-113-VM:~# cat /etc/hosts
127.0.0.1       localhost

# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
10.0.10.254 data-server
10.0.10.254 r-113-VM
10.0.10.10 xencenter
10.0.10.11 bret-dev
10.0.10.13 cpanel-temp
10.0.10.12 centos-6-5-minimal


root@r-113-VM:~# cat /etc/dhcphosts.txt
06:f6:b6:00:0a:b0,set:10_0_10_10,10.0.10.10,xencenter,infinite
06:3d:6e:00:0a:b1,set:10_0_10_11,10.0.10.11,bret-dev,infinite
06:24:a0:00:0a:b3,set:10_0_10_13,10.0.10.13,cpanel-temp,infinite
06:c6:f6:00:0a:b2,set:10_0_10_12,10.0.10.12,centos-6-5-minimal,infinite


root@r-113-VM:~# arp -n
Address                  HWtype  HWaddress           Flags Mask            Iface
10.0.10.11               ether     06:3d:6e:00:0a:b1   C                        
  eth0
10.0.10.12                            (incomplete)                              
           eth0
x.x.x.x                       ether    x:x:x:x:x:x                C             
             eth2
169.254.0.1              ether    4e:ad:18:d9:72:47   C                         
 eth1


I then destroyed (but did not expunge) the instance and changed the MAC in the 
cloud.nics table in the database. Restored the instance, it uses the same IP 
but a different MAC and now works.

Why would CloudStack reuse a MAC, and why would reusing the MAC cause a routing 
issue? Maybe the new instance was being created on a different host in the 
cluster and the host's routing table was not updated / confused?


Here is the same information after I restored the instance using the new MAC

root@r-113-VM:/etc/init.d# cat /etc/hosts
127.0.0.1       localhost

# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
10.0.10.254 data-server
10.0.10.254 r-113-VM
10.0.10.10 xencenter
10.0.10.11 bret-dev
10.0.10.13 cpanel-temp
10.0.10.12 centos-6-5-minimal
root@r-113-VM:/etc/init.d# cat dhcphosts.txt
cat: dhcphosts.txt: No such file or directory
root@r-113-VM:/etc/init.d# cat /etc/dhcphosts.txt
06:f6:b6:00:0a:b0,set:10_0_10_10,10.0.10.10,xencenter,infinite
06:3d:6e:00:0a:b1,set:10_0_10_11,10.0.10.11,bret-dev,infinite
06:24:a0:00:0a:b3,set:10_0_10_13,10.0.10.13,cpanel-temp,infinite
06:c6:f6:00:0a:b4,set:10_0_10_12,10.0.10.12,centos-6-5-minimal,infinite
root@r-113-VM:/etc/init.d# arp -n
Address                  HWtype  HWaddress           Flags Mask            Iface
10.0.10.11               ether   06:3d:6e:00:0a:b1   C                     eth0
10.0.10.12               ether   06:c6:f6:00:0a:b4   C                     eth0
68.234.25.129            ether   00:15:fa:88:c5:79   C                     eth2
169.254.0.1              ether   4e:ad:18:d9:72:47   C                     eth1



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to