forked from ceph/teuthology
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nuke.py
45 lines (38 loc) · 1.69 KB
/
nuke.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import docopt
import teuthology.nuke
doc = """
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
teuthology-nuke [-v] [--dry-run] --stale-openstack
Reset test machines
optional arguments:
-h, --help show this help message and exit
-v, --verbose be more verbose
-t CONFIG [CONFIG ...], --targets CONFIG [CONFIG ...]
yaml config containing machines to nuke
-a DIR, --archive DIR
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)
--stale-openstack nuke 'stale' OpenStack instances and volumes
and unlock OpenStack targets with no instance
--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
-s, --synch-clocks synchronize clocks on all machines
-u, --unlock Unlock each successfully nuked machine, and output
targets thatcould not be nuked.
-n NAME, --name NAME Name of run to cleanup
-i, --noipmi Skip ipmi checking
Examples:
teuthology-nuke -t target.yaml --unlock --owner user@host
teuthology-nuke -t target.yaml --pid 1234 --unlock --owner user@host
"""
def main():
args = docopt.docopt(doc)
teuthology.nuke.main(args)