From c8f5ebb0e48f7e240e71402384509bca8d8c1878 Mon Sep 17 00:00:00 2001 From: Roger Luethi Date: Sat, 23 Aug 2014 18:30:50 +0200 Subject: [PATCH] labs: fix neutron locale The neutron client fails with an "unsupported locale setting" message if a locale is sent via ssh from the host computer to the node VM. This changeset works around the problem by setting LC_ALL=C if the problem is detected. Change-Id: I9caa38c8fbe7d0d0e4025e4ba0c7fb537e1686de Implements: blueprint openstack-training-labs --- labs/scripts/config_external_network.sh | 6 ++++++ labs/scripts/config_tenant_network.sh | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/labs/scripts/config_external_network.sh b/labs/scripts/config_external_network.sh index 1695526e..0325ada8 100755 --- a/labs/scripts/config_external_network.sh +++ b/labs/scripts/config_external_network.sh @@ -12,6 +12,12 @@ indicate_current_auto # Create the external network and a subnet on it. #------------------------------------------------------------------------------ +# Work around neutron client failing with unsupported locale settings +if [[ "$(neutron --help)" == "unsupported locale setting" ]]; then + echo "Locale not supported on node, setting LC_ALL=C." + export LC_ALL=C +fi + echo "Waiting for neutron to start." until neutron net-list >/dev/null 2>&1; do sleep 1 diff --git a/labs/scripts/config_tenant_network.sh b/labs/scripts/config_tenant_network.sh index 6666cbae..c638d4ca 100755 --- a/labs/scripts/config_tenant_network.sh +++ b/labs/scripts/config_tenant_network.sh @@ -12,6 +12,12 @@ indicate_current_auto # #------------------------------------------------------------------------------ +# Work around neutron client failing with unsupported locale settings +if [[ "$(neutron --help)" == "unsupported locale setting" ]]; then + echo "Locale not supported on node, setting LC_ALL=C." + export LC_ALL=C +fi + echo "Waiting for neutron to start." until neutron net-list >/dev/null 2>&1; do sleep 1