def checkNodeBootSuccess(self, node, check_timeout=300):
     port = int(self.config.get("detection", "polling_port"))
     detector = Detector(node, port)
     print "waiting node to reboot"
     time.sleep(5)
     print "start check node booting"
     while check_timeout > 0:
         try:
             if detector.checkServiceStatus() == State.HEALTH:
                 return True
         except Exception as e:
             print str(e)
         finally:
             time.sleep(1)
             check_timeout -= 1
     return False
Пример #2
0
    def checkNodeBootSuccess(self, node, check_timeout=300):
        """

        :param node: 
        :param check_timeout: 
        :return: 
        """
        port = int(self.config.get("detection", "polling_port"))
        detector = Detector(node, port)
        print("waiting node to boot up")
        time.sleep(5)
        print("start check node booting")
        while check_timeout > 0:
            try:
                if detector.checkServiceStatus() == State.HEALTH:
                    return True
            except Exception as e:
                print("RecoveryManager checkNodeBootSuccess --Except:" +
                      str(e))
            finally:
                time.sleep(1)
                check_timeout -= 1
        return False