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 <mark.mielke@gmail.com>
This commit is contained in:
Mark Mielke 2021-07-15 18:34:36 -04:00
parent 3545356ae3
commit ad60f23be3
1 changed files with 1 additions and 2 deletions

View File

@ -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