Merge lp:~hopem/charms/precise/cinder/trunk into lp:charms/raring/cinder

Proposed by Edward Hope-Morley
Status: Superseded
Proposed branch: lp:~hopem/charms/precise/cinder/trunk
Merge into: lp:charms/raring/cinder
Diff against target: 74 lines (+26/-4)
4 files modified
README (+3/-3)
config.yaml (+9/-0)
hooks/cinder-hooks (+13/-0)
revision (+1/-1)
To merge this branch: bzr merge lp:~hopem/charms/precise/cinder/trunk
Reviewer Review Type Date Requested Status
Adam Gandelman (community) Needs Fixing
Review via email: mp+169067@code.launchpad.net

This proposal has been superseded by a proposal from 2013-06-14.

Commit message

If Cinder and Glance are using Ceph as a backend store,
the Cinder RBD driver requires Glance API v2 to perform
certain newer actions (as of Grizzly) e.g. copy-on-write
cloning of images. This fix applies glance_api_version to
/etc/cinder/cinder.conf with a default value of 2.

Note that Glance must have the following config set for
Cinder/Ceph copy-on-write to work:

show_image_direct_url = True

FIXES: LP1187123

Description of the change

If Cinder and Glance are using Ceph as a backend store,
the Cinder RBD driver requires Glance API v2 to perform
certain newer actions (as of Grizzly) e.g. copy-on-write
cloning of images. This fix applies glance_api_version to
/etc/cinder/cinder.conf with a default value of 2.

Note that Glance must have the following config set for
Cinder/Ceph copy-on-write to work:

show_image_direct_url = True

FIXES: LP1187123

To post a comment you must log in.
Revision history for this message
Adam Gandelman (gandelman-a) wrote :

Hey Edward, Thanks for the merge. Couple of things:

- Shouldn't to add the os_version_is_gte() to openstack-common, we can take advantage of dpkg's version checking to accomplish the same thing, eg:

if dpkg --compare-versions "$(get_os_version_package cinder-volume)" ge 2013.1 ; then
  # do some grizzly stuff
fi

Also, you should check for cinder-common's version and not cinder-volume. ATM cinder-common is installed for all cinder services. cinder-volume will only be installed if enabled-services includes volume.

- Not sure the best way to set the glance API is through config. Its potentially error prone eg, settings API v2 but current related glance server only supports v1. Some other options:

  * The API setting goes into config glance charms config and api_version='$(config-get api-version)' is sent to related services via the image-service interface. glance charm can take responsibility of ensuring its configured to support that API version.

  * During image-service-relation-changed the cinder charm can inspect the glance endpoint in keystone to set it in cinder.conf accordingly. This may be a simple curl request to the endpoint to list supported API versions (if the api server supports such a request)

review: Needs Fixing
23. By Edward Hope-Morley

If Cinder and Glance are using Ceph as a backend store,
the Cinder RBD driver requires Glance API v2 to perform
certain newer actions (as of Grizzly) e.g. copy-on-write
cloning of images. This fix applies, fro Grizzly and up,
glance_api_version to /etc/cinder/cinder.conf with a
default value of 1 for backwards comaptibility.

Note that Glance must have the following config set for
Cinder/Ceph copy-on-write to work:

show_image_direct_url = True

FIXES: LP1187123

Unmerged revisions

23. By Edward Hope-Morley

If Cinder and Glance are using Ceph as a backend store,
the Cinder RBD driver requires Glance API v2 to perform
certain newer actions (as of Grizzly) e.g. copy-on-write
cloning of images. This fix applies, fro Grizzly and up,
glance_api_version to /etc/cinder/cinder.conf with a
default value of 1 for backwards comaptibility.

Note that Glance must have the following config set for
Cinder/Ceph copy-on-write to work:

show_image_direct_url = True

FIXES: LP1187123

22. By Edward Hope-Morley

If Cinder and Glance are using Ceph as a backend store,
the Cinder RBD driver requires Glance API v2 to perform
certain newer actions (as of Grizzly) e.g. copy-on-write
cloning of images. This fix applies glance_api_version to
/etc/cinder/cinder.conf with a default value of 2.

Note that Glance must have the following config set for
Cinder/Ceph copy-on-write to work:

show_image_direct_url = True

FIXES: LP1187123

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'README'
--- README 2012-11-29 00:03:42 +0000
+++ README 2013-06-14 12:41:34 +0000
@@ -47,16 +47,16 @@
4747
48Separating the volume service from the API service allows the storage pool48Separating the volume service from the API service allows the storage pool
49to easily scale without the added complexity that accompanies load-balancing49to easily scale without the added complexity that accompanies load-balancing
50the API server. When we've exhausted local storage on volume serve, we can50the API server. When we've exhausted local storage on volume server, we can
51simply add-unit to expand our capacity. Future requests to allocate volumes51simply add-unit to expand our capacity. Future requests to allocate volumes
52will be distributed across the pool for volume servers according to the52will be distributed across the pool of volume servers according to the
53availability of storage space.53availability of storage space.
5454
55 $ cat >cinder.cfg <<END55 $ cat >cinder.cfg <<END
56 cinder-api:56 cinder-api:
57 enabled-services: api, scheduler57 enabled-services: api, scheduler
58 cinder-volume:58 cinder-volume:
59 enabled-serfvices: volume59 enabled-services: volume
60 block-device: sdc60 block-device: sdc
61 overwrite: true61 overwrite: true
62 END62 END
6363
=== modified file 'config.yaml'
--- config.yaml 2013-02-20 01:42:47 +0000
+++ config.yaml 2013-06-14 12:41:34 +0000
@@ -86,6 +86,15 @@
86 description: |86 description: |
87 Default multicast port number that will be used to communicate between87 Default multicast port number that will be used to communicate between
88 HA Cluster nodes.88 HA Cluster nodes.
89 glance-api-version:
90 type: int
91 default: 1
92 description: |
93 Some drivers in Grizzly require the v2 Glance API to perform certain
94 actions e.g. Ceph RBD driver requires v2 API to perform copy-on-write
95 cloning of images. This option will only be set for Grizzly and up
96 and will default to v1 for backwards compatibility with related
97 glance services.
89 # Per-service HTTPS configuration.98 # Per-service HTTPS configuration.
90 ssl_cert:99 ssl_cert:
91 type: string100 type: string
92101
=== modified file 'hooks/cinder-hooks'
--- hooks/cinder-hooks 2013-05-22 00:53:45 +0000
+++ hooks/cinder-hooks 2013-06-14 12:41:34 +0000
@@ -295,6 +295,19 @@
295 do_openstack_upgrade "$install_src" $(determine_packages) python-keystoneclient295 do_openstack_upgrade "$install_src" $(determine_packages) python-keystoneclient
296 fi296 fi
297297
298 # default to api v1 for backwards compatibility
299 local glance_api_version=
300 glance_api_version=`config-get glance-api-version`
301 [ -n "glance_api_version" ] || $glance_api_version=1
302
303 # refresh after possible upgrade
304 cur=$(get_os_codename_package "cinder-common")
305
306 # only set for Grizzly and up
307 dpkg --compare-versions $(get_os_version_codename "$cur") ge \
308 $(get_os_version_codename "grizzly") && \
309 set_or_update glance_api_version $glance_api_version
310
298 configure_https311 configure_https
299 # Save our scriptrc env variables for health checks312 # Save our scriptrc env variables for health checks
300 declare -a env_vars=(313 declare -a env_vars=(
301314
=== modified file 'revision'
--- revision 2013-05-22 00:19:16 +0000
+++ revision 2013-06-14 12:41:34 +0000
@@ -1,1 +1,1 @@
127128

Subscribers

People subscribed via source and target branches