The function associate_address() in eu2ops.py not work
Closed this issue · 1 comments
Hi:
I found these code in associate_address() in eu2ops.py not work normal, in my test case I found that the instance.public_dns_name is DNS name like "euca-10-68-122-141.eucalyptus.vaas126.cd.nsn-rdnet.net" while the address.public_ip is a IP address like "10.68.122.14". so the while loop will always failed.
The follow are the source code my test log.
source code :
while instance.public_dns_name not in address.public_ip:
if poll_count == 0:
raise Exception('Address ' + str(address) + ' never associated with instance')
instance.update()
self.debug('Instance {0} has IP {1} attached instead of {2}'.format(instance.id, instance.public_dns_name, address.public_ip) )
poll_count -= 1
self.sleep(5)
self.debug("Associated IP successfully")
my log:
The code "self.debug('Instance {0} has IP {1} attached instead of {2}'.format(instance.id, instance.public_dns_name, address.public_ip) )" will out put the instance.public_dns_name and address.public_ip, so we can check what are the real value of them in log output.
In my log the real output is:
14:41:58.750 DEBUG Instance i-34B5465F has IP euca-10-68-122-141.eucalyptus.vaas126.cd.nsn-rdnet.net attached instead of 10.68.122.141
so can you help me solve the problems! thanks!
This issue has been fixed in the testing branch. Can you please retest?