aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Bourke <paul.bourke@oracle.com>2015-06-04 15:33:30 +0000
committerPaul Bourke <paul.bourke@oracle.com>2015-06-19 16:10:47 +0000
commit018a07984aacfccea28990aec5367e570f74a4c5 (patch)
tree3e82ea4cd1c0b49a681eaa72a66fcdb4f78c5c6a
parentc2b05b576f45ddf432571f817be45e6bcb188f75 (diff)
downloadkolla-018a07984aacfccea28990aec5367e570f74a4c5.tar.gz
kolla-018a07984aacfccea28990aec5367e570f74a4c5.zip
Fix 'unsupported locale setting' errors in init-runonce
Keystone requires a valid LC_ALL environment variable to be set, if left empty the following output is shown: """ $ tools/init-runonce Downloading glance image. Creating glance image. [=============================>] 100% <snip> Configuring neutron. unsupported locale setting unsupported locale setting unsupported locale setting unsupported locale setting unsupported locale setting unsupported locale setting unsupported locale setting unsupported locale setting unsupported locale setting unsupported locale setting unsupported locale setting Could not find any suitable endpoint. Correct region? <snip> """ A similar problem occurred in devstack (https://bugs.launchpad.net/devstack/+bug/1249131), apply the same patch they use to to sanitize language settings (https://github.com/openstack-dev/devstack/blob/master/stack.sh#L27). Closes-Bug: #1466548 Change-Id: I8e86a4466181d6dd1c1749915c1c43521af805b7
-rwxr-xr-xtools/init-runonce7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/init-runonce b/tools/init-runonce
index 25d05cf61..1cc846392 100755
--- a/tools/init-runonce
+++ b/tools/init-runonce
@@ -5,6 +5,13 @@
# configures networking and nova quotas to allow 40 m1.small instances
# to be created.
+# Sanitize language settings to avoid commands bailing out
+# with "unsupported locale setting" errors.
+unset LANG
+unset LANGUAGE
+LC_ALL=C
+export LC_ALL
+
# Move to top level directory
REAL_PATH=$(python -c "import os,sys;print os.path.realpath('$0')")
cd "$(dirname "$REAL_PATH")/.."