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: I9ebd2fcbbe8514943e7aba0f9ea2a492b61b1dbd
This commit is contained in:
parent
488c8ff208
commit
72f88dcab0
@ -33,7 +33,6 @@ from charmhelpers.contrib.openstack.utils import (
|
||||
config_value_changed,
|
||||
configure_installation_source,
|
||||
openstack_upgrade_available,
|
||||
os_requires_version,
|
||||
pausable_restart_on_change as restart_on_change,
|
||||
is_unit_paused_set,
|
||||
)
|
||||
@ -52,7 +51,6 @@ from neutron_utils import (
|
||||
do_openstack_upgrade,
|
||||
get_packages,
|
||||
get_early_packages,
|
||||
get_topics,
|
||||
git_install,
|
||||
git_install_requested,
|
||||
valid_plugin,
|
||||
@ -136,8 +134,6 @@ def config_changed():
|
||||
amqp_joined(relation_id=r_id)
|
||||
for r_id in relation_ids('amqp-nova'):
|
||||
amqp_nova_joined(relation_id=r_id)
|
||||
for rid in relation_ids('zeromq-configuration'):
|
||||
zeromq_configuration_relation_joined(rid)
|
||||
if valid_plugin():
|
||||
CONFIGS.write_all()
|
||||
configure_ovs()
|
||||
@ -269,20 +265,6 @@ def stop():
|
||||
cleanup_ovs_netns()
|
||||
|
||||
|
||||
@hooks.hook('zeromq-configuration-relation-joined')
|
||||
@os_requires_version('kilo', NEUTRON_COMMON)
|
||||
def zeromq_configuration_relation_joined(relid=None):
|
||||
relation_set(relation_id=relid,
|
||||
topics=" ".join(get_topics()),
|
||||
users="neutron nova")
|
||||
|
||||
|
||||
@hooks.hook('zeromq-configuration-relation-changed')
|
||||
@restart_on_change(restart_map(), stopstart=True)
|
||||
def zeromq_configuration_relation_changed():
|
||||
CONFIGS.write_all()
|
||||
|
||||
|
||||
@hooks.hook('nrpe-external-master-relation-joined',
|
||||
'nrpe-external-master-relation-changed')
|
||||
def update_nrpe_config():
|
||||
|
@ -248,7 +248,7 @@ GIT_PACKAGE_BLACKLIST = [
|
||||
# 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'],
|
||||
'neutron-plugin-api': ['neutron-plugin-api'],
|
||||
'network-service': ['quantum-network-service'],
|
||||
}
|
||||
@ -886,27 +886,6 @@ def cleanup_ovs_netns():
|
||||
log('Faild to cleanup ovs and netns, %s' % e, level=ERROR)
|
||||
|
||||
|
||||
def get_topics():
|
||||
# metering_agent
|
||||
topics = []
|
||||
if 'neutron-l3-agent' in services():
|
||||
topics.append('l3_agent')
|
||||
if 'neutron-dhcp-agent' in services():
|
||||
topics.append('dhcp_agent')
|
||||
if 'neutron-metering-agent' in services():
|
||||
topics.append('metering_agent')
|
||||
if 'neutron-lbaas-agent' in services():
|
||||
topics.append('n-lbaas_agent')
|
||||
if 'neutron-plugin-openvswitch-agent' in services():
|
||||
topics.append('q-agent-notifier-port-update')
|
||||
topics.append('q-agent-notifier-network-delete')
|
||||
topics.append('q-agent-notifier-tunnel-update')
|
||||
topics.append('q-agent-notifier-security_group-update')
|
||||
topics.append('q-agent-notifier-dvr-update')
|
||||
topics.append('q-agent-notifier-l2population-update')
|
||||
return topics
|
||||
|
||||
|
||||
def git_install(projects_yaml):
|
||||
"""Perform setup, and install git repos specified in yaml parameter."""
|
||||
if git_install_requested():
|
||||
|
@ -1 +0,0 @@
|
||||
neutron_hooks.py
|
@ -1 +0,0 @@
|
||||
neutron_hooks.py
|
@ -33,9 +33,6 @@ requires:
|
||||
interface: rabbitmq
|
||||
amqp-nova:
|
||||
interface: rabbitmq
|
||||
zeromq-configuration:
|
||||
interface: zeromq-configuration
|
||||
scope: container
|
||||
neutron-plugin-api:
|
||||
interface: neutron-plugin-api
|
||||
ha:
|
||||
|
@ -157,13 +157,11 @@ class TestQuantumHooks(CharmTestCase):
|
||||
self.relation_ids.side_effect = mock_relids
|
||||
_amqp_joined = self.patch('amqp_joined')
|
||||
_amqp_nova_joined = self.patch('amqp_nova_joined')
|
||||
_zmq_joined = self.patch('zeromq_configuration_relation_joined')
|
||||
self._call_hook('config-changed')
|
||||
self.assertTrue(self.do_openstack_upgrade.called)
|
||||
self.assertTrue(self.configure_ovs.called)
|
||||
self.assertTrue(_amqp_joined.called)
|
||||
self.assertTrue(_amqp_nova_joined.called)
|
||||
self.assertTrue(_zmq_joined.called)
|
||||
self.assertTrue(self.create_sysctl.called)
|
||||
self.configure_apparmor.assert_called_with()
|
||||
|
||||
@ -210,7 +208,6 @@ class TestQuantumHooks(CharmTestCase):
|
||||
self.relation_ids.side_effect = mock_relids
|
||||
_amqp_joined = self.patch('amqp_joined')
|
||||
_amqp_nova_joined = self.patch('amqp_nova_joined')
|
||||
_zmq_joined = self.patch('zeromq_configuration_relation_joined')
|
||||
repo = 'cloud:trusty-juno'
|
||||
openstack_origin_git = {
|
||||
'repositories': [
|
||||
@ -233,7 +230,6 @@ class TestQuantumHooks(CharmTestCase):
|
||||
self.assertTrue(self.configure_ovs.called)
|
||||
self.assertTrue(_amqp_joined.called)
|
||||
self.assertTrue(_amqp_nova_joined.called)
|
||||
self.assertTrue(_zmq_joined.called)
|
||||
self.assertTrue(self.create_sysctl.called)
|
||||
|
||||
def test_upgrade_charm(self):
|
||||
|
Loading…
Reference in New Issue
Block a user