Fixed the default action, start isn't really the right default.

This commit is contained in:
Joshua Harlow
2012-02-03 12:30:52 -08:00
parent 5e65651048
commit bfbfc75eea
4 changed files with 12 additions and 12 deletions

View File

@@ -66,7 +66,7 @@ DB_ACTIONS = {
RHEL_FIX_GRANTS = ['perl', '-p', '-i', '-e', "'s/^skip-grant-tables/#skip-grant-tables/g'", '/etc/my.cnf']
UBUNTU_HOST_ADJUST = ['perl', '-p', '-i', '-e', "'s/127.0.0.1/0.0.0.0/g'", '/etc/mysql/my.cnf']
#need to reset pw to blank since this distributions don't seem to always reset it when u uninstall the
#need to reset pw to blank since this distributions don't seem to always reset it when u uninstall the db
RESET_BASE_PW = ''
#links about how to reset if it fails

View File

@@ -55,7 +55,7 @@ class RabbitUninstaller(comp.PkgUninstallComponent):
def pre_uninstall(self):
try:
self.runtime.restart()
LOG.info("Resetting the rabbit-mq guest password to \"%s\"", RESET_BASE_PW)
LOG.info("Attempting to reset the rabbit-mq guest password to \"%s\"", RESET_BASE_PW)
cmd = PWD_CMD + [RESET_BASE_PW]
sh.execute(*cmd, run_as_root=True)
except IOError:

View File

@@ -25,30 +25,29 @@ HELP_WIDTH = 80
LOG = logging.getLogger("devstack.opts")
def _format_list(in_list):
sorted_list = sorted(in_list)
return "[" + ", ".join(sorted_list) + "]"
def parse():
#version
version_str = "%prog v" + version.version_string()
help_formatter = IndentedHelpFormatter(width=HELP_WIDTH)
parser = OptionParser(version=version_str, formatter=help_formatter)
known_components = sorted(settings.COMPONENT_NAMES)
components = "(" + ", ".join(known_components) + ")"
parser.add_option("-c", "--component",
action="append",
dest="component",
help="openstack component, ie %s" % (components))
help="openstack component: %s" % (_format_list(settings.COMPONENT_NAMES)))
base_group = OptionGroup(parser, "Install/uninstall/start/stop options")
known_actions = sorted(settings.ACTIONS)
actions = "(" + ", ".join(known_actions) + ")"
base_group.add_option("-a", "--action",
action="store",
type="string",
dest="action",
metavar="ACTION",
help="action to perform, ie %s" % (actions),
default='start')
help="required action to perform: %s" % (_format_list(settings.ACTIONS)))
base_group.add_option("-d", "--directory",
action="store",
type="string",

View File

@@ -31,7 +31,7 @@ from devstack.components import keystone
from devstack.progs import common
from utils.env_gen import generate_local_rc
from utils import env_gen
LOG = logging.getLogger("devstack.progs.actions")
@@ -336,7 +336,8 @@ def _run_components(action_name, component_order, components, distro, root_dir,
#make a nice rc file for u
if not sh.exists(_RC_FILE):
generate_local_rc(_RC_FILE, config)
LOG.info("Generating a file at [%s] that will contain your environment settings." % (_RC_FILE))
env_gen.generate_local_rc(_RC_FILE, config)
end_time = time.time()