Browse code

Add NOVA_NOTIFICATION_FORMAT variable

Nova change https://review.opendev.org/603079/ changed the
default configuration to send only unversioned notfications rather
than both versioned and unversioned notifications. This could break
unsuspecting downstream projects (like Watcher) whose CI jobs are
not explicitly configuring nova for the types of notifications
they need but are just relying on getting both per the previous
default of the config option.

This adds a variable which defaults to "unversioned" to match the
nova default but allows downstream CI jobs to easily configure
another value.

Needed by https://review.opendev.org/663332/

Change-Id: Ied9d50b07c368d5c2be658c744f340a8d1ee41e0

Matt Riedemann authored on 2019/06/04 05:08:09
Showing 1 changed files
... ...
@@ -187,6 +187,10 @@ NOVA_USE_SERVICE_TOKEN=$(trueorfalse False NOVA_USE_SERVICE_TOKEN)
187 187
 ISCSID_DEBUG=$(trueorfalse False ISCSID_DEBUG)
188 188
 ISCSID_DEBUG_LEVEL=${ISCSID_DEBUG_LEVEL:-4}
189 189
 
190
+# Format for notifications. Nova defaults to "unversioned" since Train.
191
+# Other options include "versioned" and "both".
192
+NOVA_NOTIFICATION_FORMAT=${NOVA_NOTIFICATION_FORMAT:-unversioned}
193
+
190 194
 # Functions
191 195
 # ---------
192 196
 
... ...
@@ -535,6 +539,7 @@ function create_nova_conf {
535 535
     # enable notifications, but it will allow them to function when enabled.
536 536
     iniset $NOVA_CONF oslo_messaging_notifications driver "messagingv2"
537 537
     iniset $NOVA_CONF oslo_messaging_notifications transport_url $(get_notification_url)
538
+    iniset $NOVA_CONF notifications notification_format "$NOVA_NOTIFICATION_FORMAT"
538 539
     iniset_rpc_backend nova $NOVA_CONF
539 540
 
540 541
     iniset $NOVA_CONF DEFAULT osapi_compute_workers "$API_WORKERS"