mirror of
https://github.com/ceph/ceph
synced 2025-01-14 06:53:11 +00:00
Add --dry-run
Signed-off-by: Zack Cerza <zack@redhat.com>
This commit is contained in:
parent
04b5e6ec09
commit
354a5c297f
@ -3,10 +3,11 @@ import docopt
|
||||
import teuthology.nuke
|
||||
|
||||
doc = """
|
||||
usage: teuthology-nuke --help
|
||||
teuthology-nuke [-v] [--owner OWNER] [-n NAME] [-u] [-i] [-r] [-s]
|
||||
[-p PID] (-t CONFIG... | -a DIR)
|
||||
teuthology-nuke [-v] [-u] [-i] [-r] [-s] --owner OWNER --stale
|
||||
usage:
|
||||
teuthology-nuke --help
|
||||
teuthology-nuke [-v] [--owner OWNER] [-n NAME] [-u] [-i] [-r] [-s]
|
||||
[-p PID] [--dry-run] (-t CONFIG... | -a DIR)
|
||||
teuthology-nuke [-v] [-u] [-i] [-r] [-s] [--dry-run] --owner OWNER --stale
|
||||
|
||||
Reset test machines
|
||||
|
||||
@ -19,6 +20,8 @@ optional arguments:
|
||||
archive path for a job to kill and nuke
|
||||
--stale attempt to find and nuke 'stale' machines
|
||||
(e.g. locked by jobs that are no longer running)
|
||||
--dry-run Don't actually nuke anything; just print the list of
|
||||
targets that would be nuked
|
||||
--owner OWNER job owner
|
||||
-p PID, --pid PID pid of the process to be killed
|
||||
-r, --reboot-all reboot all machines
|
||||
|
@ -384,6 +384,10 @@ def main(args):
|
||||
ctx.config['targets'],
|
||||
default_flow_style=False).splitlines()))
|
||||
|
||||
if ctx.dry_run:
|
||||
log.info("Not actually nuking anything since --dry-run was passed")
|
||||
return
|
||||
|
||||
if ctx.owner is None:
|
||||
ctx.owner = get_user()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user