From 33a166e4ea83195d71c9bedacb56f16dd3c5af0c Mon Sep 17 00:00:00 2001 From: Maksim Malchuk Date: Thu, 1 Feb 2024 22:59:07 +0300 Subject: [PATCH] Fix 'cinder-backup' service when Swift with TLS enabled The 'backup_swift_ca_cert_file' [1] setting is ignored by the Swift backup driver so 'cinder-backup' service will appear "down" early on startup when TLS backend used. This change fixes the issue. 1. https://docs.openstack.org/cinder/latest/configuration/block-storage/backup/swift-backup-driver.html Closes-Bug: #2051985 Change-Id: Idec29ce596438a7969ea32d48bacfede84f5b0b6 Signed-off-by: Maksim Malchuk (cherry picked from commit e99afcafe8d33624b9a695b1f7576ad0e8e5354f) (cherry picked from commit 1e52602646c8b7cdc616659777563847fe53ada0) (cherry picked from commit 22e6866f66748df3dbf347d48fc4b6f55ded847b) --- cinder/backup/drivers/swift.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cinder/backup/drivers/swift.py b/cinder/backup/drivers/swift.py index e1afe705376..431f3e20076 100644 --- a/cinder/backup/drivers/swift.py +++ b/cinder/backup/drivers/swift.py @@ -449,7 +449,8 @@ def check_for_setup_error(self): "possible we could have problems because of it.") return conn = swift.Connection(retries=CONF.backup_swift_retry_attempts, - preauthurl=CONF.backup_swift_url) + preauthurl=CONF.backup_swift_url, + cacert=CONF.backup_swift_ca_cert_file) try: conn.get_capabilities() # TODO(e0ne) catch less general exception