Infinidat Cinder driver fails to backup attached volume

Bug #1983287 reported by Alexander Deiter
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Low
Alexander Deiter

Bug Description

For some unknown reason, the Infinidat Cinder driver does not allow to backup the attached volume. This makes it impossible to backup for most use cases.

Steps to reproduce:
* Install an OpenStack environment: Queens or newer version
* Configure Infinidat iSCSI or FC backend
* Create a volume
* Boot a VM instance
* Attach the volume to the VM instance
* Try to backup the attached volume

Expected results:
Success

Actual results:
Error: INFINIDAT Cinder driver does not support clone of an attached volume. To get this done, create a snapshot from the attached volume and then create a volume from the snapshot.

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/oslo_messaging/rpc/server.py", line 165, in _pro
cess_incoming
    res = self.dispatcher.dispatch(message)
  File "/usr/local/lib/python3.8/dist-packages/oslo_messaging/rpc/dispatcher.py", line 309, in
dispatch
    return self._do_dispatch(endpoint, method, ctxt, args)
  File "/usr/local/lib/python3.8/dist-packages/oslo_messaging/rpc/dispatcher.py", line 229, in
_do_dispatch
    result = func(ctxt, **new_args)
  File "/opt/stack/cinder/cinder/volume/manager.py", line 4745, in get_backup_device
    self.driver.get_backup_device(ctxt, backup))
  File "/opt/stack/cinder/cinder/volume/driver.py", line 1194, in get_backup_device
    backup_device = self._get_backup_volume_temp_volume(
  File "/opt/stack/cinder/cinder/volume/driver.py", line 1236, in _get_backup_volume_temp_volume
    temp_vol_ref = self._create_temp_cloned_volume(
  File "/opt/stack/cinder/cinder/volume/driver.py", line 1348, in _create_temp_cloned_volume
    temp_vol_ref.destroy()
  File "/usr/local/lib/python3.8/dist-packages/oslo_utils/excutils.py", line 227, in __exit__
    self.force_reraise()
  File "/usr/local/lib/python3.8/dist-packages/oslo_utils/excutils.py", line 200, in force_reraise
    raise self.value
  File "/opt/stack/cinder/cinder/volume/driver.py", line 1343, in _create_temp_cloned_volume
    model_update = self.create_cloned_volume(temp_vol_ref, volume)
  File "/opt/stack/cinder/cinder/volume/drivers/infinidat.py", line 96, in wrapper
    return func(*args, **kwargs)
  File "/opt/stack/cinder/cinder/volume/drivers/infinidat.py", line 727, in create_cloned_volume
    self._asssert_volume_not_mapped(src_vref)
  File "/opt/stack/cinder/cinder/volume/drivers/infinidat.py", line 713, in _asssert_volume_not_mapped
    raise exception.VolumeBackendAPIException(data=msg)
cinder.exception.VolumeBackendAPIException: Bad or unexpected response from the storage volume backend API: INFINIDAT Cinder driver does not support clone of an attached volume. To get this done, create a snapshot from the attached volume and then create a volume from the snapshot.

Changed in cinder:
assignee: nobody → Alexander Deiter (adeiter)
status: New → In Progress
description: updated
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/cinder/+/851640

Changed in cinder:
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.opendev.org/c/openstack/cinder/+/851640
Committed: https://opendev.org/openstack/cinder/commit/907550015e0480fac3e69c5fc73f11f825723bf4
Submitter: "Zuul (22348)"
Branch: master

commit 907550015e0480fac3e69c5fc73f11f825723bf4
Author: Alexander Deiter <email address hidden>
Date: Mon May 23 21:36:35 2022 +0400

    Fix Infinidat driver to backup attached volume

    For some historical reason, the Infinidat Cinder driver does not
    allow to backup an attached volume. This makes it impossible to
    create a backup for most use cases. As a possible solution we can
    create and use snapshots as a backup source.

    This patch implements attach/detach for snapshots and the ability
    to use snapshots to perform non-disruptive backups.

    Added functions:
    * initialize_connection_snapshot()
    * terminate_connection_snapshot()
    * create_export_snapshot()
    * remove_export_snapshot()
    * backup_use_temp_snapshot()

    And changed functions:
    * create_volume_from_snapshot()
    * create_cloned_volume()

    remove the duplicated code and use the temporary snapshot
    as the source for creating the cloned volume.

    Closes-bug: #1983287
    Change-Id: I0e1534c6015eaa8baef48b7878324625a4cc9f1a
    Signed-off-by: Alexander Deiter <email address hidden>

Changed in cinder:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/cinder 22.0.0.0rc1

This issue was fixed in the openstack/cinder 22.0.0.0rc1 release candidate.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.