From d402c6fbab6db4cc80e9075f683b80adb2c7368c Mon Sep 17 00:00:00 2001 From: Eric Harney Date: Mon, 18 Jul 2022 15:51:18 -0400 Subject: [PATCH] NFS: Use Volume attr instead of dict compat for lock Use Volume.id instead of volume[id]. Change-Id: I951179c3abb5b4a40d2ae08765e2a1055f1975c2 --- cinder/volume/drivers/nfs.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cinder/volume/drivers/nfs.py b/cinder/volume/drivers/nfs.py index 2ef4cb42e8d..dea9b511123 100644 --- a/cinder/volume/drivers/nfs.py +++ b/cinder/volume/drivers/nfs.py @@ -536,13 +536,13 @@ class NfsDriver(remotefs.RemoteFSSnapDriverDistributed): self._stats = data - @coordination.synchronized('{self.driver_prefix}-{volume[id]}') + @coordination.synchronized('{self.driver_prefix}-{volume.id}') def create_volume(self, volume): """Apply locking to the create volume operation.""" return super(NfsDriver, self).create_volume(volume) - @coordination.synchronized('{self.driver_prefix}-{volume[id]}') + @coordination.synchronized('{self.driver_prefix}-{volume.id}') def delete_volume(self, volume): """Deletes a logical volume."""