summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Page <james.page@ubuntu.com>2017-12-15 17:20:09 +0000
committerJames Page <james.page@ubuntu.com>2017-12-15 17:27:01 +0000
commit0196625084f2aae97a5a9cf7b542aad3e10456b6 (patch)
treedd7a15ee4ec70dc5798bb6af5efd3a1328e79ac6
parent373158b5cfb827359a1d8c821c30c1f2a934ebb5 (diff)
Drop zeromq support
Support for the ZeroMQ messaging driver has bit-rotted over the last few years across the OpenStack charms; drop support for ZMQ inline with deprecation notices issued in 17.02 charm release. Change-Id: I39e464b289c9df842ca73e64c7576ba0531963ae
Notes
Notes (review): Verified+1: Canonical CI <uosci-testing-bot@ubuntu.com> Code-Review+2: David Ames <david.ames@canonical.com> Workflow+1: David Ames <david.ames@canonical.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Fri, 15 Dec 2017 20:12:19 +0000 Reviewed-on: https://review.openstack.org/528353 Project: openstack/charm-nova-cloud-controller Branch: refs/heads/master
-rwxr-xr-xhooks/nova_cc_hooks.py12
-rw-r--r--hooks/nova_cc_utils.py7
l---------hooks/zeromq-configuration-relation-changed1
l---------hooks/zeromq-configuration-relation-joined1
-rw-r--r--metadata.yaml3
-rw-r--r--unit_tests/test_nova_cc_hooks.py2
6 files changed, 0 insertions, 26 deletions
diff --git a/hooks/nova_cc_hooks.py b/hooks/nova_cc_hooks.py
index 286146d..396fc8d 100755
--- a/hooks/nova_cc_hooks.py
+++ b/hooks/nova_cc_hooks.py
@@ -63,7 +63,6 @@ from charmhelpers.contrib.openstack.utils import (
63 git_install_requested, 63 git_install_requested,
64 openstack_upgrade_available, 64 openstack_upgrade_available,
65 os_release, 65 os_release,
66 os_requires_version,
67 sync_db_with_multi_ipv6_addresses, 66 sync_db_with_multi_ipv6_addresses,
68 pausable_restart_on_change as restart_on_change, 67 pausable_restart_on_change as restart_on_change,
69 is_unit_paused_set, 68 is_unit_paused_set,
@@ -114,7 +113,6 @@ from nova_cc_utils import (
114 console_attributes, 113 console_attributes,
115 service_guard, 114 service_guard,
116 guard_map, 115 guard_map,
117 get_topics,
118 setup_ipv6, 116 setup_ipv6,
119 is_db_initialised, 117 is_db_initialised,
120 assess_status, 118 assess_status,
@@ -343,8 +341,6 @@ def config_changed():
343 quantum_joined(rid=rid) 341 quantum_joined(rid=rid)
344 for r_id in relation_ids('identity-service'): 342 for r_id in relation_ids('identity-service'):
345 identity_joined(rid=r_id) 343 identity_joined(rid=r_id)
346 for rid in relation_ids('zeromq-configuration'):
347 zeromq_configuration_relation_joined(rid)
348 [cluster_joined(rid) for rid in relation_ids('cluster')] 344 [cluster_joined(rid) for rid in relation_ids('cluster')]
349 [compute_joined(rid=rid) for rid in relation_ids('cloud-compute')] 345 [compute_joined(rid=rid) for rid in relation_ids('cloud-compute')]
350 346
@@ -1083,14 +1079,6 @@ def neutron_api_relation_broken():
1083 quantum_joined(rid=rid) 1079 quantum_joined(rid=rid)
1084 1080
1085 1081
1086@hooks.hook('zeromq-configuration-relation-joined')
1087@os_requires_version('kilo', 'nova-common')
1088def zeromq_configuration_relation_joined(relid=None):
1089 relation_set(relation_id=relid,
1090 topics=" ".join(get_topics()),
1091 users="nova")
1092
1093
1094@hooks.hook('nrpe-external-master-relation-joined', 1082@hooks.hook('nrpe-external-master-relation-joined',
1095 'nrpe-external-master-relation-changed') 1083 'nrpe-external-master-relation-changed')
1096def update_nrpe_config(): 1084def update_nrpe_config():
diff --git a/hooks/nova_cc_utils.py b/hooks/nova_cc_utils.py
index c1798e0..c1e5524 100644
--- a/hooks/nova_cc_utils.py
+++ b/hooks/nova_cc_utils.py
@@ -1200,13 +1200,6 @@ def service_guard(guard_map, contexts, active=False):
1200 return wrap 1200 return wrap
1201 1201
1202 1202
1203def get_topics():
1204 topics = ['scheduler', 'conductor']
1205 if 'nova-consoleauth' in services():
1206 topics.append('consoleauth')
1207 return topics
1208
1209
1210def cmd_all_services(cmd): 1203def cmd_all_services(cmd):
1211 if is_unit_paused_set(): 1204 if is_unit_paused_set():
1212 log('Unit is in paused state, not issuing {} to all' 1205 log('Unit is in paused state, not issuing {} to all'
diff --git a/hooks/zeromq-configuration-relation-changed b/hooks/zeromq-configuration-relation-changed
deleted file mode 120000
index f670241..0000000
--- a/hooks/zeromq-configuration-relation-changed
+++ /dev/null
@@ -1 +0,0 @@
1nova_cc_hooks.py \ No newline at end of file
diff --git a/hooks/zeromq-configuration-relation-joined b/hooks/zeromq-configuration-relation-joined
deleted file mode 120000
index f670241..0000000
--- a/hooks/zeromq-configuration-relation-joined
+++ /dev/null
@@ -1 +0,0 @@
1nova_cc_hooks.py \ No newline at end of file
diff --git a/metadata.yaml b/metadata.yaml
index 4b0f79c..f74d4ce 100644
--- a/metadata.yaml
+++ b/metadata.yaml
@@ -59,9 +59,6 @@ requires:
59 scope: container 59 scope: container
60 memcache: 60 memcache:
61 interface: memcache 61 interface: memcache
62 zeromq-configuration:
63 interface: zeromq-configuration
64 scope: container
65peers: 62peers:
66 cluster: 63 cluster:
67 interface: nova-ha 64 interface: nova-ha
diff --git a/unit_tests/test_nova_cc_hooks.py b/unit_tests/test_nova_cc_hooks.py
index 21aa92b..eb656f1 100644
--- a/unit_tests/test_nova_cc_hooks.py
+++ b/unit_tests/test_nova_cc_hooks.py
@@ -260,7 +260,6 @@ class NovaCCHooksTests(CharmTestCase):
260 self.git_install_requested.return_value = False 260 self.git_install_requested.return_value = False
261 self.openstack_upgrade_available.return_value = True 261 self.openstack_upgrade_available.return_value = True
262 self.relation_ids.return_value = ['generic_rid'] 262 self.relation_ids.return_value = ['generic_rid']
263 _zmq_joined = self.patch('zeromq_configuration_relation_joined')
264 utils_config.side_effect = self.test_config.get 263 utils_config.side_effect = self.test_config.get
265 self.test_config.set('console-access-protocol', 'dummy') 264 self.test_config.set('console-access-protocol', 'dummy')
266 mock_relids.return_value = [] 265 mock_relids.return_value = []
@@ -270,7 +269,6 @@ class NovaCCHooksTests(CharmTestCase):
270 self.assertTrue(self.do_openstack_upgrade.called) 269 self.assertTrue(self.do_openstack_upgrade.called)
271 self.assertTrue(neutron_api_joined.called) 270 self.assertTrue(neutron_api_joined.called)
272 self.assertTrue(identity_joined.called) 271 self.assertTrue(identity_joined.called)
273 self.assertTrue(_zmq_joined.called)
274 self.assertTrue(cluster_joined.called) 272 self.assertTrue(cluster_joined.called)
275 self.assertTrue(db_joined.called) 273 self.assertTrue(db_joined.called)
276 self.assertTrue(self.save_script_rc.called) 274 self.assertTrue(self.save_script_rc.called)