Unable to delete backups in error state

Bug #1162908 reported by John Griffith
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Undecided
stephen mulcahy

Bug Description

Attempts to perform "cinder backup-delete" on a backup in error state causes the status to be changed to "available" and subsequent delete call results in a trace.

To reproduce:

shutdown the cinder-backup service
attempt to create a backup of a volume and watch it time out appropriately waiting for the service to respond
Then, start the service
Attempt to delete the backup that is now listed in error state

Traceback (most recent call last):
  File "/opt/stack/cinder/cinder/openstack/common/rpc/amqp.py", line 430, in _process_data
    rval = self.proxy.dispatch(ctxt, version, method, **args)
  File "/opt/stack/cinder/cinder/openstack/common/rpc/dispatcher.py", line 133, in dispatch
    return getattr(proxyobj, method)(ctxt, **kwargs)
  File "/opt/stack/cinder/cinder/backup/manager.py", line 248, in delete_backup
    raise exception.InvalidBackup(reason=err)
InvalidBackup: Invalid backup: delete_backup aborted, the backup service currently configured [cinder.backup.services.swift] is not the backup service that was used to create this backup [None]

This is a good check to have, but we need some method of deleting failed backups regardless of the service that created them, at least in the case of failed backups.

Changed in cinder:
assignee: nobody → stephen mulcahy (stephen-mulcahy)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

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

Changed in cinder:
status: New → In Progress
Revision history for this message
stephen mulcahy (stephen-mulcahy) wrote :

To reproduce this, both the cinder-backup service and rabbitmq need to be stopped while creating the test backup.

If rabbitmq is running during this - when cinder-backup is restarted after the test backup has been created, the Service is set on the backup before it enters the error state.

In that case, backup deletion works as expected.

So this is an edge case, but should be fixed nonetheless.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/26205
Committed: http://github.com/openstack/cinder/commit/d38759570a5cdaf26ff48c6fd8a6b0242d74e80b
Submitter: Jenkins
Branch: master

commit d38759570a5cdaf26ff48c6fd8a6b0242d74e80b
Author: Stephen Mulcahy <email address hidden>
Date: Thu Apr 4 16:10:16 2013 +0000

    Allow deletion of backups where the service is None

    If a backup is created while both cinder-backup and rabbitmq
    are not running, backup records are created in the database with a
    service entry of None.

    There is no actual backup data created on the service, since the service
    isn't running. This fix allows removal of these records without an error
    when a delete backup request is received.

    This fix also ensures backup status is set to error in the event of
    an exception during a delete.

    Fixes bug #1162908

    Change-Id: I5771747a00a70621f7cc101f8c1da2f613e83cdf

Changed in cinder:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in cinder:
milestone: none → havana-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in cinder:
milestone: havana-1 → 2013.2
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.