X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=reboot.py;h=8efebae88c32a55ff72ad9707f4acfaf61b7825d;hb=8f66dc82b3da64dab5ad7585372f5be81cd1255a;hp=503ca6311a503f5102e6ca7bebf1a02f5733b452;hpb=d9a55220c6a3ccbbe1fdd5ea38b2593fd09acfcc;p=monitor.git diff --git a/reboot.py b/reboot.py index 503ca63..8efebae 100755 --- a/reboot.py +++ b/reboot.py @@ -1211,14 +1211,14 @@ def reboot_policy(nodename, continue_probe, dryrun): pcu = plc.getpcu(nodename) if not pcu: - logger.debug("no pcu for %s" % hostname) - print "no pcu for %s" % hostname + logger.debug("no pcu for %s" % nodename) + print "no pcu for %s" % nodename return False # "%s has no pcu" % nodename values = get_pcu_values(pcu['pcu_id']) if values == None: - logger.debug("No values for pcu probe %s" % hostname) - print "No values for pcu probe %s" % hostname + logger.debug("No values for pcu probe %s" % nodename) + print "No values for pcu probe %s" % nodename return False #"no info for pcu_id %s" % pcu['pcu_id'] # Try the PCU first @@ -1314,8 +1314,12 @@ def reboot_test(nodename, values, continue_probe, verbose, dryrun): # TODO: I don't think DRACRacAdm will throw an exception for the # default method to catch... try: - drac = DRACRacAdm(values, verbose, ['443', '5869']) - rb_ret = drac.reboot(0, dryrun) + if values['pcu_id'] in [1402]: + drac = DRAC(values, verbose, ['22']) + rb_ret = drac.reboot(0, dryrun) + else: + drac = DRACRacAdm(values, verbose, ['443', '5869']) + rb_ret = drac.reboot(0, dryrun) except: drac = DRAC(values, verbose, ['22']) rb_ret = drac.reboot(0, dryrun)