cinder failed to create a backup with NFS driver

Bug #1247743 reported by Yogev Rabl on 2013-11-04
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Cinder
Undecided
Jeff Applewhite

Bug Description

Description of problem:
The action cinder backup-create fails when trying to backup a newly created volume.

- The Cinder is using the cinder.volume.drivers.nfs.NfsDriver driver.
- All the other OS components are installed on 1 host and the cinder on a different host.

Version-Release number of selected component (if applicable):
openstack-cinder-2013.2-1.el6ost.noarch

How reproducible:
evevrytime

Steps to Reproduce:
1. create a volume
2. backup the volume
3.

Actual results:
the backup failed

Expected results:
the backup is available

Additional info:

2013-11-04 09:14:04.278 15089 ERROR cinder.openstack.common.rpc.amqp [req-2ae3d45e-40c6-4422-be59-1bba466f086c c7fdf6f628554d56aad363ad501ce412 add3de2deaa445c1a1e71c1721bc8976] Exception during message handling
2013-11-04 09:14:04.278 15089 TRACE cinder.openstack.common.rpc.amqp Traceback (most recent call last):
2013-11-04 09:14:04.278 15089 TRACE cinder.openstack.common.rpc.amqp File "/usr/lib/python2.6/site-packages/cinder/openstack/common/rpc/amqp.py", line 441, in _process_data
2013-11-04 09:14:04.278 15089 TRACE cinder.openstack.common.rpc.amqp **args)
2013-11-04 09:14:04.278 15089 TRACE cinder.openstack.common.rpc.amqp File "/usr/lib/python2.6/site-packages/cinder/openstack/common/rpc/dispatcher.py", line 148, in dispatch
2013-11-04 09:14:04.278 15089 TRACE cinder.openstack.common.rpc.amqp return getattr(proxyobj, method)(ctxt, **kwargs)
2013-11-04 09:14:04.278 15089 TRACE cinder.openstack.common.rpc.amqp File "/usr/lib/python2.6/site-packages/cinder/utils.py", line 808, in wrapper
2013-11-04 09:14:04.278 15089 TRACE cinder.openstack.common.rpc.amqp return func(self, *args, **kwargs)
2013-11-04 09:14:04.278 15089 TRACE cinder.openstack.common.rpc.amqp File "/usr/lib/python2.6/site-packages/cinder/backup/manager.py", line 270, in create_backup
2013-11-04 09:14:04.278 15089 TRACE cinder.openstack.common.rpc.amqp 'fail_reason': unicode(err)})
2013-11-04 09:14:04.278 15089 TRACE cinder.openstack.common.rpc.amqp File "/usr/lib64/python2.6/contextlib.py", line 23, in __exit__
2013-11-04 09:14:04.278 15089 TRACE cinder.openstack.common.rpc.amqp self.gen.next()
2013-11-04 09:14:04.278 15089 TRACE cinder.openstack.common.rpc.amqp File "/usr/lib/python2.6/site-packages/cinder/backup/manager.py", line 263, in create_backup
2013-11-04 09:14:04.278 15089 TRACE cinder.openstack.common.rpc.amqp backup_service)
2013-11-04 09:14:04.278 15089 TRACE cinder.openstack.common.rpc.amqp File "/usr/lib/python2.6/site-packages/cinder/volume/drivers/nfs.py", line 352, in backup_volume
2013-11-04 09:14:04.278 15089 TRACE cinder.openstack.common.rpc.amqp raise NotImplementedError()
2013-11-04 09:14:04.278 15089 TRACE cinder.openstack.common.rpc.amqp NotImplementedError
2013-11-04 09:14:04.278 15089 TRACE cinder.openstack.common.rpc.amqp

tags: added: nfs
Changed in cinder:
assignee: nobody → Glenn M. Gobeli (ggobeli)
Changed in cinder:
assignee: Glenn M. Gobeli (ggobeli) → Jeff Applewhite (japplewhite)
Jeff Applewhite (ajeffrey) wrote :

deleting lines 369-375 in cinder/volume/drivers/nfs.py fixes this bug and after removing these lines the inherited methods succeed in creating a backup and in restoring it.

Jeff Applewhite (ajeffrey) wrote :

the code removed in the above test was:

# def backup_volume(self, context, backup, backup_service):
# """Create a new backup from an existing volume."""
# raise NotImplementedError()

# def restore_backup(self, context, backup, volume, backup_service):
# """Restore an existing backup to a new or existing volume."""
# raise NotImplementedError()

Mike Perez (thingee) on 2013-12-12
tags: added: drivers

Fix proposed to branch: master
Review: https://review.openstack.org/70194

Changed in cinder:
status: New → In Progress

Fix proposed to branch: master
Review: https://review.openstack.org/70201

Changed in cinder:
assignee: Jeff Applewhite (ajeffrey) → Eric Harney (eharney)
Eric Harney (eharney) on 2014-02-08
Changed in cinder:
assignee: Eric Harney (eharney) → Jeff Applewhite (ajeffrey)

Reviewed: https://review.openstack.org/70201
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=10108f4d2e640a9fc12037ece39a833421d27149
Submitter: Jenkins
Branch: master

commit 10108f4d2e640a9fc12037ece39a833421d27149
Author: Jeff Applewhite <email address hidden>
Date: Thu Jan 30 14:11:08 2014 -0500

    Fixes cinder failed to create/restore a backup with NFS driver

    The action cinder backup-create fails when trying to backup a newly
    created volume when using cinder.volume.drivers.nfs.NfsDriver. This
    patch removes not implemented stubs for backup_volume and
    restore_volume. The inherited methods in cinder/volume/driver.py
    succeed in creating a backup and in restoring it. After manual
    testing of this change backups/restores succeed without the not
    implemented stubs. This change also adds the not implemented
    stubs to the glusterfs driver until a fix is submitted.

    Closes-Bug: #1247743

    Change-Id: I5478d00442ce855c91a7f04c5ba2b40733d44902

Changed in cinder:
status: In Progress → Fix Committed
tags: added: backup

Reviewed: https://review.openstack.org/72036
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=41e3a94ae18a9219ff4ab10389f3a7799c9b6493
Submitter: Jenkins
Branch: master

commit 41e3a94ae18a9219ff4ab10389f3a7799c9b6493
Author: Eric Harney <email address hidden>
Date: Fri Feb 7 12:58:35 2014 -0500

    GlusterFS: Fix create/restore backup

    Allow create_backup for GlusterFS volumes, but
    only when snapshots do not exist. (For now.)

    Restore is a no-op for the driver, so allow it.

    Related-Bug: 1247743
    Closes-Bug: 1275977

    Change-Id: I50b8f6cac684c967c7374bb43247a396ce936157

tags: added: havana-backport-potential
Thierry Carrez (ttx) on 2014-03-05
Changed in cinder:
milestone: none → icehouse-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2014-04-17
Changed in cinder:
milestone: icehouse-3 → 2014.1
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers