Merge pull request #30233 from codehotter/fix_get_node_retry

clouds/ec2.py: fix _get_node's ability to retry
This commit is contained in:
Mike Place 2016-01-12 13:06:38 -07:00
commit 7052da261b

View File

@ -3136,12 +3136,12 @@ def _get_node(name=None, instance_id=None, location=None):
opts=__opts__, opts=__opts__,
sigver='4') sigver='4')
return _extract_instance_info(instances).values()[0] return _extract_instance_info(instances).values()[0]
except KeyError: except IndexError:
attempts -= 1 attempts -= 1
log.debug( log.debug(
'Failed to get the data for node \'{0}\'. Remaining ' 'Failed to get the data for node \'{0}\'. Remaining '
'attempts: {1}'.format( 'attempts: {1}'.format(
name, attempts instance_id or name, attempts
) )
) )
# Just a little delay between attempts... # Just a little delay between attempts...