Merge lp:~hopem/charms/trusty/nova-compute/add-rbd-cache-config-support into lp:~openstack-charmers-archive/charms/trusty/nova-compute/next

Proposed by Edward Hope-Morley
Status: Merged
Merged at revision: 161
Proposed branch: lp:~hopem/charms/trusty/nova-compute/add-rbd-cache-config-support
Merge into: lp:~openstack-charmers-archive/charms/trusty/nova-compute/next
Diff against target: 77 lines (+34/-1)
4 files modified
charm-helpers-hooks.yaml (+1/-1)
config.yaml (+8/-0)
hooks/charmhelpers/contrib/openstack/templates/ceph.conf (+6/-0)
hooks/nova_compute_context.py (+19/-0)
To merge this branch: bzr merge lp:~hopem/charms/trusty/nova-compute/add-rbd-cache-config-support
Reviewer Review Type Date Requested Status
OpenStack Charmers Pending
Review via email: mp+264539@code.launchpad.net
To post a comment you must log in.
Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_lint_check #6295 nova-compute-next for hopem mp264539
    LINT OK: passed

Build: http://10.245.162.77:8080/job/charm_lint_check/6295/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_unit_test #5927 nova-compute-next for hopem mp264539
    UNIT OK: passed

Build: http://10.245.162.77:8080/job/charm_unit_test/5927/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_amulet_test #5150 nova-compute-next for hopem mp264539
    AMULET FAIL: amulet-test failed

AMULET Results (max last 2 lines):
make: *** [test] Error 1
ERROR:root:Make target returned non-zero.

Full amulet test output: http://paste.ubuntu.com/11891005/
Build: http://10.245.162.77:8080/job/charm_amulet_test/5150/

146. By Edward Hope-Morley

sync trunk

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_lint_check #6504 nova-compute-next for hopem mp264539
    LINT OK: passed

Build: http://10.245.162.77:8080/job/charm_lint_check/6504/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_unit_test #6136 nova-compute-next for hopem mp264539
    UNIT OK: passed

Build: http://10.245.162.77:8080/job/charm_unit_test/6136/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_amulet_test #5226 nova-compute-next for hopem mp264539
    AMULET FAIL: amulet-test failed

AMULET Results (max last 2 lines):
make: *** [test] Error 1
ERROR:root:Make target returned non-zero.

Full amulet test output: http://paste.ubuntu.com/11908779/
Build: http://10.245.162.77:8080/job/charm_amulet_test/5226/

Revision history for this message
Ryan Beisner (1chb1n) wrote :

FYI - The amulet test failure for 052-basic-trusty-kilo-git is pre-existing and does not appear to be related to this proposal.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'charm-helpers-hooks.yaml'
--- charm-helpers-hooks.yaml 2015-03-31 15:01:48 +0000
+++ charm-helpers-hooks.yaml 2015-07-20 08:38:22 +0000
@@ -1,4 +1,4 @@
1branch: lp:charm-helpers1branch: lp:~hopem/charm-helpers/add-rbd-cache-config-support
2destination: hooks/charmhelpers2destination: hooks/charmhelpers
3include:3include:
4 - core4 - core
55
=== modified file 'config.yaml'
--- config.yaml 2015-07-17 08:28:10 +0000
+++ config.yaml 2015-07-20 08:38:22 +0000
@@ -225,6 +225,14 @@
225 description: |225 description: |
226 RBD pool to use with Nova libvirt RBDImageBackend. Only required when you226 RBD pool to use with Nova libvirt RBDImageBackend. Only required when you
227 have libvirt-image-backend set to 'rbd'.227 have libvirt-image-backend set to 'rbd'.
228 rbd-client-cache:
229 type: string
230 default:
231 description: |
232 Enable/disable rbd client cache. Leaving this value unset will result in
233 default Ceph rbd client settings being used (rbd cache is enabled by
234 default for Ceph >= Giant). Supported values here are "enabled" or
235 "disabled".
228 ceph-osd-replication-count:236 ceph-osd-replication-count:
229 type: int237 type: int
230 default: 3238 default: 3
231239
=== modified file 'hooks/charmhelpers/contrib/openstack/templates/ceph.conf'
--- hooks/charmhelpers/contrib/openstack/templates/ceph.conf 2015-07-16 20:18:54 +0000
+++ hooks/charmhelpers/contrib/openstack/templates/ceph.conf 2015-07-20 08:38:22 +0000
@@ -13,3 +13,9 @@
13err to syslog = {{ use_syslog }}13err to syslog = {{ use_syslog }}
14clog to syslog = {{ use_syslog }}14clog to syslog = {{ use_syslog }}
1515
16[client]
17{% if rbd_client_cache_settings -%}
18{% for key, value in rbd_client_cache_settings.iteritems() -%}
19{{ key }} = {{ value }}
20{% endfor -%}
21{%- endif %}
16\ No newline at end of file22\ No newline at end of file
1723
=== modified file 'hooks/nova_compute_context.py'
--- hooks/nova_compute_context.py 2015-07-15 08:27:44 +0000
+++ hooks/nova_compute_context.py 2015-07-20 08:38:22 +0000
@@ -1,5 +1,7 @@
1import uuid1import uuid
2import os
2import platform3import platform
4
3from charmhelpers.contrib.openstack import context5from charmhelpers.contrib.openstack import context
4from charmhelpers.core.host import service_running, service_start6from charmhelpers.core.host import service_running, service_start
5from charmhelpers.fetch import apt_install, filter_installed_packages7from charmhelpers.fetch import apt_install, filter_installed_packages
@@ -178,6 +180,23 @@
178 elif config('libvirt-image-backend') == 'lvm':180 elif config('libvirt-image-backend') == 'lvm':
179 ctxt['libvirt_images_type'] = 'lvm'181 ctxt['libvirt_images_type'] = 'lvm'
180182
183 rbd_cache = config('rbd-client-cache') or ""
184 if rbd_cache.lower() == "enabled":
185 # We use write-though only to be safe for migration
186 ctxt['rbd_client_cache_settings'] = \
187 {'rbd cache': 'true',
188 'rbd cache size': '64 MiB',
189 'rbd cache max dirty': '0 MiB',
190 'rbd cache writethrough until flush': 'true',
191 'admin socket': '/var/run/ceph/rbd-client-$pid.asok'}
192
193 asok_path = '/var/run/ceph/'
194 if not os.path.isdir(asok_path):
195 os.mkdir(asok_path)
196
197 elif rbd_cache.lower() == "disabled":
198 ctxt['rbd_client_cache_settings'] = {'rbd cache': 'false'}
199
181 return ctxt200 return ctxt
182201
183202

Subscribers

People subscribed via source and target branches