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: Ia11cd42eab112aa6dc609a5c15353ba98f6ae3ea
This commit is contained in:
parent
00b52d10b1
commit
66b643524e
@ -56,7 +56,6 @@ from charmhelpers.contrib.openstack.utils import (
|
|||||||
configure_installation_source,
|
configure_installation_source,
|
||||||
git_install_requested,
|
git_install_requested,
|
||||||
openstack_upgrade_available,
|
openstack_upgrade_available,
|
||||||
os_requires_version,
|
|
||||||
os_release,
|
os_release,
|
||||||
sync_db_with_multi_ipv6_addresses,
|
sync_db_with_multi_ipv6_addresses,
|
||||||
is_unit_paused_set,
|
is_unit_paused_set,
|
||||||
@ -75,7 +74,6 @@ from neutron_api_utils import (
|
|||||||
do_openstack_upgrade,
|
do_openstack_upgrade,
|
||||||
dvr_router_present,
|
dvr_router_present,
|
||||||
force_etcd_restart,
|
force_etcd_restart,
|
||||||
get_topics,
|
|
||||||
git_install,
|
git_install,
|
||||||
is_api_ready,
|
is_api_ready,
|
||||||
l3ha_router_present,
|
l3ha_router_present,
|
||||||
@ -301,8 +299,6 @@ def config_changed():
|
|||||||
amqp_joined(relation_id=r_id)
|
amqp_joined(relation_id=r_id)
|
||||||
for r_id in relation_ids('identity-service'):
|
for r_id in relation_ids('identity-service'):
|
||||||
identity_joined(rid=r_id)
|
identity_joined(rid=r_id)
|
||||||
for rid in relation_ids('zeromq-configuration'):
|
|
||||||
zeromq_configuration_relation_joined(rid)
|
|
||||||
[cluster_joined(rid) for rid in relation_ids('cluster')]
|
[cluster_joined(rid) for rid in relation_ids('cluster')]
|
||||||
|
|
||||||
|
|
||||||
@ -641,14 +637,6 @@ def ha_changed():
|
|||||||
neutron_api_relation_joined(rid=rid)
|
neutron_api_relation_joined(rid=rid)
|
||||||
|
|
||||||
|
|
||||||
@hooks.hook('zeromq-configuration-relation-joined')
|
|
||||||
@os_requires_version('kilo', 'neutron-server')
|
|
||||||
def zeromq_configuration_relation_joined(relid=None):
|
|
||||||
relation_set(relation_id=relid,
|
|
||||||
topics=" ".join(get_topics()),
|
|
||||||
users="neutron")
|
|
||||||
|
|
||||||
|
|
||||||
@hooks.hook('neutron-plugin-api-subordinate-relation-joined',
|
@hooks.hook('neutron-plugin-api-subordinate-relation-joined',
|
||||||
'neutron-plugin-api-subordinate-relation-changed')
|
'neutron-plugin-api-subordinate-relation-changed')
|
||||||
@restart_on_change(restart_map(), stopstart=True)
|
@restart_on_change(restart_map(), stopstart=True)
|
||||||
@ -667,10 +655,9 @@ def neutron_plugin_api_subordinate_relation_joined(relid=None):
|
|||||||
CONFIGS.write(API_PASTE_INI)
|
CONFIGS.write(API_PASTE_INI)
|
||||||
|
|
||||||
|
|
||||||
@hooks.hook('zeromq-configuration-relation-changed',
|
@hooks.hook('neutron-plugin-api-subordinate-relation-changed')
|
||||||
'neutron-plugin-api-subordinate-relation-changed')
|
|
||||||
@restart_on_change(restart_map(), stopstart=True)
|
@restart_on_change(restart_map(), stopstart=True)
|
||||||
def zeromq_configuration_relation_changed():
|
def neutron_plugin_api_relation_changed():
|
||||||
CONFIGS.write_all()
|
CONFIGS.write_all()
|
||||||
|
|
||||||
|
|
||||||
|
@ -223,7 +223,7 @@ BASE_RESOURCE_MAP = OrderedDict([
|
|||||||
# list has a complete context.
|
# list has a complete context.
|
||||||
REQUIRED_INTERFACES = {
|
REQUIRED_INTERFACES = {
|
||||||
'database': ['shared-db', 'pgsql-db'],
|
'database': ['shared-db', 'pgsql-db'],
|
||||||
'messaging': ['amqp', 'zeromq-configuration'],
|
'messaging': ['amqp'],
|
||||||
'identity': ['identity-service'],
|
'identity': ['identity-service'],
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -662,16 +662,6 @@ def migrate_neutron_database(upgrade=False):
|
|||||||
relation_set(relation_id=r_id, **{NEUTRON_DB_INIT_RKEY: id})
|
relation_set(relation_id=r_id, **{NEUTRON_DB_INIT_RKEY: id})
|
||||||
|
|
||||||
|
|
||||||
def get_topics():
|
|
||||||
return ['q-l3-plugin',
|
|
||||||
'q-firewall-plugin',
|
|
||||||
'n-lbaas-plugin',
|
|
||||||
'ipsec_driver',
|
|
||||||
'q-metering-plugin',
|
|
||||||
'q-plugin',
|
|
||||||
'neutron']
|
|
||||||
|
|
||||||
|
|
||||||
def setup_ipv6():
|
def setup_ipv6():
|
||||||
ubuntu_rel = lsb_release()['DISTRIB_CODENAME'].lower()
|
ubuntu_rel = lsb_release()['DISTRIB_CODENAME'].lower()
|
||||||
if CompareHostReleases(ubuntu_rel) < "trusty":
|
if CompareHostReleases(ubuntu_rel) < "trusty":
|
||||||
|
@ -1 +0,0 @@
|
|||||||
neutron_api_hooks.py
|
|
@ -1 +0,0 @@
|
|||||||
neutron_api_hooks.py
|
|
@ -45,9 +45,6 @@ requires:
|
|||||||
scope: container
|
scope: container
|
||||||
vsd-rest-api:
|
vsd-rest-api:
|
||||||
interface: vsd-rest-api
|
interface: vsd-rest-api
|
||||||
zeromq-configuration:
|
|
||||||
interface: zeromq-configuration
|
|
||||||
scope: container
|
|
||||||
neutron-plugin-api-subordinate:
|
neutron-plugin-api-subordinate:
|
||||||
interface: neutron-plugin-api-subordinate
|
interface: neutron-plugin-api-subordinate
|
||||||
scope: container
|
scope: container
|
||||||
|
@ -76,7 +76,6 @@ TO_PATCH = [
|
|||||||
'open_port',
|
'open_port',
|
||||||
'openstack_upgrade_available',
|
'openstack_upgrade_available',
|
||||||
'os_release',
|
'os_release',
|
||||||
'os_requires_version',
|
|
||||||
'relation_get',
|
'relation_get',
|
||||||
'relation_ids',
|
'relation_ids',
|
||||||
'relation_set',
|
'relation_set',
|
||||||
@ -235,14 +234,12 @@ class NeutronAPIHooksTests(CharmTestCase):
|
|||||||
_amqp_rel_joined = self.patch('amqp_joined')
|
_amqp_rel_joined = self.patch('amqp_joined')
|
||||||
_id_rel_joined = self.patch('identity_joined')
|
_id_rel_joined = self.patch('identity_joined')
|
||||||
_id_cluster_joined = self.patch('cluster_joined')
|
_id_cluster_joined = self.patch('cluster_joined')
|
||||||
_zmq_joined = self.patch('zeromq_configuration_relation_joined')
|
|
||||||
self._call_hook('config-changed')
|
self._call_hook('config-changed')
|
||||||
self.assertTrue(_n_api_rel_joined.called)
|
self.assertTrue(_n_api_rel_joined.called)
|
||||||
self.assertTrue(_n_plugin_api_rel_joined.called)
|
self.assertTrue(_n_plugin_api_rel_joined.called)
|
||||||
self.assertTrue(_amqp_rel_joined.called)
|
self.assertTrue(_amqp_rel_joined.called)
|
||||||
self.assertTrue(_id_rel_joined.called)
|
self.assertTrue(_id_rel_joined.called)
|
||||||
self.assertTrue(_id_cluster_joined.called)
|
self.assertTrue(_id_cluster_joined.called)
|
||||||
self.assertTrue(_zmq_joined.called)
|
|
||||||
self.assertTrue(self.CONFIGS.write_all.called)
|
self.assertTrue(self.CONFIGS.write_all.called)
|
||||||
self.assertTrue(self.do_openstack_upgrade.called)
|
self.assertTrue(self.do_openstack_upgrade.called)
|
||||||
self.assertTrue(self.apt_install.called)
|
self.assertTrue(self.apt_install.called)
|
||||||
@ -279,7 +276,6 @@ class NeutronAPIHooksTests(CharmTestCase):
|
|||||||
_amqp_rel_joined = self.patch('amqp_joined')
|
_amqp_rel_joined = self.patch('amqp_joined')
|
||||||
_id_rel_joined = self.patch('identity_joined')
|
_id_rel_joined = self.patch('identity_joined')
|
||||||
_id_cluster_joined = self.patch('cluster_joined')
|
_id_cluster_joined = self.patch('cluster_joined')
|
||||||
_zmq_joined = self.patch('zeromq_configuration_relation_joined')
|
|
||||||
repo = 'cloud:trusty-juno'
|
repo = 'cloud:trusty-juno'
|
||||||
openstack_origin_git = {
|
openstack_origin_git = {
|
||||||
'repositories': [
|
'repositories': [
|
||||||
@ -308,7 +304,6 @@ class NeutronAPIHooksTests(CharmTestCase):
|
|||||||
self.assertTrue(_n_plugin_api_rel_joined.called)
|
self.assertTrue(_n_plugin_api_rel_joined.called)
|
||||||
self.assertTrue(_amqp_rel_joined.called)
|
self.assertTrue(_amqp_rel_joined.called)
|
||||||
self.assertTrue(_id_rel_joined.called)
|
self.assertTrue(_id_rel_joined.called)
|
||||||
self.assertTrue(_zmq_joined.called)
|
|
||||||
self.assertTrue(_id_cluster_joined.called)
|
self.assertTrue(_id_cluster_joined.called)
|
||||||
|
|
||||||
@patch.object(hooks, 'git_install_requested')
|
@patch.object(hooks, 'git_install_requested')
|
||||||
|
Loading…
Reference in New Issue
Block a user