Reviewed: https://review.opendev.org/c/openstack/nova/+/858129 Committed: https://opendev.org/openstack/nova/commit/f9fa785fa809d6ffbb93dc4eec0c1b4955bfec20 Submitter: "Zuul (22348)" Branch: master
commit f9fa785fa809d6ffbb93dc4eec0c1b4955bfec20 Author: Rajesh Tailor <[email protected]> Date: Fri Sep 16 17:38:18 2022 +0530 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 ** Changed in: nova Status: In Progress => Fix Released -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to OpenStack Compute (nova). https://bugs.launchpad.net/bugs/1989894 Title: extend_volume for libvirt / fc volumes fails due to faulty debug code Status in OpenStack Compute (nova): Fix Released Bug description: This is same bug as https://bugs.launchpad.net/nova/+bug/1936439 but for fibrechannel volume Python module nova/virt/libvirt/volume/fibrechannel.py has the following code: def extend_volume(self, connection_info, instance, requested_size): """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'], new_size, instance=instance) return new_size There is some logs from openstack-nove-compute service while extend FC volume: Sep 15, 2022 @ 18:51:56.000 Extend volume failed, volume_id=451af333-e991-450b-ad96-f8bf80758bef, reason: 'device_path' Sep 15, 2022 @ 18:51:56.000 Exception during message handling Traceback (most recent call last):, File "/usr/lib/python3.6/site- packages/oslo_messaging/rpc/server.py", line 165, in _process_incoming, res = self.dispatcher.dispatch(message), File "/usr/lib/python3.6/site-packages/oslo_messaging/rpc/dispatcher.py", line 309, in dispatch, return self._do_dispatch(endpoint, method, ctxt, args), File "/usr/lib/python3.6/site- packages/oslo_messaging/rpc/dispatcher.py", line 229, in _do_dispatch, result = func(ctxt, **new_args), File "/usr/lib/python3.6/site- packages/nova/exception_wrapper.py", line 72, in wrapped, context, exc, binary), File "/usr/lib/python3.6/site- packages/oslo_utils/excutils.py", line 227, in exit, self.force_reraise(), File "/usr/lib/python3.6/site- packages/oslo_utils/excutils.py", line 200, in force_reraise, raise self.value, File "/usr/lib/python3.6/site- packages/nova/exception_wrapper.py", line 63, in wrapped, return f(self, context, *args, **kw), File "/usr/lib/python3.6/site- packages/nova/compute/manager.py", line 10452, in external_instance_event, self.extend_volume(context, instance, event.tag), File "/usr/lib/python3.6/site- packages/nova/compute/utils.py", line 1434, in decorated_function, return function(self, context, *args, **kwargs), File "/usr/lib/python3.6/site-packages/nova/compute/manager.py", line 212, in decorated_function, kwargs['instance'], e, sys.exc_info()), File "/usr/lib/python3.6/site-packages/oslo_utils/excutils.py", line 227, in exit, self.force_reraise(), File "/usr/lib/python3.6/site- packages/oslo_utils/excutils.py", line 200, in force_reraise, raise self.value, File "/usr/lib/python3.6/site- packages/nova/compute/manager.py", line 200, in decorated_function, return function(self, context, *args, **kwargs), File "/usr/lib/python3.6/site-packages/nova/compute/manager.py", line 10310, in extend_volume, bdm.volume_size * units.Gi), File "/usr/lib/python3.6/site-packages/nova/virt/libvirt/driver.py", line 2655, in extend_volume, requested_size), File "/usr/lib/python3.6/site-packages/nova/virt/libvirt/driver.py", line 1871, in _extend_volume, requested_size), File "/usr/lib/python3.6/site- packages/nova/virt/libvirt/volume/fibrechannel.py", line 83, in extend_volume, # connection_info['data']['device_path'],, KeyError: 'device_path' And this is fix (like in ISCSI bug) that worked for me with FC: def extend_volume(self, connection_info, instance, requested_size): """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", LOG.debug("Extend FC Volume new_size=%s", # connection_info['data']['device_path'], new_size, instance=instance) return new_size To manage notifications about this bug go to: https://bugs.launchpad.net/nova/+bug/1989894/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : [email protected] Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp

