Public IP isn't set to a new instance by wrong orphan counting
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Eucalyptus |
New
|
Undecided
|
Unassigned |
Bug Description
In repeating of running and terminating an instance, sometimes it starts without public IP.
Off course the option --addressing private is not set.
This seems to be observed more frequently on slower machine.
Reproduction:
1.
A ClusterAddressInfo is registered to orphan list on euca-run-instances. Occationally it has no private IP.
15:00:33 WARN [ClusterState:New I/O client worker #2-8] Updated orphaned public ip address: [ClusterAddressInfo orphanCount=0 address=
15:13:13 WARN [ClusterState:New I/O client worker #2-15] Updated orphaned public ip address: [ClusterAddressInfo orphanCount=0 address=
2.
When the instance's state becomes "running", the orphan entry is cleared by the key of public/private IP pair.
15:17:13 WARN [ClusterState:New I/O client worker #2-25] Forgetting stale orphan address mapping from cluster clc20 for ClusterAddressInfo 10.36.238.87 172.20.2.2 orphanCount=0
So the orphan without private IP was not cleared here.
3.
Terminate the instance and start one again. The orphan without private IP starts with count=3.
15:13:43 WARN [ClusterState:New I/O client worker #2-29] Found orphaned public ip address: [ClusterAddressInfo orphanCount=0 address=
4.
The public IP of new instance is unassigned by wrong orphan counting "count=4".
15:13:53 WARN [ClusterState:New I/O client worker #2-32] Unassigning orphaned public ip address: [ClusterAddressInfo orphanCount=0 address=
The patch is to clear orphans by key of public IP instead of public/private IP pair.
It seems work well.
system:
Eucalyptus : 2.0.3
Host : CentOS5.5
Installed : binary(
Hypervisor : kvm
VNET_MODE : MANAGED
This patch is for lp:eucalyptus/2.0 branch