concurrent backups of the same volume are possible
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Cinder |
Triaged
|
Medium
|
Unassigned | ||
Kilo |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
In the cinder backup API create method, there is a window between the check on volume state at
https:/
and the change of volume state to 'backing-up' at
https:/
in which multiple requests to backup the same available volume may enter. They will then all successfully set volume state
to 'backing-up' and proceed concurrently, despite the apparent intention of the original check at line 131 to not allow
a backup of a volume already being backed up.
We can see this if we insert a time.sleep(30) immediately before the
self.
line, restart the api process, and issue a command like the
following:
$ cinder backup-create 077e385f-
If we then run 'cinder backup-list' we see these backups on the same volume running concurrently. We've just magnified a race window that is already there.
Changed in cinder: | |
importance: | Undecided → Medium |
Changed in cinder: | |
assignee: | nobody → Lei Zhang (redheadflyundershadow) |
Changed in cinder: | |
assignee: | Gorka Eguileor (gorka) → Vivek Dhayaal (vivekdhayaal) |
Fix proposed to branch: master /review. openstack. org/202914
Review: https:/