Merge lp:~hopem/charms/precise/cinder/lp1187123 into lp:~openstack-charmers/charms/precise/cinder/python-redux

Proposed by Edward Hope-Morley
Status: Merged
Merged at revision: 82
Proposed branch: lp:~hopem/charms/precise/cinder/lp1187123
Merge into: lp:~openstack-charmers/charms/precise/cinder/python-redux
Diff against target: 88 lines (+25/-4)
5 files modified
README (+3/-3)
config.yaml (+8/-0)
hooks/cinder_contexts.py (+9/-0)
hooks/cinder_utils.py (+2/-1)
templates/cinder.conf (+3/-0)
To merge this branch: bzr merge lp:~hopem/charms/precise/cinder/lp1187123
Reviewer Review Type Date Requested Status
OpenStack Charmers Pending
Review via email: mp+187062@code.launchpad.net
To post a comment you must log in.
65. By Edward Hope-Morley

added glance_api_version to cinder.conf template

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'README'
2--- README 2013-07-19 22:34:25 +0000
3+++ README 2013-09-23 16:18:12 +0000
4@@ -47,16 +47,16 @@
5
6 Separating the volume service from the API service allows the storage pool
7 to easily scale without the added complexity that accompanies load-balancing
8-the API server. When we've exhausted local storage on volume serve, we can
9+the API server. When we've exhausted local storage on volume server, we can
10 simply add-unit to expand our capacity. Future requests to allocate volumes
11-will be distributed across the pool for volume servers according to the
12+will be distributed across the pool of volume servers according to the
13 availability of storage space.
14
15 $ cat >cinder.cfg <<END
16 cinder-api:
17 enabled-services: api, scheduler
18 cinder-volume:
19- enabled-serfvices: volume
20+ enabled-services: volume
21 block-device: sdc
22 overwrite: true
23 END
24
25=== modified file 'config.yaml'
26--- config.yaml 2013-06-13 00:55:02 +0000
27+++ config.yaml 2013-09-23 16:18:12 +0000
28@@ -62,6 +62,14 @@
29 default: RegionOne
30 type: string
31 description: OpenStack Region
32+ glance-api-version:
33+ default: 1
34+ type: int
35+ description: |
36+ Newer storage drivers may require the v2 Glance API to perform certain
37+ actions e.g. the RBD driver requires requires this to support COW
38+ cloning of images. This option will default to v1 for backwards
39+ compatibility older glance services.
40 # HA configuration settings
41 vip:
42 type: string
43
44=== modified file 'hooks/cinder_contexts.py'
45--- hooks/cinder_contexts.py 2013-07-16 21:57:41 +0000
46+++ hooks/cinder_contexts.py 2013-09-23 16:18:12 +0000
47@@ -15,6 +15,15 @@
48 )
49
50
51+class ImageServiceContext(OSContextGenerator):
52+ interfaces = ['image-service']
53+
54+ def __call__(self):
55+ if not relation_ids('image-service'):
56+ return {}
57+ return { 'glance_api_version': config('glance-api-version') }
58+
59+
60 class CephContext(OSContextGenerator):
61 interfaces = ['ceph']
62
63
64=== modified file 'hooks/cinder_utils.py'
65--- hooks/cinder_utils.py 2013-09-23 16:16:58 +0000
66+++ hooks/cinder_utils.py 2013-09-23 16:18:12 +0000
67@@ -103,7 +103,8 @@
68 context.AMQPContext(),
69 context.ImageServiceContext(),
70 cinder_contexts.CephContext(),
71- cinder_contexts.HAProxyContext()],
72+ cinder_contexts.HAProxyContext(),
73+ cinder_contexts.ImageServiceContext()],
74 'services': ['cinder-api', 'cinder-volume',
75 'cinder-scheduler', 'haproxy']
76 }),
77
78=== modified file 'templates/cinder.conf'
79--- templates/cinder.conf 2013-07-19 22:34:03 +0000
80+++ templates/cinder.conf 2013-09-23 16:18:12 +0000
81@@ -36,3 +36,6 @@
82 {% if glance_api_servers -%}
83 glance_api_servers = {{ glance_api_servers }}
84 {% endif -%}
85+{% if glance_api_version -%}
86+glance_api_version = {{ glance_api_version }}
87+{% endif -%}
88\ No newline at end of file

Subscribers

People subscribed via source and target branches