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
=== modified file 'config.yaml'
--- config.yaml 2014-09-25 16:43:39 +0000
+++ config.yaml 2014-11-25 15:11:02 +0000
@@ -56,6 +56,12 @@
56 default: "yes"56 default: "yes"
57 type: string57 type: string
58 description: Whether to run nova-api and nova-network on the compute nodes.58 description: Whether to run nova-api and nova-network on the compute nodes.
59 disk-cachemodes:
60 default:
61 type: string
62 description: |
63 Specific cachemodes to use for different disk types e.g:
64 file=directsync,block=none
59 enable-resize:65 enable-resize:
60 default: False66 default: False
61 type: boolean67 type: boolean
6268
=== modified file 'hooks/nova_compute_context.py'
--- hooks/nova_compute_context.py 2014-09-30 20:33:51 +0000
+++ hooks/nova_compute_context.py 2014-11-25 15:11:02 +0000
@@ -103,6 +103,9 @@
103 if config('instances-path') is not None:103 if config('instances-path') is not None:
104 ctxt['instances_path'] = config('instances-path')104 ctxt['instances_path'] = config('instances-path')
105105
106 if config('disk-cachemodes'):
107 ctxt['disk_cachemodes'] = config('disk-cachemodes')
108
106 return ctxt109 return ctxt
107110
108111
109112
=== modified file 'templates/havana/nova.conf'
--- templates/havana/nova.conf 2014-07-31 15:32:21 +0000
+++ templates/havana/nova.conf 2014-11-25 15:11:02 +0000
@@ -114,3 +114,8 @@
114server_listen = 0.0.0.0114server_listen = 0.0.0.0
115server_proxyclient_address = {{ console_listen_addr }}115server_proxyclient_address = {{ console_listen_addr }}
116{% endif -%}116{% endif -%}
117
118{% if disk_cachemodes -%}
119[libvirt]
120disk_cachemodes = {{ disk_cachemodes }}
121{% endif -%}
117122
=== modified file 'templates/juno/nova.conf'
--- templates/juno/nova.conf 2014-10-14 13:20:36 +0000
+++ templates/juno/nova.conf 2014-11-25 15:11:02 +0000
@@ -114,4 +114,6 @@
114{% if live_migration_uri -%}114{% if live_migration_uri -%}
115live_migration_uri = {{ live_migration_uri }}115live_migration_uri = {{ live_migration_uri }}
116{% endif -%}116{% endif -%}
117117{% if disk_cachemodes -%}
118disk_cachemodes = {{ disk_cachemodes }}
119{% endif -%}
118120
=== modified file 'unit_tests/test_nova_compute_contexts.py'
--- unit_tests/test_nova_compute_contexts.py 2014-07-14 13:24:51 +0000
+++ unit_tests/test_nova_compute_contexts.py 2014-11-25 15:11:02 +0000
@@ -181,6 +181,13 @@
181 self.assertEquals(181 self.assertEquals(
182 {'libvirtd_opts': '-d -l', 'listen_tls': 0}, libvirt())182 {'libvirtd_opts': '-d -l', 'listen_tls': 0}, libvirt())
183183
184 def test_libvirt_disk_cachemodes(self):
185 self.test_config.set('disk-cachemodes', 'file=unsafe,block=none')
186 libvirt = context.NovaComputeLibvirtContext()
187 self.assertEquals(
188 {'libvirtd_opts': '-d', 'listen_tls': 0,
189 'disk_cachemodes': 'file=unsafe,block=none'}, libvirt())
190
184 @patch.object(context.NeutronComputeContext, 'network_manager')191 @patch.object(context.NeutronComputeContext, 'network_manager')
185 @patch.object(context.NeutronComputeContext, 'plugin')192 @patch.object(context.NeutronComputeContext, 'plugin')
186 def test_disable_security_groups_true(self, plugin, nm):193 def test_disable_security_groups_true(self, plugin, nm):

Subscribers

People subscribed via source and target branches