Merge lp:~mthaddon/charms/trusty/nova-compute/disk-cachemodes into lp:~openstack-charmers-archive/charms/trusty/nova-compute/next

Proposed by Tom Haddon
Status: Merged
Merged at revision: 87
Proposed branch: lp:~mthaddon/charms/trusty/nova-compute/disk-cachemodes
Merge into: lp:~openstack-charmers-archive/charms/trusty/nova-compute/next
Diff against target: 73 lines (+24/-1)
5 files modified
config.yaml (+6/-0)
hooks/nova_compute_context.py (+3/-0)
templates/havana/nova.conf (+5/-0)
templates/juno/nova.conf (+3/-1)
unit_tests/test_nova_compute_contexts.py (+7/-0)
To merge this branch: bzr merge lp:~mthaddon/charms/trusty/nova-compute/disk-cachemodes
Reviewer Review Type Date Requested Status
Liam Young (community) Approve
Review via email: mp+241941@code.launchpad.net

Description of the change

Allow for disk_cachemodes to be set via a config option

To post a comment you must log in.
Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

UOSCI bot says:
charm_lint_check #1106 nova-compute-next for mthaddon mp241941
    LINT OK: passed

LINT Results (max last 5 lines):
  I: config.yaml: option os-data-network has no default value
  I: config.yaml: option config-flags has no default value
  I: config.yaml: option instances-path has no default value
  W: config.yaml: option disable-neutron-security-groups has no default value
  I: config.yaml: option migration-auth-type has no default value

Full lint test output: http://paste.ubuntu.com/9055857/
Build: http://10.98.191.181:8080/job/charm_lint_check/1106/

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

UOSCI bot says:
charm_unit_test #940 nova-compute-next for mthaddon mp241941
    UNIT OK: passed

UNIT Results (max last 5 lines):
  nova_compute_hooks 132 13 90% 79, 97-98, 125, 191, 249, 254-255, 261, 265-268
  nova_compute_utils 228 110 52% 161-217, 225, 230-233, 268-270, 277, 281-284, 292-300, 304, 313-322, 335-354, 380-381, 385-386, 405-426, 443-453, 467-468, 473-474
  TOTAL 566 194 66%
  Ran 56 tests in 3.492s
  OK (SKIP=5)

Full unit test output: http://paste.ubuntu.com/9055859/
Build: http://10.98.191.181:8080/job/charm_unit_test/940/

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

UOSCI bot says:
charm_amulet_test #448 nova-compute-next for mthaddon mp241941
    AMULET OK: passed

AMULET Results (max last 5 lines):
  juju-test.conductor.15-basic-trusty-icehouse RESULT :
  juju-test.conductor DEBUG : Tearing down osci-sv07 juju environment
  juju-test.conductor DEBUG : Calling "juju destroy-environment -y osci-sv07"
  WARNING cannot delete security group "juju-osci-sv07-0". Used by another environment?
  juju-test INFO : Results: 3 passed, 0 failed, 0 errored

Full amulet test output: http://paste.ubuntu.com/9056022/
Build: http://10.98.191.181:8080/job/charm_amulet_test/448/

88. By Tom Haddon

Add template update for juno as well

89. By Tom Haddon

Add unit test for disk_cachemodes

Revision history for this message
Liam Young (gnuoy) wrote :

Thank you for the merge proposal. I've included a few minor suggestions in the inline comments.

review: Needs Fixing
90. By Tom Haddon

Use default of None, and remove duplicate [libvirtd] entry in juno's nova.conf

Revision history for this message
Liam Young (gnuoy) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'config.yaml'
2--- config.yaml 2014-09-25 16:43:39 +0000
3+++ config.yaml 2014-11-25 15:11:02 +0000
4@@ -56,6 +56,12 @@
5 default: "yes"
6 type: string
7 description: Whether to run nova-api and nova-network on the compute nodes.
8+ disk-cachemodes:
9+ default:
10+ type: string
11+ description: |
12+ Specific cachemodes to use for different disk types e.g:
13+ file=directsync,block=none
14 enable-resize:
15 default: False
16 type: boolean
17
18=== modified file 'hooks/nova_compute_context.py'
19--- hooks/nova_compute_context.py 2014-09-30 20:33:51 +0000
20+++ hooks/nova_compute_context.py 2014-11-25 15:11:02 +0000
21@@ -103,6 +103,9 @@
22 if config('instances-path') is not None:
23 ctxt['instances_path'] = config('instances-path')
24
25+ if config('disk-cachemodes'):
26+ ctxt['disk_cachemodes'] = config('disk-cachemodes')
27+
28 return ctxt
29
30
31
32=== modified file 'templates/havana/nova.conf'
33--- templates/havana/nova.conf 2014-07-31 15:32:21 +0000
34+++ templates/havana/nova.conf 2014-11-25 15:11:02 +0000
35@@ -114,3 +114,8 @@
36 server_listen = 0.0.0.0
37 server_proxyclient_address = {{ console_listen_addr }}
38 {% endif -%}
39+
40+{% if disk_cachemodes -%}
41+[libvirt]
42+disk_cachemodes = {{ disk_cachemodes }}
43+{% endif -%}
44
45=== modified file 'templates/juno/nova.conf'
46--- templates/juno/nova.conf 2014-10-14 13:20:36 +0000
47+++ templates/juno/nova.conf 2014-11-25 15:11:02 +0000
48@@ -114,4 +114,6 @@
49 {% if live_migration_uri -%}
50 live_migration_uri = {{ live_migration_uri }}
51 {% endif -%}
52-
53+{% if disk_cachemodes -%}
54+disk_cachemodes = {{ disk_cachemodes }}
55+{% endif -%}
56
57=== modified file 'unit_tests/test_nova_compute_contexts.py'
58--- unit_tests/test_nova_compute_contexts.py 2014-07-14 13:24:51 +0000
59+++ unit_tests/test_nova_compute_contexts.py 2014-11-25 15:11:02 +0000
60@@ -181,6 +181,13 @@
61 self.assertEquals(
62 {'libvirtd_opts': '-d -l', 'listen_tls': 0}, libvirt())
63
64+ def test_libvirt_disk_cachemodes(self):
65+ self.test_config.set('disk-cachemodes', 'file=unsafe,block=none')
66+ libvirt = context.NovaComputeLibvirtContext()
67+ self.assertEquals(
68+ {'libvirtd_opts': '-d', 'listen_tls': 0,
69+ 'disk_cachemodes': 'file=unsafe,block=none'}, libvirt())
70+
71 @patch.object(context.NeutronComputeContext, 'network_manager')
72 @patch.object(context.NeutronComputeContext, 'plugin')
73 def test_disable_security_groups_true(self, plugin, nm):

Subscribers

People subscribed via source and target branches