more attempts at fixing keystone init
This commit is contained in:
parent
89d6ac4516
commit
06be94efdf
@ -22,9 +22,9 @@
|
||||
# Variables set before calling this script:
|
||||
#
|
||||
# SERVICE_TOKEN - aka admin_token in keystone.conf
|
||||
# SERVICE_ENDPOINT - local Keystone admin endpoint
|
||||
# AUTH_ENDPOINT - local Keystone admin endpoint
|
||||
# SERVICE_TENANT_NAME - name of tenant containing service accounts
|
||||
# ENABLED_SERVICES - devstackPY's list of services being activated
|
||||
# ENABLED_SERVICES - devstack's list of services being activated
|
||||
|
||||
set -e
|
||||
|
||||
@ -37,7 +37,8 @@ export SERVICE_PASSWORD
|
||||
SERVICE_TOKEN=%SERVICE_TOKEN%
|
||||
export SERVICE_TOKEN
|
||||
|
||||
SERVICE_ENDPOINT=%SERVICE_ENDPOINT%
|
||||
# This is really the AUTH_ENDPOINT (wtf)
|
||||
SERVICE_ENDPOINT=%AUTH_ENDPOINT%
|
||||
export SERVICE_ENDPOINT
|
||||
|
||||
SERVICE_TENANT_NAME=%SERVICE_TENANT_NAME%
|
||||
@ -122,11 +123,9 @@ qq keystone user-role-add --tenant_id $SERVICE_TENANT \
|
||||
--user $GLANCE_USER \
|
||||
--role $ADMIN_ROLE
|
||||
|
||||
if [[ "$ENABLED_SERVICES" =~ "n-vol" ]]; then
|
||||
qq keystone service-create --name="nova-volume" \
|
||||
--type=volume \
|
||||
--description="Nova Volume Service"
|
||||
fi
|
||||
|
||||
if [[ "$ENABLED_SERVICES" =~ "swift" ]]; then
|
||||
qq keystone service-create --name=swift \
|
||||
|
@ -102,10 +102,9 @@ class StackConfigParser(IgnoreMissingConfigParser):
|
||||
LOG.debug("Host ip from configuration/environment was empty, programatically attempting to determine it.")
|
||||
value_gotten = utils.get_host_ip()
|
||||
LOG.debug("Determined your host ip to be: \"%s\"" % (value_gotten))
|
||||
elif section in PW_SECTIONS and auto_pw and len(value_gotten) == 0:
|
||||
if section in PW_SECTIONS and auto_pw and len(value_gotten) == 0:
|
||||
LOG.debug("Being forced to ask for password for \"%s\" since the configuration value is empty.", key)
|
||||
prompt = PW_PROMPTS.get(option, PW_TMPL % (key))
|
||||
value_gotten = sh.password(prompt)
|
||||
value_gotten = sh.password(PW_PROMPTS.get(option, PW_TMPL % (key)))
|
||||
self.pws[key] = value_gotten
|
||||
return value_gotten
|
||||
|
||||
|
50
tools/list_epels.py
Normal file
50
tools/list_epels.py
Normal file
@ -0,0 +1,50 @@
|
||||
import os
|
||||
import sys
|
||||
import tempfile
|
||||
|
||||
possible_topdir = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]), os.pardir, os.pardir))
|
||||
sys.path.insert(0, possible_topdir)
|
||||
|
||||
from devstack import utils
|
||||
from devstack import settings
|
||||
from devstack import component
|
||||
from devstack.progs import common
|
||||
|
||||
EPEL_DISTRO = settings.RHEL6
|
||||
|
||||
def get_epels(c, distro):
|
||||
cls = common.get_action_cls(settings.INSTALL, c)
|
||||
dummy_config = common.get_config()
|
||||
dummy_root = tempfile.gettempdir()
|
||||
instance = cls(instances=set(), distro=distro,
|
||||
packager=None, config=dummy_config,
|
||||
root=dummy_root, opts=list(),
|
||||
keep_old=False)
|
||||
if not isinstance(instance, component.PkgInstallComponent):
|
||||
return None
|
||||
else:
|
||||
pkgs = instance._get_pkgs_expanded()
|
||||
epel_pkgs = dict()
|
||||
for (name, info) in pkgs.items():
|
||||
meta = info.get("meta") or dict()
|
||||
if meta and meta.get("epel"):
|
||||
epel_pkgs[name] = info
|
||||
return epel_pkgs
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
me = os.path.basename(sys.argv[0])
|
||||
distro = EPEL_DISTRO
|
||||
for c in sorted(settings.COMPONENT_NAMES):
|
||||
print("Packages for %s:" % (utils.color_text(c, 'green', bold=True, underline=True)))
|
||||
pkgs = get_epels(c, distro)
|
||||
if not pkgs:
|
||||
print("\t- %s" % (utils.color_text('N/A', 'red')))
|
||||
else:
|
||||
names = sorted(pkgs.keys())
|
||||
for name in names:
|
||||
real_name = name
|
||||
info = pkgs.get(name) or dict()
|
||||
if 'version' in info:
|
||||
real_name = "%s (%s)" % (name, utils.color_text(str(info.get('version')), 'blue', bold=True))
|
||||
print("\t- %s" % real_name)
|
Loading…
Reference in New Issue
Block a user