From ad60f23be3d562422b350aade04aa92ade39fb32 Mon Sep 17 00:00:00 2001 From: Mark Mielke Date: Thu, 15 Jul 2021 18:34:36 -0400 Subject: [PATCH] extend_volume of libvirt/volume/iscsi 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: #1936439 Change-Id: Id0539d2ee909d86ffef07ae566697db8ae0f83b4 Signed-off-by: Mark Mielke --- nova/virt/libvirt/volume/iscsi.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/nova/virt/libvirt/volume/iscsi.py b/nova/virt/libvirt/volume/iscsi.py index 9eb08b0a9063..ff7b6b8022ee 100644 --- a/nova/virt/libvirt/volume/iscsi.py +++ b/nova/virt/libvirt/volume/iscsi.py @@ -84,7 +84,6 @@ class LibvirtISCSIVolumeDriver(libvirt_volume.LibvirtBaseVolumeDriver): """Extend the volume.""" LOG.debug("calling os-brick to extend iSCSI Volume", instance=instance) new_size = self.connector.extend_volume(connection_info['data']) - LOG.debug("Extend iSCSI Volume %s; new_size=%s", - connection_info['data']['device_path'], + LOG.debug("Extend iSCSI Volume: new_size=%s", new_size, instance=instance) return new_size