← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1989894] [NEW] extend_volume for libvirt / fc volumes fails due to faulty debug code

 

Public bug reported:

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

** Affects: nova
     Importance: Undecided
         Status: New


** Tags: extend fibrechannel nova volume

-- 
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):
  New

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



Follow ups