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
This commit is contained in:
Rajesh Tailor
2022-09-16 17:38:18 +05:30
committed by Mikhail Stolyarov
parent 797779688f
commit f9fa785fa8
+1 -2
View File
@@ -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