]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
nuke.py: Allow ipmi power cycling to be skipped
authorSam Lang <sam.lang@inktank.com>
Tue, 30 Apr 2013 20:10:35 +0000 (15:10 -0500)
committerSage Weil <sage@inktank.com>
Thu, 2 May 2013 00:18:16 +0000 (17:18 -0700)
Some nodes don't have ipmi setup.  Allow nuke to
skip the ipmi checking if -i (--noipmi) is specified.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
teuthology/nuke.py

index 5339e539cab4e52d8916357c3632bf7af3256a4f..5ed0662f9ceb00b4d05a18e0e080a336356b7de9 100644 (file)
@@ -59,6 +59,11 @@ def parse_args():
         metavar='NAME',
         help='Name of run to cleanup'
         )
+    parser.add_argument(
+        '-i', '--noipmi',
+        action='store_true', default=False,
+        help='Skip ipmi checking'
+        )
     args = parser.parse_args()
     return args
 
@@ -395,6 +400,7 @@ def nuke_one(ctx, targets, log, should_unlock, synch_clocks, reboot_all, check_l
         reboot_all=reboot_all,
         teuthology_config=ctx.teuthology_config,
         name=ctx.name,
+        noipmi=ctx.noipmi,
         )
     try:
         nuke_helper(ctx, log)
@@ -416,7 +422,8 @@ def nuke_helper(ctx, log):
     host = target.split('@')[-1]
     shortname = host.split('.')[0]
     log.debug('shortname: %s' % shortname)
-    if 'ipmi_user' in ctx.teuthology_config:
+    log.debug('{ctx}'.format(ctx=ctx))
+    if not ctx.noipmi and 'ipmi_user' in ctx.teuthology_config:
         console = remote.RemoteConsole(name=host,
                                        ipmiuser=ctx.teuthology_config['ipmi_user'],
                                        ipmipass=ctx.teuthology_config['ipmi_password'],