From b57757ae14a54e78ebd533198564d24af77c51da Mon Sep 17 00:00:00 2001 From: Matt Riedemann Date: Mon, 3 Jun 2019 16:08:09 -0400 Subject: [PATCH] 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 --- lib/nova | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/nova b/lib/nova index 6ce1dcc4cc..7d66b68cfb 100644 --- a/lib/nova +++ b/lib/nova @@ -187,6 +187,10 @@ NOVA_USE_SERVICE_TOKEN=$(trueorfalse False NOVA_USE_SERVICE_TOKEN) ISCSID_DEBUG=$(trueorfalse False ISCSID_DEBUG) ISCSID_DEBUG_LEVEL=${ISCSID_DEBUG_LEVEL:-4} +# Format for notifications. Nova defaults to "unversioned" since Train. +# Other options include "versioned" and "both". +NOVA_NOTIFICATION_FORMAT=${NOVA_NOTIFICATION_FORMAT:-unversioned} + # Functions # --------- @@ -535,6 +539,7 @@ function create_nova_conf { # enable notifications, but it will allow them to function when enabled. iniset $NOVA_CONF oslo_messaging_notifications driver "messagingv2" iniset $NOVA_CONF oslo_messaging_notifications transport_url $(get_notification_url) + iniset $NOVA_CONF notifications notification_format "$NOVA_NOTIFICATION_FORMAT" iniset_rpc_backend nova $NOVA_CONF iniset $NOVA_CONF DEFAULT osapi_compute_workers "$API_WORKERS"