Merge lp:~niedbalski/charms/trusty/quantum-gateway/fix-lp-1396607 into lp:~openstack-charmers/charms/trusty/quantum-gateway/next

Proposed by Jorge Niedbalski
Status: Merged
Merged at revision: 80
Proposed branch: lp:~niedbalski/charms/trusty/quantum-gateway/fix-lp-1396607
Merge into: lp:~openstack-charmers/charms/trusty/quantum-gateway/next
Diff against target: 77 lines (+17/-2)
3 files modified
config.yaml (+7/-1)
hooks/quantum_hooks.py (+6/-0)
unit_tests/test_quantum_hooks.py (+4/-1)
To merge this branch: bzr merge lp:~niedbalski/charms/trusty/quantum-gateway/fix-lp-1396607
Reviewer Review Type Date Requested Status
Billy Olsen Approve
Edward Hope-Morley Approve
Review via email: mp+245194@code.launchpad.net

This proposal supersedes a proposal from 2014-11-26.

Description of the change

Fix for LP: #1396607

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

UOSCI bot says:
charm_lint_check #1226 quantum-gateway-next for niedbalski mp242926
    LINT OK: passed

LINT Results (max last 5 lines):
  I: config.yaml: option sysctl has no default value
  I: config.yaml: option os-data-network has no default value
  I: config.yaml: option data-port has no default value
  I: config.yaml: option instance-mtu has no default value
  I: config.yaml: option external-network-id has no default value

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

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote : Posted in a previous version of this proposal

UOSCI bot says:
charm_unit_test #1060 quantum-gateway-next for niedbalski mp242926
    UNIT OK: passed

UNIT Results (max last 5 lines):
  hooks/quantum_hooks 108 2 98% 204-206
  hooks/quantum_utils 207 1 99% 389
  TOTAL 458 9 98%
  Ran 85 tests in 3.389s
  OK

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

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote : Posted in a previous version of this proposal

UOSCI bot says:
charm_amulet_test #529 quantum-gateway-next for niedbalski mp242926
    AMULET FAIL: amulet-test failed

AMULET Results (max last 5 lines):
  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: 2 passed, 1 failed, 0 errored
  ERROR subprocess encountered error code 1
  make: *** [test] Error 1

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

Revision history for this message
Billy Olsen (billy-olsen) wrote : Posted in a previous version of this proposal

LGTM. Per our conversation niedbalski, it may be nice to have this integrated into one of the contexts so we can apply it throughout the openstack charms.

review: Approve
Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote : Posted in a previous version of this proposal

charm_lint_check #91 quantum-gateway-next for niedbalski mp242926
    LINT OK: passed

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

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote : Posted in a previous version of this proposal

charm_unit_test #124 quantum-gateway-next for niedbalski mp242926
    UNIT OK: passed

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

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote : Posted in a previous version of this proposal

charm_amulet_test #70 quantum-gateway-next for niedbalski mp242926
    AMULET FAIL: amulet-test failed

AMULET Results (max last 2 lines):
  ERROR subprocess encountered error code 1
  make: *** [test] Error 1

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

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

charm_lint_check #311 quantum-gateway-next for niedbalski mp245194
    LINT OK: passed

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

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

charm_unit_test #339 quantum-gateway-next for niedbalski mp245194
    UNIT OK: passed

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

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

charm_amulet_test #474 quantum-gateway-next for niedbalski mp245194
    AMULET OK: passed

Build: http://10.245.162.77:8080/job/charm_amulet_test/474/

Revision history for this message
Edward Hope-Morley (hopem) wrote :

lgtm +1

review: Approve
Revision history for this message
Billy Olsen (billy-olsen) wrote :

LGTM as well

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-11-24 09:34:05 +0000
3+++ config.yaml 2014-12-19 13:39:13 +0000
4@@ -92,7 +92,7 @@
5 accomodate the packet overhead of using GRE tunnels.
6 enable-l3-agent:
7 type: boolean
8- default: True
9+ default: True
10 description: |
11 Optional configuration to support use of linux router
12 Note that this is used only for Cisco n1kv plugin.
13@@ -115,3 +115,9 @@
14 .
15 This network will be used for tenant network traffic in overlay
16 networks.
17+ sysctl:
18+ type: string
19+ default:
20+ description: |
21+ YAML formatted associative array of sysctl values, e.g.:
22+ '{ kernel.pid_max : 4194303 }'
23\ No newline at end of file
24
25=== modified file 'hooks/quantum_hooks.py'
26--- hooks/quantum_hooks.py 2014-12-17 17:34:33 +0000
27+++ hooks/quantum_hooks.py 2014-12-19 13:39:13 +0000
28@@ -33,6 +33,7 @@
29 openstack_upgrade_available,
30 )
31 from charmhelpers.payload.execd import execd_preinstall
32+from charmhelpers.core.sysctl import create as create_sysctl
33
34 import sys
35 from quantum_utils import (
36@@ -78,6 +79,11 @@
37 global CONFIGS
38 if openstack_upgrade_available(get_common_package()):
39 CONFIGS = do_openstack_upgrade()
40+
41+ sysctl_dict = config('sysctl')
42+ if sysctl_dict:
43+ create_sysctl(sysctl_dict, '/etc/sysctl.d/50-quantum-gateway.conf')
44+
45 # Re-run joined hooks as config might have changed
46 for r_id in relation_ids('shared-db'):
47 db_joined(relation_id=r_id)
48
49=== modified file 'unit_tests/test_quantum_hooks.py'
50--- unit_tests/test_quantum_hooks.py 2014-11-19 03:09:34 +0000
51+++ unit_tests/test_quantum_hooks.py 2014-12-19 13:39:13 +0000
52@@ -40,7 +40,8 @@
53 'lsb_release',
54 'stop_services',
55 'b64decode',
56- 'is_relation_made'
57+ 'is_relation_made',
58+ 'create_sysctl',
59 ]
60
61
62@@ -98,6 +99,7 @@
63 def test_config_changed(self):
64 def mock_relids(rel):
65 return ['relid']
66+ self.test_config.set('sysctl', '{ kernel.max_pid: "1337"}')
67 self.openstack_upgrade_available.return_value = True
68 self.valid_plugin.return_value = True
69 self.relation_ids.side_effect = mock_relids
70@@ -112,6 +114,7 @@
71 self.assertTrue(_pgsql_db_joined.called)
72 self.assertTrue(_amqp_joined.called)
73 self.assertTrue(_amqp_nova_joined.called)
74+ self.create_sysctl.assert_called()
75
76 def test_config_changed_upgrade(self):
77 self.openstack_upgrade_available.return_value = True

Subscribers

People subscribed via source and target branches