Merge lp:~gandelman-a/charms/precise/nova-compute/essex_fix into lp:~openstack-charmers/charms/precise/nova-compute/ha-support

Proposed by Adam Gandelman
Status: Merged
Merged at revision: 58
Proposed branch: lp:~gandelman-a/charms/precise/nova-compute/essex_fix
Merge into: lp:~openstack-charmers/charms/precise/nova-compute/ha-support
Diff against target: 25 lines (+10/-4)
1 file modified
hooks/nova-compute-relations (+10/-4)
To merge this branch: bzr merge lp:~gandelman-a/charms/precise/nova-compute/essex_fix
Reviewer Review Type Date Requested Status
OpenStack Charmers Pending
Review via email: mp+161740@code.launchpad.net

Description of the change

Essex expects glance_api_servers URLs to not include the protocol portion of the url (eg, https:// or https://)

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hooks/nova-compute-relations'
2--- hooks/nova-compute-relations 2013-04-26 13:06:20 +0000
3+++ hooks/nova-compute-relations 2013-04-30 23:50:34 +0000
4@@ -137,12 +137,18 @@
5 }
6
7 function image-service_changed {
8- GLANCE_API_SERVER=`relation-get glance-api-server`
9- if [[ -z $GLANCE_API_SERVER ]] ; then
10- echo "image-service_changed: GLANCE_API_SERVER not yet set. Exit 0 and retry"
11+ local api_server=`relation-get glance-api-server`
12+ if [[ -z $api_server ]] ; then
13+ echo "image-service_changed: api_server not yet set. Exit 0 and retry"
14 exit 0
15 fi
16- set_or_update glance_api_servers $GLANCE_API_SERVER
17+
18+ if [[ "$(get_os_codename_package nova-common)" == "essex" ]] ; then
19+ # essex needs glance_api_servers urls stripped of protocol.
20+ api_server="$(echo $api_server | awk '{gsub(/http:\/\/|https:\/\//,"")}1')"
21+ fi
22+
23+ set_or_update glance_api_servers $api_server
24 service_ctl all restart
25 }
26

Subscribers

People subscribed via source and target branches