From 56fc332608028ba4c671255e8bd9223a0bae762d Mon Sep 17 00:00:00 2001 From: Ben Nemec Date: Tue, 22 Dec 2020 19:34:16 +0000 Subject: [PATCH] Fix type of direct_mandatory_flag opt An IntOpt with a default of True is invalid. I'm a little surprised this doesn't fail a defaults check somewhere, but it needs to be fixed regardless. Looking at where it is used, it appears the boolean type is correct. This just changes the opt type to BoolOpt to match. Conflicts: oslo_messaging/_drivers/impl_rabbit.py NOTE(hberaud): Conflicts are due to a patch [1][2] not yet backported on train and which added a new option on other branches. [1] https://opendev.org/openstack/oslo.messaging/commit/196fa877a90d7eb0f82ec9e1c194eef3f98fc0b1 [2] https://review.opendev.org/c/openstack/oslo.messaging/+/747892 Change-Id: I01a38754a31c891f2b3b9c7f8135690693df5d13 Closes-Bug: 1909036 (cherry picked from commit b8f8b17030e93f6fe64e986ebae1de4011f007d5) (cherry picked from commit a0329a3f86e8bf275dd4e16c1f354911a6ff2eb6) (cherry picked from commit 3bf9ba550454719f1d56dbbf8bccbabab11a16f6) --- oslo_messaging/_drivers/impl_rabbit.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/oslo_messaging/_drivers/impl_rabbit.py b/oslo_messaging/_drivers/impl_rabbit.py index 8aac4d6fa..3a50f992e 100644 --- a/oslo_messaging/_drivers/impl_rabbit.py +++ b/oslo_messaging/_drivers/impl_rabbit.py @@ -168,12 +168,12 @@ rabbit_opts = [ default=2, help='How often times during the heartbeat_timeout_threshold ' 'we check the heartbeat.'), - cfg.IntOpt('direct_mandatory_flag', - default=True, - help='Enable/Disable the RabbitMQ mandatory flag ' - 'for direct send. The direct send is used as reply,' - 'so the MessageUndeliverable exception is raised' - ' in case the client queue does not exist.'), + cfg.BoolOpt('direct_mandatory_flag', + default=True, + help='Enable/Disable the RabbitMQ mandatory flag ' + 'for direct send. The direct send is used as reply, ' + 'so the MessageUndeliverable exception is raised ' + 'in case the client queue does not exist.'), ] LOG = logging.getLogger(__name__)