log.info('console ready on %s' % cname)
if ctx.check_locks:
- check_lock(ctx, None)
+ # does not check to ensure if the node is 'up'
+ # we want to be able to nuke a downed node
+ check_lock(ctx, None, check_up=False)
add_remotes(ctx, None)
connect(ctx, None)
with file(os.path.join(ctx.archive, 'config.yaml'), 'w') as f:
yaml.safe_dump(ctx.config, f, default_flow_style=False)
-def check_lock(ctx, config):
+def check_lock(ctx, config, check_up=True):
"""
Check lock status of remote machines.
"""
log.debug('machine status is %s', repr(status))
assert status is not None, \
'could not read lock status for {name}'.format(name=machine)
- assert status['up'], 'machine {name} is marked down'.format(name=machine)
+ if check_up:
+ assert status['up'], 'machine {name} is marked down'.format(
+ name=machine
+ )
assert status['locked'], \
'machine {name} is not locked'.format(name=machine)
assert status['locked_by'] == ctx.owner, \