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
1=== modified file 'charm-helpers-hooks.yaml'
2--- charm-helpers-hooks.yaml 2015-03-31 15:01:48 +0000
3+++ charm-helpers-hooks.yaml 2015-07-20 08:38:22 +0000
4@@ -1,4 +1,4 @@
5-branch: lp:charm-helpers
6+branch: lp:~hopem/charm-helpers/add-rbd-cache-config-support
7 destination: hooks/charmhelpers
8 include:
9 - core
10
11=== modified file 'config.yaml'
12--- config.yaml 2015-07-17 08:28:10 +0000
13+++ config.yaml 2015-07-20 08:38:22 +0000
14@@ -225,6 +225,14 @@
15 description: |
16 RBD pool to use with Nova libvirt RBDImageBackend. Only required when you
17 have libvirt-image-backend set to 'rbd'.
18+ rbd-client-cache:
19+ type: string
20+ default:
21+ description: |
22+ Enable/disable rbd client cache. Leaving this value unset will result in
23+ default Ceph rbd client settings being used (rbd cache is enabled by
24+ default for Ceph >= Giant). Supported values here are "enabled" or
25+ "disabled".
26 ceph-osd-replication-count:
27 type: int
28 default: 3
29
30=== modified file 'hooks/charmhelpers/contrib/openstack/templates/ceph.conf'
31--- hooks/charmhelpers/contrib/openstack/templates/ceph.conf 2015-07-16 20:18:54 +0000
32+++ hooks/charmhelpers/contrib/openstack/templates/ceph.conf 2015-07-20 08:38:22 +0000
33@@ -13,3 +13,9 @@
34 err to syslog = {{ use_syslog }}
35 clog to syslog = {{ use_syslog }}
36
37+[client]
38+{% if rbd_client_cache_settings -%}
39+{% for key, value in rbd_client_cache_settings.iteritems() -%}
40+{{ key }} = {{ value }}
41+{% endfor -%}
42+{%- endif %}
43\ No newline at end of file
44
45=== modified file 'hooks/nova_compute_context.py'
46--- hooks/nova_compute_context.py 2015-07-15 08:27:44 +0000
47+++ hooks/nova_compute_context.py 2015-07-20 08:38:22 +0000
48@@ -1,5 +1,7 @@
49 import uuid
50+import os
51 import platform
52+
53 from charmhelpers.contrib.openstack import context
54 from charmhelpers.core.host import service_running, service_start
55 from charmhelpers.fetch import apt_install, filter_installed_packages
56@@ -178,6 +180,23 @@
57 elif config('libvirt-image-backend') == 'lvm':
58 ctxt['libvirt_images_type'] = 'lvm'
59
60+ rbd_cache = config('rbd-client-cache') or ""
61+ if rbd_cache.lower() == "enabled":
62+ # We use write-though only to be safe for migration
63+ ctxt['rbd_client_cache_settings'] = \
64+ {'rbd cache': 'true',
65+ 'rbd cache size': '64 MiB',
66+ 'rbd cache max dirty': '0 MiB',
67+ 'rbd cache writethrough until flush': 'true',
68+ 'admin socket': '/var/run/ceph/rbd-client-$pid.asok'}
69+
70+ asok_path = '/var/run/ceph/'
71+ if not os.path.isdir(asok_path):
72+ os.mkdir(asok_path)
73+
74+ elif rbd_cache.lower() == "disabled":
75+ ctxt['rbd_client_cache_settings'] = {'rbd cache': 'false'}
76+
77 return ctxt
78
79

Subscribers

People subscribed via source and target branches