From f9fa785fa809d6ffbb93dc4eec0c1b4955bfec20 Mon Sep 17 00:00:00 2001 From: Rajesh Tailor Date: Fri, 16 Sep 2022 17:38:18 +0530 Subject: [PATCH] extend_volume of libvirt/volume/fc should not use device_path The connection_info['data']['device_path'] field is not always available. In cases that it was not available, it would cause the debug code to raise a KeyError instead of proceeding. Other similar debug messages in the same file do not include device_path. As a simple fix, just drop the device_path from the log. Closes-Bug: #1989894 Change-Id: I4218fb39ce80800be8c95da7132b3b74226ad10a --- nova/virt/libvirt/volume/fibrechannel.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/nova/virt/libvirt/volume/fibrechannel.py b/nova/virt/libvirt/volume/fibrechannel.py index b50db3aa1c0c..22c65e99c09d 100644 --- a/nova/virt/libvirt/volume/fibrechannel.py +++ b/nova/virt/libvirt/volume/fibrechannel.py @@ -79,7 +79,6 @@ class LibvirtFibreChannelVolumeDriver(libvirt_volume.LibvirtBaseVolumeDriver): """Extend the volume.""" LOG.debug("calling os-brick to extend FC Volume", instance=instance) new_size = self.connector.extend_volume(connection_info['data']) - LOG.debug("Extend FC Volume %s; new_size=%s", - connection_info['data']['device_path'], + LOG.debug("Extend FC Volume: new_size=%s", new_size, instance=instance) return new_size