diff --git a/templates/glance/glance-api-paste.ini.tpl b/conf/templates/glance/glance-api-paste.ini.tpl similarity index 100% rename from templates/glance/glance-api-paste.ini.tpl rename to conf/templates/glance/glance-api-paste.ini.tpl diff --git a/templates/glance/glance-api.conf.tpl b/conf/templates/glance/glance-api.conf.tpl similarity index 100% rename from templates/glance/glance-api.conf.tpl rename to conf/templates/glance/glance-api.conf.tpl diff --git a/templates/glance/glance-registry-paste.ini.tpl b/conf/templates/glance/glance-registry-paste.ini.tpl similarity index 100% rename from templates/glance/glance-registry-paste.ini.tpl rename to conf/templates/glance/glance-registry-paste.ini.tpl diff --git a/templates/glance/glance-registry.conf.tpl b/conf/templates/glance/glance-registry.conf.tpl similarity index 100% rename from templates/glance/glance-registry.conf.tpl rename to conf/templates/glance/glance-registry.conf.tpl diff --git a/templates/horizon/000-default.tpl b/conf/templates/horizon/000-default.tpl similarity index 100% rename from templates/horizon/000-default.tpl rename to conf/templates/horizon/000-default.tpl diff --git a/templates/horizon/horizon_settings.py.tpl b/conf/templates/horizon/horizon_settings.py.tpl similarity index 100% rename from templates/horizon/horizon_settings.py.tpl rename to conf/templates/horizon/horizon_settings.py.tpl diff --git a/templates/keystone/keystone.conf.tpl b/conf/templates/keystone/keystone.conf.tpl similarity index 100% rename from templates/keystone/keystone.conf.tpl rename to conf/templates/keystone/keystone.conf.tpl diff --git a/templates/keystone/keystone_data.sh.tpl b/conf/templates/keystone/keystone_data.sh.tpl similarity index 100% rename from templates/keystone/keystone_data.sh.tpl rename to conf/templates/keystone/keystone_data.sh.tpl diff --git a/templates/nova/nova-clean-network.sh.tpl b/conf/templates/nova/nova-clean-network.sh.tpl similarity index 100% rename from templates/nova/nova-clean-network.sh.tpl rename to conf/templates/nova/nova-clean-network.sh.tpl diff --git a/templates/swift/account-server.conf.tpl b/conf/templates/swift/account-server.conf.tpl similarity index 100% rename from templates/swift/account-server.conf.tpl rename to conf/templates/swift/account-server.conf.tpl diff --git a/templates/swift/container-server.conf.tpl b/conf/templates/swift/container-server.conf.tpl similarity index 100% rename from templates/swift/container-server.conf.tpl rename to conf/templates/swift/container-server.conf.tpl diff --git a/templates/swift/object-server.conf.tpl b/conf/templates/swift/object-server.conf.tpl similarity index 100% rename from templates/swift/object-server.conf.tpl rename to conf/templates/swift/object-server.conf.tpl diff --git a/templates/swift/proxy-server.conf.tpl b/conf/templates/swift/proxy-server.conf.tpl similarity index 100% rename from templates/swift/proxy-server.conf.tpl rename to conf/templates/swift/proxy-server.conf.tpl diff --git a/templates/swift/rsyncd.conf.tpl b/conf/templates/swift/rsyncd.conf.tpl similarity index 100% rename from templates/swift/rsyncd.conf.tpl rename to conf/templates/swift/rsyncd.conf.tpl diff --git a/templates/swift/rsyslog.conf.tpl b/conf/templates/swift/rsyslog.conf.tpl similarity index 100% rename from templates/swift/rsyslog.conf.tpl rename to conf/templates/swift/rsyslog.conf.tpl diff --git a/templates/swift/swift-remakerings.tpl b/conf/templates/swift/swift-remakerings.tpl similarity index 100% rename from templates/swift/swift-remakerings.tpl rename to conf/templates/swift/swift-remakerings.tpl diff --git a/templates/swift/swift-startmain.tpl b/conf/templates/swift/swift-startmain.tpl similarity index 100% rename from templates/swift/swift-startmain.tpl rename to conf/templates/swift/swift-startmain.tpl diff --git a/templates/swift/swift.conf.tpl b/conf/templates/swift/swift.conf.tpl similarity index 100% rename from templates/swift/swift.conf.tpl rename to conf/templates/swift/swift.conf.tpl diff --git a/devstack/settings.py b/devstack/settings.py index 4fa95cf0..727c6df8 100644 --- a/devstack/settings.py +++ b/devstack/settings.py @@ -106,11 +106,13 @@ STOP = "stop" ACTIONS = [INSTALL, UNINSTALL, START, STOP] # Where the configs and templates should be at. -STACK_CONFIG_DIR = "conf" -STACK_TEMPLATE_DIR = "templates" +STACK_CONFIG_DIR = os.path.join(os.getcwd(), "conf") +STACK_TEMPLATE_DIR = os.path.join(STACK_CONFIG_DIR, "templates") STACK_PKG_DIR = os.path.join(STACK_CONFIG_DIR, "pkgs") STACK_PIP_DIR = os.path.join(STACK_CONFIG_DIR, "pips") STACK_CONFIG_LOCATION = os.path.join(STACK_CONFIG_DIR, "stack.ini") +STACK_LOG_CFG_LOCATION = os.path.join(STACK_CONFIG_DIR, "logging.ini") +STACK_LOG_ENV_LOCATION = 'LOG_FILE' # These regex is how we match python platform output to a known constant KNOWN_DISTROS = { diff --git a/devstack/shell.py b/devstack/shell.py index b3b62658..a0566e3e 100644 --- a/devstack/shell.py +++ b/devstack/shell.py @@ -14,13 +14,13 @@ # License for the specific language governing permissions and limitations # under the License. +import fileinput import getpass import grp import os.path import pwd import shutil import subprocess -import fileinput from devstack import env from devstack import exceptions as excp diff --git a/stack b/stack index 422509da..7a79eab8 100755 --- a/stack +++ b/stack @@ -21,10 +21,12 @@ import logging.config import sys import traceback +from devstack import settings + #this needs to happen immediately (or thats what it seems) -LOG_FN = os.getenv('LOG_FILE') -if(LOG_FN == None): - LOG_FN = os.path.normpath(os.path.join("conf", 'logging.ini')) +LOG_FN = os.getenv(settings.STACK_LOG_ENV_LOCATION) +if not LOG_FN or not os.path.isfile(LOG_FN): + LOG_FN = settings.STACK_LOG_CFG_LOCATION logging.config.fileConfig(LOG_FN) from devstack import opts