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 issues in 17.02 charm release. Change-Id: I66330dd29972e39e45e9bf81cb0570d5749b8312
This commit is contained in:
parent
3bf032804d
commit
97b7b8d31c
|
@ -56,7 +56,6 @@ from charmhelpers.contrib.openstack.utils import (
|
|||
configure_installation_source,
|
||||
git_install_requested,
|
||||
openstack_upgrade_available,
|
||||
os_requires_version,
|
||||
is_unit_paused_set,
|
||||
pausable_restart_on_change as restart_on_change,
|
||||
)
|
||||
|
@ -90,7 +89,6 @@ from nova_compute_utils import (
|
|||
enable_shell, disable_shell,
|
||||
configure_lxd,
|
||||
fix_path_ownership,
|
||||
get_topics,
|
||||
assert_charm_supports_ipv6,
|
||||
install_hugepages,
|
||||
get_hugepage_number,
|
||||
|
@ -196,8 +194,6 @@ def config_changed():
|
|||
fix_path_ownership(fp, user='nova')
|
||||
|
||||
[compute_joined(rid) for rid in relation_ids('cloud-compute')]
|
||||
for rid in relation_ids('zeromq-configuration'):
|
||||
zeromq_configuration_relation_joined(rid)
|
||||
|
||||
for rid in relation_ids('neutron-plugin'):
|
||||
neutron_plugin_joined(rid, remote_restart=send_remote_restart)
|
||||
|
@ -451,20 +447,6 @@ def nova_ceilometer_relation_changed():
|
|||
CONFIGS.write_all()
|
||||
|
||||
|
||||
@hooks.hook('zeromq-configuration-relation-joined')
|
||||
@os_requires_version('kilo', 'nova-common')
|
||||
def zeromq_configuration_relation_joined(relid=None):
|
||||
relation_set(relation_id=relid,
|
||||
topics=" ".join(get_topics()),
|
||||
users="nova")
|
||||
|
||||
|
||||
@hooks.hook('zeromq-configuration-relation-changed')
|
||||
@restart_on_change(restart_map())
|
||||
def zeromq_configuration_relation_changed():
|
||||
CONFIGS.write(NOVA_CONF)
|
||||
|
||||
|
||||
@hooks.hook('nrpe-external-master-relation-joined',
|
||||
'nrpe-external-master-relation-changed')
|
||||
def update_nrpe_config():
|
||||
|
|
|
@ -304,7 +304,7 @@ LIBVIRT_URIS = {
|
|||
# The interface is said to be satisfied if anyone of the interfaces in the
|
||||
# list has a complete context.
|
||||
REQUIRED_INTERFACES = {
|
||||
'messaging': ['amqp', 'zeromq-configuration'],
|
||||
'messaging': ['amqp'],
|
||||
'image': ['image-service'],
|
||||
}
|
||||
|
||||
|
@ -734,10 +734,6 @@ def fix_path_ownership(path, user='nova'):
|
|||
check_call(cmd)
|
||||
|
||||
|
||||
def get_topics():
|
||||
return ['compute']
|
||||
|
||||
|
||||
def assert_charm_supports_ipv6():
|
||||
"""Check whether we are able to support charms ipv6."""
|
||||
_release = lsb_release()['DISTRIB_CODENAME'].lower()
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
nova_compute_hooks.py
|
|
@ -1 +0,0 @@
|
|||
nova_compute_hooks.py
|
|
@ -45,9 +45,6 @@ requires:
|
|||
neutron-plugin:
|
||||
interface: neutron-plugin
|
||||
scope: container
|
||||
zeromq-configuration:
|
||||
interface: zeromq-configuration
|
||||
scope: container
|
||||
ephemeral-backend:
|
||||
interface: ephemeral-backend
|
||||
scope: container
|
||||
|
|
|
@ -183,7 +183,6 @@ class NovaComputeRelationsTests(CharmTestCase):
|
|||
neutron_plugin_joined):
|
||||
self.git_install_requested.return_value = False
|
||||
self.migration_enabled.return_value = True
|
||||
_zmq_joined = self.patch('zeromq_configuration_relation_joined')
|
||||
self.test_config.set('migration-auth-type', 'ssh')
|
||||
self.relation_ids.return_value = [
|
||||
'cloud-compute:0',
|
||||
|
@ -196,7 +195,6 @@ class NovaComputeRelationsTests(CharmTestCase):
|
|||
]
|
||||
self.assertEqual(ex, compute_joined.call_args_list)
|
||||
self.assertTrue(self.initialize_ssh_keys.called)
|
||||
self.assertTrue(_zmq_joined.called)
|
||||
|
||||
@patch.object(hooks, 'neutron_plugin_joined')
|
||||
@patch.object(hooks, 'compute_joined')
|
||||
|
@ -204,7 +202,6 @@ class NovaComputeRelationsTests(CharmTestCase):
|
|||
neutron_plugin_joined):
|
||||
self.git_install_requested.return_value = False
|
||||
self.test_config.set('enable-resize', True)
|
||||
_zmq_joined = self.patch('zeromq_configuration_relation_joined')
|
||||
self.migration_enabled.return_value = False
|
||||
self.relation_ids.return_value = [
|
||||
'cloud-compute:0',
|
||||
|
@ -218,7 +215,6 @@ class NovaComputeRelationsTests(CharmTestCase):
|
|||
self.assertEqual(ex, compute_joined.call_args_list)
|
||||
self.initialize_ssh_keys.assert_called_with(user='nova')
|
||||
self.enable_shell.assert_called_with(user='nova')
|
||||
self.assertTrue(_zmq_joined.called)
|
||||
|
||||
@patch.object(hooks, 'neutron_plugin_joined')
|
||||
@patch.object(hooks, 'compute_joined')
|
||||
|
@ -227,7 +223,6 @@ class NovaComputeRelationsTests(CharmTestCase):
|
|||
self.git_install_requested.return_value = False
|
||||
self.test_config.set('enable-resize', False)
|
||||
self.migration_enabled.return_value = False
|
||||
_zmq_joined = self.patch('zeromq_configuration_relation_joined')
|
||||
self.relation_ids.return_value = [
|
||||
'cloud-compute:0',
|
||||
'cloud-compute:1'
|
||||
|
@ -239,7 +234,6 @@ class NovaComputeRelationsTests(CharmTestCase):
|
|||
]
|
||||
self.assertEqual(ex, compute_joined.call_args_list)
|
||||
self.disable_shell.assert_called_with(user='nova')
|
||||
self.assertTrue(_zmq_joined.called)
|
||||
|
||||
@patch.object(hooks, 'compute_joined')
|
||||
def test_config_changed_no_upgrade_no_migration(self, compute_joined):
|
||||
|
|
Loading…
Reference in New Issue