RemoteFS: Use dest vol id instead of source id in snapshot temp name

Use the destination volume id instead of the source volume id
in the temporary snapshot file name.  This is likely not strictly
needed after Change I64e041fe, which ensures that multiple clone
volume operations won't run simultaneously from the same source
volume, but is still a good idea to ensure that there is less
that can go wrong in a failure scenario.

Change-Id: I5bd185d04dbda673a5882d61aaab7acdd99b74a6
Related-Bug: #1851512
Closes-Bug: #1840712
This commit is contained in:
David Hill 2019-08-19 16:28:45 -04:00 committed by Eric Harney
parent 7cc2e402f9
commit f3ed9d436b
2 changed files with 2 additions and 2 deletions

View File

@ -644,7 +644,7 @@ class RemoteFsSnapDriverTestCase(test.TestCase):
'status': fields.SnapshotStatus.CREATING,
'progress': '0%',
'volume_size': src_vref.size,
'display_name': 'tmp-snap-%s' % src_vref['id'],
'display_name': 'tmp-snap-%s' % volume.id,
'display_description': None,
'volume_type_id': src_vref.volume_type_id,
'encryption_key_id': None,

View File

@ -1058,7 +1058,7 @@ class RemoteFSSnapDriverBase(RemoteFSDriver):
'status': fields.SnapshotStatus.CREATING,
'progress': '0%',
'volume_size': src_vref.size,
'display_name': 'tmp-snap-%s' % src_vref.id,
'display_name': 'tmp-snap-%s' % volume.id,
'display_description': None,
'volume_type_id': src_vref.volume_type_id,
'encryption_key_id': src_vref.encryption_key_id,