summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2018-03-19 13:48:16 +0000
committerGerrit Code Review <review@openstack.org>2018-03-19 13:48:16 +0000
commit15c867672aae6a73e75bf4730f3cb08b0e76accf (patch)
tree5130e1b233eef7cd1a239657e4bf9cf4659ff758
parenta080597f64f50d211b31f6f81f97db872440f1f8 (diff)
parent1dcdf38bc207e54cca234788b144afb0da27b4e9 (diff)
downloadtrove-15c867672aae6a73e75bf4730f3cb08b0e76accf.tar.gz
Merge "Add functionality to define different Message and Notification destination"
-rw-r--r--etc/trove/trove-conductor.conf.sample28
-rw-r--r--etc/trove/trove-guestagent.conf.sample28
-rw-r--r--etc/trove/trove-taskmanager.conf.sample28
-rw-r--r--etc/trove/trove.conf.sample28
-rw-r--r--trove/rpc.py16
5 files changed, 124 insertions, 4 deletions
diff --git a/etc/trove/trove-conductor.conf.sample b/etc/trove/trove-conductor.conf.sample
index 6249ed2e..d858bf25 100644
--- a/etc/trove/trove-conductor.conf.sample
+++ b/etc/trove/trove-conductor.conf.sample
@@ -29,6 +29,34 @@ control_exchange = trove
[database]
connection = mysql+pymysql://root:e1a2c042c828d3566d0a@localhost/trove
+[oslo_messaging_notifications]
+
+#
+# From oslo.messaging
+#
+
+# The Driver(s) to handle sending notifications. Possible
+# values are messaging, messagingv2, routing, log, test, noop
+# (multi valued)
+# Deprecated group/name - [DEFAULT]/notification_driver
+#driver =
+
+# A URL representing the messaging driver to use for
+# notifications. If not set, we fall back to the same
+# configuration used for RPC. (string value)
+# Deprecated group/name - [DEFAULT]/notification_transport_url
+#transport_url = <None>
+
+# AMQP topic used for OpenStack notifications. (list value)
+# Deprecated group/name - [rpc_notifier2]/topics
+# Deprecated group/name - [DEFAULT]/notification_topics
+#topics = notifications
+
+# The maximum number of attempts to re-send a notification
+# message which failed to be delivered due to a recoverable
+# error. 0 - No retry, -1 - indefinite (integer value)
+#retry = -1
+
[oslo_messaging_rabbit]
# The RabbitMQ broker address where a single node is used. (string value)
# Deprecated group/name - [DEFAULT]/rabbit_host
diff --git a/etc/trove/trove-guestagent.conf.sample b/etc/trove/trove-guestagent.conf.sample
index 9d52a465..756e9ef2 100644
--- a/etc/trove/trove-guestagent.conf.sample
+++ b/etc/trove/trove-guestagent.conf.sample
@@ -82,6 +82,34 @@ log_config_append = /etc/trove/trove-logging-guestagent.conf
# If False doesn't trace SQL requests.
#trace_sqlalchemy = True
+[oslo_messaging_notifications]
+
+#
+# From oslo.messaging
+#
+
+# The Driver(s) to handle sending notifications. Possible
+# values are messaging, messagingv2, routing, log, test, noop
+# (multi valued)
+# Deprecated group/name - [DEFAULT]/notification_driver
+#driver =
+
+# A URL representing the messaging driver to use for
+# notifications. If not set, we fall back to the same
+# configuration used for RPC. (string value)
+# Deprecated group/name - [DEFAULT]/notification_transport_url
+#transport_url = <None>
+
+# AMQP topic used for OpenStack notifications. (list value)
+# Deprecated group/name - [rpc_notifier2]/topics
+# Deprecated group/name - [DEFAULT]/notification_topics
+#topics = notifications
+
+# The maximum number of attempts to re-send a notification
+# message which failed to be delivered due to a recoverable
+# error. 0 - No retry, -1 - indefinite (integer value)
+#retry = -1
+
[oslo_messaging_rabbit]
# The RabbitMQ broker address where a single node is used. (string value)
# Deprecated group/name - [DEFAULT]/rabbit_host
diff --git a/etc/trove/trove-taskmanager.conf.sample b/etc/trove/trove-taskmanager.conf.sample
index fca7b95c..b48b3748 100644
--- a/etc/trove/trove-taskmanager.conf.sample
+++ b/etc/trove/trove-taskmanager.conf.sample
@@ -180,6 +180,34 @@ idle_timeout = 3600
# If False doesn't trace SQL requests.
#trace_sqlalchemy = True
+[oslo_messaging_notifications]
+
+#
+# From oslo.messaging
+#
+
+# The Driver(s) to handle sending notifications. Possible
+# values are messaging, messagingv2, routing, log, test, noop
+# (multi valued)
+# Deprecated group/name - [DEFAULT]/notification_driver
+#driver =
+
+# A URL representing the messaging driver to use for
+# notifications. If not set, we fall back to the same
+# configuration used for RPC. (string value)
+# Deprecated group/name - [DEFAULT]/notification_transport_url
+#transport_url = <None>
+
+# AMQP topic used for OpenStack notifications. (list value)
+# Deprecated group/name - [rpc_notifier2]/topics
+# Deprecated group/name - [DEFAULT]/notification_topics
+#topics = notifications
+
+# The maximum number of attempts to re-send a notification
+# message which failed to be delivered due to a recoverable
+# error. 0 - No retry, -1 - indefinite (integer value)
+#retry = -1
+
[oslo_messaging_rabbit]
# The RabbitMQ broker address where a single node is used. (string value)
# Deprecated group/name - [DEFAULT]/rabbit_host
diff --git a/etc/trove/trove.conf.sample b/etc/trove/trove.conf.sample
index b0f91cd3..011f5a6b 100644
--- a/etc/trove/trove.conf.sample
+++ b/etc/trove/trove.conf.sample
@@ -177,6 +177,34 @@ idle_timeout = 3600
#optional:
#ca_file = /path/to/ca_file
+[oslo_messaging_notifications]
+
+#
+# From oslo.messaging
+#
+
+# The Driver(s) to handle sending notifications. Possible
+# values are messaging, messagingv2, routing, log, test, noop
+# (multi valued)
+# Deprecated group/name - [DEFAULT]/notification_driver
+#driver =
+
+# A URL representing the messaging driver to use for
+# notifications. If not set, we fall back to the same
+# configuration used for RPC. (string value)
+# Deprecated group/name - [DEFAULT]/notification_transport_url
+#transport_url = <None>
+
+# AMQP topic used for OpenStack notifications. (list value)
+# Deprecated group/name - [rpc_notifier2]/topics
+# Deprecated group/name - [DEFAULT]/notification_topics
+#topics = notifications
+
+# The maximum number of attempts to re-send a notification
+# message which failed to be delivered due to a recoverable
+# error. 0 - No retry, -1 - indefinite (integer value)
+#retry = -1
+
[oslo_messaging_rabbit]
# The RabbitMQ broker address where a single node is used. (string value)
# Deprecated group/name - [DEFAULT]/rabbit_host
diff --git a/trove/rpc.py b/trove/rpc.py
index c2e419ed..81a9b2fb 100644
--- a/trove/rpc.py
+++ b/trove/rpc.py
@@ -39,6 +39,7 @@ from trove.common.rpc import serializer as sz
CONF = cfg.CONF
TRANSPORT = None
+NOTIFICATION_TRANSPORT = None
NOTIFIER = None
ALLOWED_EXMODS = [
@@ -49,22 +50,29 @@ EXTRA_EXMODS = []
def init(conf):
- global TRANSPORT, NOTIFIER
+ global TRANSPORT, NOTIFICATION_TRANSPORT, NOTIFIER
exmods = get_allowed_exmods()
TRANSPORT = messaging.get_rpc_transport(conf,
allowed_remote_exmods=exmods)
+ NOTIFICATION_TRANSPORT = messaging.get_notification_transport(
+ conf,
+ allowed_remote_exmods=exmods)
+
serializer = sz.TroveRequestContextSerializer(
messaging.JsonPayloadSerializer())
- NOTIFIER = messaging.Notifier(TRANSPORT, serializer=serializer)
+ NOTIFIER = messaging.Notifier(NOTIFICATION_TRANSPORT,
+ serializer=serializer)
def cleanup():
- global TRANSPORT, NOTIFIER
+ global TRANSPORT, NOTIFICATION_TRANSPORT, NOTIFIER
assert TRANSPORT is not None
+ assert NOTIFICATION_TRANSPORT is not None
assert NOTIFIER is not None
TRANSPORT.cleanup()
- TRANSPORT = NOTIFIER = None
+ NOTIFICATION_TRANSPORT.cleanup()
+ TRANSPORT = NOTIFICATION_TRANSPORT = NOTIFIER = None
def set_defaults(control_exchange):