Merge "Creating image-volume cache on NFS backend fails"
This commit is contained in:
commit
cb52912eb6
@ -280,7 +280,9 @@ class RemoteFsSnapDriverTestCase(test.TestCase):
|
||||
exp_acceptable_states = ['available', 'in-use', 'backing-up']
|
||||
if tmp_snap:
|
||||
exp_acceptable_states.append('downloading')
|
||||
self._fake_snapshot.id = 'tmp-snap-%s' % self._fake_snapshot.id
|
||||
self._fake_snapshot.volume.status = 'downloading'
|
||||
display_name = 'tmp-snap-%s' % self._fake_snapshot.id
|
||||
self._fake_snapshot.display_name = display_name
|
||||
|
||||
if volume_in_use:
|
||||
self._fake_snapshot.volume.status = 'backing-up'
|
||||
@ -315,6 +317,9 @@ class RemoteFsSnapDriverTestCase(test.TestCase):
|
||||
self._driver._create_snapshot,
|
||||
self._fake_snapshot)
|
||||
|
||||
def test_create_snapshot_w_image_caching(self):
|
||||
self._test_create_snapshot(tmp_snap=True)
|
||||
|
||||
@mock.patch('cinder.db.snapshot_get')
|
||||
@mock.patch('time.sleep')
|
||||
def test_create_snapshot_online_with_concurrent_delete(
|
||||
|
@ -1440,7 +1440,7 @@ class RemoteFSSnapDriverBase(RemoteFSDriver):
|
||||
status = snapshot.volume.status
|
||||
|
||||
acceptable_states = ['available', 'in-use', 'backing-up']
|
||||
if snapshot.id.startswith('tmp-snap-'):
|
||||
if snapshot.display_name.startswith('tmp-snap-'):
|
||||
# This is an internal volume snapshot. In order to support
|
||||
# image caching, we'll allow creating/deleting such snapshots
|
||||
# while having volumes in 'downloading' state.
|
||||
|
@ -0,0 +1,6 @@
|
||||
---
|
||||
fixes:
|
||||
- |
|
||||
`Bug #1875570 <https://bugs.launchpad.net/cinder/+bug/1875570>`:
|
||||
Fixed issue with NFS backend where the image-volume cache was
|
||||
never used to create a volume, even when the cache was enabled.
|
Loading…
x
Reference in New Issue
Block a user