def post_start(self):
     tgt_fn = sh.joinpths(self.bin_dir, MANAGE_DATA_CONF)
     if sh.is_executable(tgt_fn):
         # If its still there, run it
         # these environment additions are important
         # in that they eventually affect how this script runs
         LOG.info("Waiting %s seconds so that keystone can start up before running first time init." % (self.wait_time))
         sh.sleep(self.wait_time)
         env = dict()
         env['ENABLED_SERVICES'] = ",".join(self.instances.keys())
         env['BIN_DIR'] = self.bin_dir
         setup_cmd = MANAGE_CMD_ROOT + [tgt_fn]
         LOG.info("Running %r command to initialize keystone." % (" ".join(setup_cmd)))
         sh.execute(*setup_cmd, env_overrides=env, run_as_root=False)
         utils.mark_unexecute_file(tgt_fn, env)
 def _setup_network_init(self):
     tgt_fn = sh.joinpths(self.bin_dir, NET_INIT_CONF)
     if sh.is_executable(tgt_fn):
         LOG.info("Creating your nova network to be used with instances.")
         # If still there, run it
         # these environment additions are important
         # in that they eventually affect how this script runs
         if 'quantum' in self.options:
             LOG.info("Waiting %s seconds so that quantum can start up before running first time init." % (self.wait_time))
             sh.sleep(self.wait_time)
         env = dict()
         env['ENABLED_SERVICES'] = ",".join(self.options)
         setup_cmd = NET_INIT_CMD_ROOT + [tgt_fn]
         LOG.info("Running %r command to initialize nova's network." % (" ".join(setup_cmd)))
         sh.execute(*setup_cmd, env_overrides=env, run_as_root=False)
         utils.mark_unexecute_file(tgt_fn, env)
Exemple #3
0
 def post_start(self):
     tgt_fn = sh.joinpths(self.bin_dir, MANAGE_DATA_CONF)
     if sh.is_executable(tgt_fn):
         # If its still there, run it
         # these environment additions are important
         # in that they eventually affect how this script runs
         LOG.info(
             "Waiting %s seconds so that keystone can start up before running first time init."
             % (self.wait_time))
         sh.sleep(self.wait_time)
         env = dict()
         env['ENABLED_SERVICES'] = ",".join(self.instances.keys())
         env['BIN_DIR'] = self.bin_dir
         setup_cmd = MANAGE_CMD_ROOT + [tgt_fn]
         LOG.info("Running %r command to initialize keystone." %
                  (" ".join(setup_cmd)))
         sh.execute(*setup_cmd, env_overrides=env, run_as_root=False)
         utils.mark_unexecute_file(tgt_fn, env)
 def _setup_network_init(self):
     tgt_fn = sh.joinpths(self.bin_dir, NET_INIT_CONF)
     if sh.is_executable(tgt_fn):
         LOG.info("Creating your nova network to be used with instances.")
         # If still there, run it
         # these environment additions are important
         # in that they eventually affect how this script runs
         if 'quantum' in self.options:
             LOG.info(
                 "Waiting %s seconds so that quantum can start up before running first time init."
                 % (self.wait_time))
             sh.sleep(self.wait_time)
         env = dict()
         env['ENABLED_SERVICES'] = ",".join(self.options)
         setup_cmd = NET_INIT_CMD_ROOT + [tgt_fn]
         LOG.info("Running %r command to initialize nova's network." %
                  (" ".join(setup_cmd)))
         sh.execute(*setup_cmd, env_overrides=env, run_as_root=False)
         utils.mark_unexecute_file(tgt_fn, env)