Merge ~freyes/stsstack-bundles:octavia-hm-ping into stsstack-bundles:master

Proposed by Felipe Reyes
Status: Merged
Merged at revision: c4ff55731fb4e108fd950ddb85e4ff7f2f0e7056
Proposed branch: ~freyes/stsstack-bundles:octavia-hm-ping
Merge into: stsstack-bundles:master
Diff against target: 63 lines (+15/-4)
2 files modified
openstack/tools/create_octavia_lb.sh (+14/-3)
openstack/tools/install_local_ca.sh (+1/-1)
Reviewer Review Type Date Requested Status
Jolly Bundlers Pending
Review via email: mp+392965@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Edward Hope-Morley (hopem) :
Revision history for this message
Edward Hope-Morley (hopem) :

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/openstack/tools/create_octavia_lb.sh b/openstack/tools/create_octavia_lb.sh
2index 1d6a48e..0b878f1 100755
3--- a/openstack/tools/create_octavia_lb.sh
4+++ b/openstack/tools/create_octavia_lb.sh
5@@ -4,6 +4,7 @@ lb=lb1
6 member_vm=
7 protocol=HTTP
8 protocol_port=80
9+hm_protocol=
10
11 while (( $# > 0 )); do
12 case $1 in
13@@ -39,6 +40,14 @@ while (( $# > 0 )); do
14 protocol_port=$2
15 shift
16 ;;
17+ --healthmonitor-protocol)
18+ if (( $# < 2 )); then
19+ echo "missing protocol for healthmonitor"
20+ exit 1
21+ fi
22+ hm_protocol=$2
23+ shift
24+ ;;
25 -h|--help)
26 cat <<EOF
27 Usage:
28@@ -61,9 +70,11 @@ EOF
29 esac
30 shift
31 done
32-
33+if [ -z "$hm_protocol" ]; then
34+ hm_protocol=$protocol
35+fi
36 url_path=
37-if [[ ${protocol} == HTTP ]]; then
38+if [[ ${hm_protocol} == HTTP ]]; then
39 url_path="--url-path /"
40 fi
41
42@@ -104,7 +115,7 @@ while true; do
43 done
44
45 HM_ID=$(openstack loadbalancer healthmonitor create \
46- --name ${lb}-healthmonitor --delay 5 --max-retries 4 --timeout 10 --type ${protocol} ${url_path} ${POOL_ID} \
47+ --name ${lb}-healthmonitor --delay 5 --max-retries 4 --timeout 10 --type ${hm_protocol} ${url_path} ${POOL_ID} \
48 --format value --column id)
49 openstack loadbalancer healthmonitor list
50
51diff --git a/openstack/tools/install_local_ca.sh b/openstack/tools/install_local_ca.sh
52index a72d510..de2e710 100755
53--- a/openstack/tools/install_local_ca.sh
54+++ b/openstack/tools/install_local_ca.sh
55@@ -4,7 +4,7 @@ model_ca_cert_path=${1:-ssl/openstack/results/cacert.pem}
56 if ((`juju status --format=json| jq -r '.applications[]| select(."charm-name"=="vault")'| wc -l`)); then
57 model_uuid=`juju show-model --format=json| jq -r '.[]."model-uuid"'`
58 model_ca_cert_path=`find /tmp -name \*.stsstack-bundles.ssl.$model_uuid 2>/dev/null` || true
59- if [ -z "$model_ca_cert_path" ]; then
60+ if [[ -z "$model_ca_cert_path" || "$(cat $model_ca_cert_path)" = "None" ]]; then
61 model_ca_cert_path=`mktemp --suffix=.stsstack-bundles.ssl.$model_uuid`
62 echo "Fetching CA cert from vault"
63 juju run-action --format=json vault/leader get-root-ca --wait | jq -r .[].results.output > $model_ca_cert_path

Subscribers

People subscribed via source and target branches