Merge ~arif-ali/stsstack-bundles:fix_k8s_configure into stsstack-bundles:master

Proposed by Arif Ali
Status: Merged
Merged at revision: 14ac3b102c242496997ced456e0e3acaf0721c41
Proposed branch: ~arif-ali/stsstack-bundles:fix_k8s_configure
Merge into: stsstack-bundles:master
Diff against target: 13 lines (+1/-1)
1 file modified
kubernetes/configure (+1/-1)
Reviewer Review Type Date Requested Status
Edward Hope-Morley Approve
Review via email: mp+391199@code.launchpad.net

Commit message

Fix configure in kubernetes

When running the configure script in a newly deployed k8s
without keystone, then this script runs forever. This update
will fix this particular issue

To post a comment you must log in.
Revision history for this message
Edward Hope-Morley (hopem) wrote :

i prefer to use (()) for numeric comparison but can fix that later.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/kubernetes/configure b/kubernetes/configure
2index 57443d0..5a1a111 100755
3--- a/kubernetes/configure
4+++ b/kubernetes/configure
5@@ -5,7 +5,7 @@ kubemaster_unit=$(juju status| sed -nr 's,(kubernetes-master/[[:digit:]]+)\*.*,\
6 juju scp ${kubemaster_unit}:config ~/.kube/config
7
8 # If we're using keystone, let's create the user and setup everything
9-if juju status keystone --format=json 2>/dev/null| jq '.machines| length'; then
10+if [[ `juju status keystone --format=json 2>/dev/null| jq '.machines| length'` -ne 0 ]] ; then
11 # We need to expose keystone first
12 # NOTE: no HA support yet. Remember to query for vip whenever/if HA support is added
13 keystone_addr=`juju status keystone --format=json 2>/dev/null| jq -r '.applications.keystone.units."keystone/0"."public-address"'`

Subscribers

People subscribed via source and target branches