Updated so nova starts the right subcomponents by default.

This commit is contained in:
Joshua Harlow 2012-01-27 18:07:07 -08:00
parent aaed330d67
commit 6f4d811522
2 changed files with 47 additions and 16 deletions
devstack
components
progs

@ -86,7 +86,13 @@ RESTART_TGT_CMD = [
NCPU = "cpu"
NVOL = "vol"
NAPI = "api"
SUBCOMPONENTS = [NCPU, NVOL, NAPI]
NOBJ = "obj"
NNET = "net"
NCERT = "cert"
NSCHED = "sched"
NCAUTH = "cauth"
SUBCOMPONENTS = [NCPU, NVOL, NAPI,
NOBJ, NNET, NCERT, NSCHED, NCAUTH]
# Additional packages for subcomponents
ADD_PKGS = {
@ -122,12 +128,24 @@ APP_OPTIONS = {
'nova-scheduler': ['--flagfile', '%CFGFILE%'],
'nova-cert': ['--flagfile', '%CFGFILE%'],
'nova-objectstore': ['--flagfile', '%CFGFILE%'],
'nova-consoleauth' : [],
#TODO FIX these
#'nova-xvpvncproxy' : ['--flagfile', '%CFGFILE%'],
#'nova-consoleauth' : [],
#TODO add in novnc
}
# Sub component names to actual app names (matching previous dict)
SUB_COMPONENT_NAME_MAP = {
NCPU: 'nova-compute',
NVOL: 'nova-volume',
NAPI: 'nova-api',
NOBJ: 'nova-objectstore',
NNET: 'nova-network',
NCERT: 'nova-cert',
NSCHED: 'nova-scheduler',
NCAUTH: 'nova-consoleauth',
}
#subdirs of the checkout/download
BIN_DIR = 'bin'
@ -338,14 +356,22 @@ class NovaRuntime(comp.PythonRuntime):
comp.PythonRuntime.__init__(self, TYPE, *args, **kargs)
def _get_apps_to_start(self):
# TODO: Check if component_opts was set to a subset of apps to be started
apps = sorted(APP_OPTIONS.keys())
result = list()
for app_name in apps:
result.append({
'name': app_name,
'path': sh.joinpths(self.appdir, BIN_DIR, app_name),
})
if not self.component_opts:
apps = sorted(APP_OPTIONS.keys())
for app_name in apps:
result.append({
'name': app_name,
'path': sh.joinpths(self.appdir, BIN_DIR, app_name),
})
else:
for short_name in self.component_opts:
full_name = SUB_COMPONENT_NAME_MAP.get(short_name)
if full_name and full_name in APP_OPTIONS:
result.append({
'name': full_name,
'path': sh.joinpths(self.appdir, BIN_DIR, full_name),
})
return result
def _get_param_map(self, app_name):

@ -338,20 +338,25 @@ def _run_components(action_name, component_order, components, distro, root_dir,
def _get_def_components():
#this seems to be the default list of what to install
#this seems to be the default list of what to install by default
#ENABLED_SERVICES=${ENABLED_SERVICES:-g-api,g-reg,key,n-api,
#n-crt,n-obj,n-cpu,n-net,n-sch,n-novnc,n-xvnc,n-cauth,horizon,mysql,rabbit}
def_components = dict()
#TODO glance subcomponents should be api/reg
def_components[settings.GLANCE] = []
def_components[settings.KEYSTONE] = []
#we seem to be missing the nova object store (n-obj)
#and nova network (n-net) and nova cert (n-crt)
#and nova scheduler (n-sch) and n-cauth (console auth)
#TODO talk to ken about these...
def_components[settings.NOVA] = [nova.NCPU, nova.NVOL, nova.NAPI]
#TODO add in xvnc? nvnc?
def_components[settings.NOVA] = [
nova.NCPU,
nova.NVOL,
nova.NAPI,
nova.NOBJ,
nova.NNET,
nova.NCERT,
nova.NSCHED,
nova.NCAUTH,
]
def_components[settings.NOVNC] = []
#TODO n-xvnc?
def_components[settings.HORIZON] = []
def_components[settings.DB] = []
def_components[settings.RABBIT] = []