Wait for the daemon to actually be ready before continuing with other
tasks. Loop 12 times, waiting 5s, before deciding something's wrong.
Fixes: #6243
Signed-off-by: Dan Mick <dan.mick@inktank.com>
The code to extract which clients to start the API on was confused;
fix it up. Also, strip off 'client.' instead of 'clients' (since it
was done with len(), the result was the same, but confusing)
Signed-off-by: Dan Mick <dan.mick@inktank.com>
This matches an existing argument (with the same meaning) and
avoids an error like
2013-10-01T17:20:35.395 CRITICAL:root: File "/var/lib/teuthworker/teuthology-master/virtualenv/bin/teuthology", line 9, in <module>
load_entry_point('teuthology==0.0.1', 'console_scripts', 'teuthology')()
File "/home/teuthworker/teuthology-master/teuthology/run.py", line 235, in main
nuke(ctx, log, ctx.lock)
File "/home/teuthworker/teuthology-master/teuthology/nuke.py", line 391, in nuke
if ctx.run_name:
2013-10-01T17:20:35.395 CRITICAL:root:AttributeError: 'Namespace' object has no attribute 'run_name'
Signed-off-by: Sage Weil <sage@inktank.com>
When teuthology-nuke is passed with --archive/-a to kill and nuke
machines from an archive folder it blindly will nuke all the
targets it grabs from the config.yaml in the archive dir. This
change will check the description of locked machines and make sure
the run name is in the description. if not it removes the target
from the list passed to nuke().
Signed-off-by: Sandon Van Ness <sandon@inktank.com>
We don't want to block on sync for fear of a hung kernel
mount. However, we can give it a try and wait a few seconds
to get what we can.
This fixes a problem where our recent modifications to the
sudoers file are lost, with a 0 byte file left in its place,
because the task fails and we do a reboot -f -n.
Signed-off-by: Sage Weil <sage@inktank.com>
Default to 1000. Note that beanstalk priority is 2^31, so this
won't mix well with older code scheduling things at the
beanstalk default priority.
Signed-off-by: Sage Weil <sage@inktank.com>
Fixing this would require some more significant changes... and tempt me
with rewriting every module in the directory.
(cherry picked from commit 3fc39a59fd415a4e4e6f2a0354fe900477167e51)
$ teuthology-nuke -a . -r -u
Traceback (most recent call last):
File "/home/ubuntu/bin/teuthology-nuke", line 9, in <module>
load_entry_point('teuthology==0.0.1', 'console_scripts', 'teuthology-nuke')()
File "/home/ubuntu/teuthology/teuthology/nuke.py", line 343, in main
ifn = os.path.join(ctx.archive, 'info.yaml')
UnboundLocalError: local variable 'os' referenced before assignment
Signed-off-by: Sage Weil <sage@inktank.com>