From dc55d64df989bdb5161ca8ad8d74115cc2959174 Mon Sep 17 00:00:00 2001 From: Thomas Goirand Date: Tue, 9 Apr 2024 11:49:38 +0200 Subject: [PATCH] Make oslo.messaging, magnum, and zaqar reproducible. Whilst working on the Reproducible Builds effort [0], we noticed that python-oslo.messaging could not be built reproducibly. This is because the documentation captures the hostname of the build system. [0] https://reproducible-builds.org/ This patch uses sample_default from oslo.config to fix this. Please accept this patch to fix oslo.messaging, magnum, and zaqar (at least, probably others). Change-Id: Ie8717e182f709cbddd645a356789e262b47646d3 --- oslo_messaging/_drivers/impl_rabbit.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/oslo_messaging/_drivers/impl_rabbit.py b/oslo_messaging/_drivers/impl_rabbit.py index fa9a68faf..98f79284e 100644 --- a/oslo_messaging/_drivers/impl_rabbit.py +++ b/oslo_messaging/_drivers/impl_rabbit.py @@ -246,8 +246,10 @@ rabbit_opts = [ default=False, help='Should we use consistant queue names or random ones'), cfg.StrOpt('hostname', + sample_default='node1.example.com', default=socket.gethostname(), - help='Hostname used by queue manager'), + help='Hostname used by queue manager. Defaults to the value ' + 'returned by socket.gethostname().'), cfg.StrOpt('processname', default=os.path.basename(sys.argv[0]), help='Process name used by queue manager'),