Repository navigation
Closed
Labels
P3Priority 3RIoTRelates to integration with cloud providers, hypervisors, API-based services, etc.Salt-Cloudbugbroken, incorrect, or confusing behaviorfixed-pls-verifyfix is linked, bug author to confirm fixseverity-medium3rd level, incorrect or bad functionality, confusing and lacks a work around
Milestone
Description
Hello,
When creating a new node with salt-cloud (2015.8.5) and nova, i have the following issue :
[DEBUG ] Waiting for VM IP. Giving up in 00:13:40
[DEBUG ] Loaded node data for node-1:
{'_uuid': None,
'addresses': {u'Private-NTW': [{u'addr': u'192.168.0.35',
u'version': 4}],
u'private': [{u'addr': u'10.209.38.0', u'version': 4}],
u'public': [{u'addr': u'104.239.128.0', u'version': 4},
{u'addr': u'2001:cdba:0000:0000:0000:0000:3257:9652',
u'version': 6}]},
'extra': {'access_ip': u'104.239.128.0', 'metadata': {}},
'id': u'bfc550000000000000000000000000000000000',
'image': u'cf100000000000000000000000000000000000000',
'name': u'node-1',
'private_ips': [u'10.209.38.0'],
'public_ips': [u'104.239.128.0', u'2001:cdba:0000:0000:0000:0000:3257:9652'],
'size': u'general1-4',
'state': u'ACTIVE'}
[DEBUG ] VM is now running
[DEBUG ] Using IP address False
[DEBUG ] Salt interface set to: False
Error: There was a profile error: A valid IP address was not found
This is caused by the call to preferred_ip inside nova.py at line 863.
856 log.debug('VM is now running')
857
858 if ssh_interface(vm_) == 'private_ips':
859 ip_address = preferred_ip(vm_, data.private_ips)
860 elif rackconnect(vm_) is True and ssh_interface(vm_) != 'private_ips':
861 ip_address = data.public_ips
862 else:
863 ip_address = preferred_ip(vm_, data.public_ips)
864 log.debug('Using IP address {0}'.format(ip_address))data.public_ips is not a dict and therefore the loop is failing
379 family = socket.AF_INET
380 if proto == 'ipv6':
381 family = socket.AF_INET6
382 for ip in ips:
383 try:
384 socket.inet_pton(family, ip)
385 return ip
386 except Exception:
387 continuePassing a dict works :
856 log.debug('VM is now running')
857
858 if ssh_interface(vm_) == 'private_ips':
859 ip_address = preferred_ip(vm_, data.private_ips)
860 elif rackconnect(vm_) is True and ssh_interface(vm_) != 'private_ips':
861 ip_address = data.public_ips
862 else:
863 data.public_ips = [data.public_ips, ]
864 ip_address = preferred_ip(vm_, data.public_ips)
865 log.debug('Using IP address {0}'.format(ip_address))Metadata
Metadata
Assignees
Labels
P3Priority 3RIoTRelates to integration with cloud providers, hypervisors, API-based services, etc.Salt-Cloudbugbroken, incorrect, or confusing behaviorfixed-pls-verifyfix is linked, bug author to confirm fixseverity-medium3rd level, incorrect or bad functionality, confusing and lacks a work around
Activity
gtmanfred commentedon Feb 11, 2016
Are you specifying the ssh_interface as the cloud network 'Private-NTW' ?
nfillot commentedon Feb 11, 2016
No i am specifying private_ips as ssh_interface
My profile :
gtmanfred commentedon Feb 11, 2016
You shouldn't be hitting the data.public_ips at all then.
The only time data.public_ips is not a list, was when it was just the access_ip.
data.private_ips should always have been a list, it was never mangled.
Can you test with the patches from #31120 ?
It fixes some of the inconsistencies between the nova driver and what was the old libcloud driver that is deprecated now, and should no longer ever have public_ips as string instead of a list.
I just tested it on the rackspace Virginia DC.
rallytime commentedon Apr 28, 2016
Since we haven't heard back here, I'm going to close this. If you're still having trouble after testing the patches above, please leave a comment and we can re-address! Thanks!