From 14c1480df7430b9babad78786f91b9619674e264 Mon Sep 17 00:00:00 2001 From: Max Lamprecht Date: Wed, 27 Aug 2025 17:55:51 +0200 Subject: [PATCH] fix: add synchronisation during mount We observed that sometimes the backup share is mounted twice or more. This happens probably with multiple backup worker threads spawning at the same time. Closes-Bug: #2129925 Signed-off-by: Max Lamprecht Change-Id: I93a1549d3decc788955f831430649f770f46d268 --- cinder/backup/drivers/nfs.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cinder/backup/drivers/nfs.py b/cinder/backup/drivers/nfs.py index a3b9b1f69dd..b7f4428a2d2 100644 --- a/cinder/backup/drivers/nfs.py +++ b/cinder/backup/drivers/nfs.py @@ -26,6 +26,7 @@ from oslo_config import cfg from oslo_log import log as logging from cinder.backup.drivers import posix +from cinder import coordination from cinder import exception from cinder import interface from cinder import utils @@ -89,6 +90,7 @@ class NFSBackupDriver(posix.PosixBackupDriver): nfs_mount_point_base=self.backup_mount_point_base, nfs_mount_options=self.mount_options) + @coordination.synchronized('mount-nfs-share') @utils.retry( (brick_exception.BrickException, putils.ProcessExecutionError), retries=CONF.backup_mount_attempts)