Exemplo n.º 1
0
    def test04_power_on_nodes(self):
        # BareMetal test bed uses a power strip that we can control via telnet
        # Need to add calls to that utility, for now, skipping power on
        baremetal_testbed = True
        if baremetal_testbed:
            log.info(" *** CDU power control not implemented yet, assuming nodes powered on outside this script")
            log.info(" *** Sleeping 90 seconds, allow physical nodes to power on")
            # Allow physical nodes some time to power on
            time.sleep(90)
            return

        # This powers on nodes via PDU or, if no PDU, power cycles nodes via IPMI to start discovery
        # ServerTech PDU case
        if pdu_lib.check_pdu_type() != "Unknown":
            log.info_5('**** PDU found, powering on PDU outlets')
            self.assertTrue(pdu_lib.pdu_control_compute_nodes("on"), 'Failed to power on all outlets')
            # Wait about 30 seconds for the outlets to all come on and nodes to DHCP
            fit_common.countdown(30)
        # no PDU case
        else:
            log.info_5('**** No supported PDU found, restarting nodes using IPMI.')
            # Check if some nodes are already discovered
            nodes = []
            nodes = fit_common.node_select()
            if nodes:
                log.info_5(" Nodes already discovered, skipping ipmi power reset")
                log.info_5(" %s", nodes)
            else:
                # Power cycle all nodes via IPMI, display warning if no nodes found
                if fit_common.power_control_all_nodes("off") == 0:
                    log.info_5('**** No BMC IP addresses found in arp table, continuing without node restart.')
                else:
                    # power on all nodes under any circumstances
                    fit_common.power_control_all_nodes("on")
Exemplo n.º 2
0
 def test02_power_off_nodes(self):
     print "**** Configuring power interface: "
     self.assertTrue(pdu_lib.config_power_interface(), "Failed to configure power interface")
     # ServerTech PDU case
     if pdu_lib.check_pdu_type() != "Unknown":
         print "**** Installing snmp package: "
         self.assertTrue(pdu_lib.install_snmp(), "Failed to install snmp")
         print "**** PDU found, powering off compute nodes."
         self.assertTrue(pdu_lib.pdu_control_compute_nodes("off"), 'Failed to power off all outlets')
     # no PDU case
     else:
         print '**** No supported PDU found, using IMPI to restart, some nodes may not discover.'
Exemplo n.º 3
0
 def test02_power_on_nodes(self):
     # ServerTech PDU case
     if pdu_lib.check_pdu_type() != "Unknown":
         print '**** PDU found, powering on PDU outlets'
         self.assertTrue(pdu_lib.pdu_control_compute_nodes("on"), 'Failed to power on all outlets')
         # Wait about 30 seconds for the outlets to all come on and nodes to DHCP
         fit_common.countdown(30)
     # no PDU case
     else:
         print '**** No supported PDU found, restarting nodes using IMPI.'
         # Power off all nodes
         self.assertNotEqual(fit_common.power_control_all_nodes("off"), 0, 'No BMC IP addresses found')
         # Power on all nodes
         self.assertNotEqual(fit_common.power_control_all_nodes("on"), 0, 'No BMC IP addresses found')
Exemplo n.º 4
0
 def test02_power_off_nodes(self):
     print "**** Configuring power interface: "
     self.assertTrue(pdu_lib.config_power_interface(),
                     "Failed to configure power interface")
     fit_common.time.sleep(15)
     # ServerTech PDU case
     if pdu_lib.check_pdu_type() != "Unknown":
         print "**** Installing snmp package: "
         self.assertTrue(pdu_lib.install_snmp(), "Failed to install snmp")
         print "**** PDU found, powering off compute nodes."
         self.assertTrue(pdu_lib.pdu_control_compute_nodes("off"),
                         'Failed to power off all outlets')
     # no PDU case
     else:
         print '**** No supported PDU found, using IMPI to restart, some nodes may not discover.'
Exemplo n.º 5
0
 def test02_power_on_nodes(self):
     # ServerTech PDU case
     if pdu_lib.check_pdu_type() != "Unknown":
         print '**** PDU found, powering on PDU outlets'
         self.assertTrue(pdu_lib.pdu_control_compute_nodes("on"),
                         'Failed to power on all outlets')
         # Wait about 30 seconds for the outlets to all come on and nodes to DHCP
         fit_common.countdown(30)
     # no PDU case
     else:
         print '**** No supported PDU found, restarting nodes using IMPI.'
         # Power off all nodes
         self.assertNotEqual(fit_common.power_control_all_nodes("off"), 0,
                             'No BMC IP addresses found')
         # Power on all nodes
         self.assertNotEqual(fit_common.power_control_all_nodes("on"), 0,
                             'No BMC IP addresses found')
Exemplo n.º 6
0
 def test04_power_on_nodes(self):
     # This powers on nodes via PDU or, if no PDU, power cycles nodes via IPMI to start discovery
     # ServerTech PDU case
     if pdu_lib.check_pdu_type() != "Unknown":
         log.info_5('**** PDU found, powering on PDU outlets')
         self.assertTrue(pdu_lib.pdu_control_compute_nodes("on"), 'Failed to power on all outlets')
         # Wait about 30 seconds for the outlets to all come on and nodes to DHCP
         fit_common.countdown(30)
     # no PDU case
     else:
         log.info_5('**** No supported PDU found, restarting nodes using IPMI.')
         # Power cycle all nodes via IPMI, display warning if no nodes found
         if fit_common.power_control_all_nodes("off") == 0:
             log.info_5('**** No BMC IP addresses found in arp table, continuing without node restart.')
         else:
             # power on all nodes under any circumstances
             fit_common.power_control_all_nodes("on")
Exemplo n.º 7
0
 def test04_power_on_nodes(self):
     # This powers on nodes via PDU or, if no PDU, power cycles nodes via IPMI to start discovery
     # ServerTech PDU case
     if pdu_lib.check_pdu_type() != "Unknown":
         log.info_5('**** PDU found, powering on PDU outlets')
         self.assertTrue(pdu_lib.pdu_control_compute_nodes("on"), 'Failed to power on all outlets')
         # Wait about 30 seconds for the outlets to all come on and nodes to DHCP
         fit_common.countdown(30)
     # no PDU case
     else:
         log.info_5('**** No supported PDU found, restarting nodes using IPMI.')
         # Power cycle all nodes via IPMI, display warning if no nodes found
         if fit_common.power_control_all_nodes("off") == 0:
             log.info_5('**** No BMC IP addresses found in arp table, continuing without node restart.')
         else:
             # power on all nodes under any circumstances
             fit_common.power_control_all_nodes("on")