Merge lp:~hopem/charms/trusty/nova-cloud-controller/ensure-apache-restart into lp:~openstack-charmers-archive/charms/trusty/nova-cloud-controller/next

Proposed by Edward Hope-Morley
Status: Merged
Merged at revision: 148
Proposed branch: lp:~hopem/charms/trusty/nova-cloud-controller/ensure-apache-restart
Merge into: lp:~openstack-charmers-archive/charms/trusty/nova-cloud-controller/next
Diff against target: 46 lines (+10/-1)
2 files modified
hooks/nova_cc_hooks.py (+9/-1)
unit_tests/test_nova_cc_hooks.py (+1/-0)
To merge this branch: bzr merge lp:~hopem/charms/trusty/nova-cloud-controller/ensure-apache-restart
Reviewer Review Type Date Requested Status
Billy Olsen Approve
Review via email: mp+254518@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 #2966 nova-cloud-controller-next for hopem mp254518
    LINT OK: passed

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

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

charm_unit_test #2757 nova-cloud-controller-next for hopem mp254518
    UNIT OK: passed

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

148. By Edward Hope-Morley

use service_reload()

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

LGTM, Approved

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hooks/nova_cc_hooks.py'
2--- hooks/nova_cc_hooks.py 2015-02-19 04:29:22 +0000
3+++ hooks/nova_cc_hooks.py 2015-03-30 17:26:57 +0000
4@@ -5,7 +5,10 @@
5 import sys
6 import uuid
7
8-from subprocess import check_call
9+from subprocess import (
10+ check_call,
11+)
12+
13 from urlparse import urlparse
14
15 from charmhelpers.core.hookenv import (
16@@ -29,6 +32,7 @@
17 restart_on_change,
18 service_running,
19 service_stop,
20+ service_reload,
21 service_restart,
22 )
23
24@@ -744,6 +748,10 @@
25 cmd = ['a2dissite', 'openstack_https_frontend']
26 check_call(cmd)
27
28+ # TODO: improve this by checking if local CN certs are available
29+ # first then checking reload status (see LP #1433114).
30+ service_reload('apache2', restart_on_failure=True)
31+
32 for rid in relation_ids('identity-service'):
33 identity_joined(rid=rid)
34
35
36=== modified file 'unit_tests/test_nova_cc_hooks.py'
37--- unit_tests/test_nova_cc_hooks.py 2015-01-13 14:44:54 +0000
38+++ unit_tests/test_nova_cc_hooks.py 2015-03-30 17:26:57 +0000
39@@ -49,6 +49,7 @@
40 'ssh_known_hosts_lines',
41 'ssh_authorized_keys_lines',
42 'save_script_rc',
43+ 'service_reload',
44 'service_restart',
45 'service_running',
46 'service_stop',

Subscribers

People subscribed via source and target branches