Ejemplo n.º 1
0
    def _action_setup_master(self):
        """Setup master node"""
        self.check_run("empty")
        with timestat("setup_environment", is_uniq=True):
            self.env.setup_environment()

        self.env.make_snapshot("empty", is_make=True)
Ejemplo n.º 2
0
    def setup_master(self):
        """Create environment and set up master node

        Snapshot: empty

        """
        self.check_run("empty")
        with timestat("setup_environment", is_uniq=True):
            self.env.setup_environment()
        self.env.make_snapshot("empty", is_make=True)
Ejemplo n.º 3
0
    def setup_master(self):
        """Create environment and set up master node

        Snapshot: empty

        """
        self.check_run("empty")
        with timestat("setup_environment", is_uniq=True):
            self.env.setup_environment()
        self.env.make_snapshot("empty", is_make=True)
Ejemplo n.º 4
0
 def wrapper(*args, **kwargs):
     with timestat(func) as timer:
         step_name = getattr(func, '_step_name')
         start_step = '[ START {} ]'.format(step_name)
         header = "<<< {:-^142} >>>".format(start_step)
         logger.info("\n{header}\n".format(header=header))
         result = func(*args, **kwargs)
         spend_time = timer.spended_time
         minutes = int(round(spend_time)) / 60
         seconds = int(round(spend_time)) % 60
         finish_step = "[ FINISH {} STEP TOOK {} min {} sec ]".format(
             step_name, minutes, seconds)
         footer = "<<< {:-^142} >>>".format(finish_step)
         logger.info("\n{footer}\n".format(footer=footer))
     return result
Ejemplo n.º 5
0
    def bootstrap_nodes(self, devops_nodes, timeout=600, skip_timesync=False):
        """Lists registered nailgun nodes
        Start vms and wait until they are registered on nailgun.
        :rtype : List of registered nailgun nodes
        """
        # self.dhcrelay_check()

        for node in devops_nodes:
            logger.info("Bootstrapping node: {}".format(node.name))
            node.start()
            # TODO(aglarendil): LP#1317213 temporary sleep
            # remove after better fix is applied
            time.sleep(2)

        with timestat("wait_for_nodes_to_start_and_register_in_nailgun"):
            wait(lambda: all(self.nailgun_nodes(devops_nodes)), 15, timeout)

        if not skip_timesync:
            self.sync_time([node for node in self.nailgun_nodes(devops_nodes)])

        return self.nailgun_nodes(devops_nodes)
Ejemplo n.º 6
0
    def bootstrap_nodes(self, devops_nodes, timeout=900, skip_timesync=False):
        """Lists registered nailgun nodes
        Start vms and wait until they are registered on nailgun.
        :rtype : List of registered nailgun nodes
        """
        # self.dhcrelay_check()

        for node in devops_nodes:
            logger.info("Bootstrapping node: {}".format(node.name))
            node.start()
            # TODO(aglarendil): LP#1317213 temporary sleep
            # remove after better fix is applied
            time.sleep(2)

        with timestat("wait_for_nodes_to_start_and_register_in_nailgun"):
            wait(lambda: all(self.nailgun_nodes(devops_nodes)), 15, timeout)

        if not skip_timesync:
            self.sync_time([node for node in self.nailgun_nodes(devops_nodes)])

        return self.nailgun_nodes(devops_nodes)
Ejemplo n.º 7
0
 def wrapper(*args, **kwargs):
     with timestat(func.__name__):
         return func(*args, **kwargs)
Ejemplo n.º 8
0
 def wrapper(*args, **kwargs):
     with timestat(func.__name__):
         return func(*args, **kwargs)