Merge lp:~james-page/charms/precise/cinder/glance-support into lp:~openstack-charmers/charms/precise/cinder/ha-support

Proposed by James Page
Status: Merged
Approved by: Adam Gandelman
Approved revision: 43
Merged at revision: 42
Proposed branch: lp:~james-page/charms/precise/cinder/glance-support
Merge into: lp:~openstack-charmers/charms/precise/cinder/ha-support
Diff against target: 44 lines (+14/-0)
2 files modified
hooks/cinder-hooks (+12/-0)
metadata.yaml (+2/-0)
To merge this branch: bzr merge lp:~james-page/charms/precise/cinder/glance-support
Reviewer Review Type Date Requested Status
OpenStack Charmers Pending
Review via email: mp+154812@code.launchpad.net

Description of the change

Adds support for creating volumes from glance images.

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/cinder-hooks'
2--- hooks/cinder-hooks 2013-03-12 17:27:31 +0000
3+++ hooks/cinder-hooks 2013-03-21 21:18:22 +0000
4@@ -274,6 +274,17 @@
5 save_script_rc ${env_vars[@]}
6 }
7
8+function image-service_changed {
9+ GLANCE_API_SERVER=`relation-get glance-api-server`
10+ if [[ -z $GLANCE_API_SERVER ]] ; then
11+ echo "image-service_changed: GLANCE_API_SERVER not yet set. Exit 0 and retry"
12+ exit 0
13+ fi
14+ set_or_update glance_api_servers $GLANCE_API_SERVER
15+ apt-get -y install qemu-utils
16+ cinder_ctl all restart
17+}
18+
19 arg0=$(basename $0)
20 juju-log "cinder: Attempting to fire hook for: $arg0"
21 case $arg0 in
22@@ -292,6 +303,7 @@
23 "cinder-volume-service-relation-changed") exit 0 ;;
24 "cluster-relation-changed") cluster_changed ;;
25 "cluster-relation-departed") cluster_changed ;;
26+ "image-service-relation-changed") image-service_changed ;;
27 "ha-relation-joined") ha_relation_joined ;;
28 "ha-relation-changed") ha_relation_changed ;;
29 "upgrade-charm") upgrade_charm ;;
30
31=== added symlink 'hooks/image-service-relation-changed'
32=== target is u'cinder-hooks'
33=== modified file 'metadata.yaml'
34--- metadata.yaml 2013-01-08 15:54:18 +0000
35+++ metadata.yaml 2013-03-21 21:18:22 +0000
36@@ -15,6 +15,8 @@
37 interface: keystone
38 ceph:
39 interface: ceph-client
40+ image-service:
41+ interface: glance
42 ha:
43 interface: hacluster
44 scope: container

Subscribers

People subscribed via source and target branches