Cinder failed to create a backup from snapshot with NFS volume driver

Bug #1888951 reported by Alex Deiter
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Undecided
Alex Deiter

Bug Description

Following are the steps to reproduce the issue:

0. Deploy DevStack Master

1. Configure a NFS backend for Cinder volume service:

/etc/cinder/cinder.conf:
[DEFAULT]
default_volume_type = nfs
enabled_backends = nfs

[nfs]
volume_driver = cinder.volume.drivers.nfs.NfsDriver
volume_backend_name = nfs
nfs_snapshot_support = True
nas_host = 10.3.35.41
nas_share_path = /volumes/pool1/nas

2. Configure a NFS backend for Cinder backup service:

/etc/cinder/cinder.conf:

[DEFAULT]
backup_driver = cinder.backup.drivers.nfs.NFSBackupDriver
backup_share = 10.3.35.43:/volumes/pool1/backup

3. Create a volume:
$ cinder create --volume-type nfs 1

4. Create a snapshot for the volume:
$ cinder snapshot-create afca7d24-e90e-410f-8e9f-ffd3ac8a4a19

5. Try to backup the volume using the snapshot:
$ cinder backup-create --snapshot-id 4daa8f03-43e7-4e2d-a688-a2beb675ac4f afca7d24-e90e-410f-8e9f-ffd3ac8a4a19

Expected result:
Success

Actual result:
Backup failed with error state.

Cinder volume service log:
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/oslo_messaging/rpc/server.py", line 165, in _process_incoming
    res = self.dispatcher.dispatch(message)
  File "/usr/local/lib/python3.6/dist-packages/oslo_messaging/rpc/dispatcher.py", line 273, in dispatch
    return self._do_dispatch(endpoint, method, ctxt, args)
  File "/usr/local/lib/python3.6/dist-packages/oslo_messaging/rpc/dispatcher.py", line 193, in _do_dispatch
    result = func(ctxt, **new_args)
  File "/opt/stack/cinder/cinder/volume/manager.py", line 4455, in get_backup_device
    self.driver.get_backup_device(ctxt, backup))
  File "/opt/stack/cinder/cinder/volume/driver.py", line 1203, in get_backup_device
    context, backup)
  File "/opt/stack/cinder/cinder/volume/driver.py", line 1231, in _get_backup_volume_temp_volume
    context, volume, snapshot)
  File "/opt/stack/cinder/cinder/volume/driver.py", line 1368, in _create_temp_volume_from_snapshot
    temp_vol_ref.destroy()
  File "/usr/local/lib/python3.6/dist-packages/oslo_utils/excutils.py", line 220, in __exit__
    self.force_reraise()
  File "/usr/local/lib/python3.6/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise
    six.reraise(self.type_, self.value, self.tb)
  File "/usr/local/lib/python3.6/dist-packages/six.py", line 703, in reraise
    raise value
  File "/opt/stack/cinder/cinder/volume/driver.py", line 1363, in _create_temp_volume_from_snapshot
    snapshot)
  File "<decorator-gen-735>", line 2, in create_volume_from_snapshot
  File "/opt/stack/cinder/cinder/coordination.py", line 151, in _synchronized
    return f(*a, **k)
  File "/opt/stack/cinder/cinder/volume/drivers/remotefs.py", line 1884, in create_volume_from_snapshot
    return self._create_volume_from_snapshot(volume, snapshot)
  File "/opt/stack/cinder/cinder/volume/drivers/remotefs.py", line 1384, in _create_volume_from_snapshot
    raise exception.InvalidSnapshot(msg)
cinder.exception.InvalidSnapshot: Snapshot status must be "available" to clone. But is: backing-up

Alex Deiter (deiter)
Changed in cinder:
assignee: nobody → Alex Deiter (deiter)
summary: - Cinder failed to create a backup from snapshot with NFS driver
+ Cinder failed to create a backup from snapshot with NFS volume driver
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/743040

Changed in cinder:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.opendev.org/743040
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=a21bf41413b8e5b56c1a61460039ec7609f45042
Submitter: Zuul
Branch: master

commit a21bf41413b8e5b56c1a61460039ec7609f45042
Author: Alex Deiter <email address hidden>
Date: Sat Jul 25 18:18:14 2020 +0000

    Fixed an issue with creating a backup from snapshot with NFS volume driver.

    Change-Id: Ib198372bf3e125a88d607c71377c95a24ab584ad
    Closes-Bug: 1888951

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

This issue was fixed in the openstack/cinder 18.0.0.0b1 development milestone.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/cinder 17.1.0

This issue was fixed in the openstack/cinder 17.1.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/cinder 16.3.0

This issue was fixed in the openstack/cinder 16.3.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/cinder 15.5.0

This issue was fixed in the openstack/cinder 15.5.0 release.

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.