race in restore to new volume
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Cinder |
Invalid
|
Undecided
|
Unassigned |
Bug Description
def restore(self, context, backup_id, volume_id=None):
"""Make the RPC call to restore a volume backup."""
backup = self.get(context, backup_id)
if backup['status'] != 'available':
msg = _('Backup status must be available')
raise exception.
size = backup['size']
if size is None:
msg = _('Backup to be restored has invalid size')
raise exception.
# Create a volume if none specified. If a volume is specified check
# it is large enough for the backup
if volume_id is None:
name = 'restore_backup_%s' % backup_id
volume = self.volume_
while True:
if volume['status'] != 'creating':
else:
volume = self.volume_
if volume['status'] != "available":
msg = _('Volume to be restored to must be available')
raise exception.
If we're doing a restore to a new volume, we can come in and attach here, causing things to go messy in the restore code.
Closing stale bug. If this is still an issue please reopen.