Fix nits from RBD volume migration changes

This addresses some minor issues in
I01039b7651a354761d034a9118b55b96cf32445e

Change-Id: I98dbc1f843a99405f12b6b9d1d189e27f5cdce6c
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
(cherry picked from commit 8819a1d6b4)
This commit is contained in:
Sean McGinnis 2020-04-22 06:50:58 -05:00 committed by Xinliang Liu
parent bdf7579a5f
commit d3b1d5c4f0
2 changed files with 6 additions and 6 deletions

View File

@ -2311,7 +2311,7 @@ class RBDTestCase(test.TestCase):
self.assertEqual(3.00, total_provision)
def test_migrate_volume_bad_volume_status(self):
self.volume_a.status = 'backuping'
self.volume_a.status = 'backingup'
ret = self.driver.migrate_volume(context, self.volume_a, None)
self.assertEqual((False, None), ret)

View File

@ -1825,8 +1825,8 @@ class RBDDriver(driver.CloneableImageVD, driver.MigrateVD,
if volume.status not in ('available', 'retyping', 'maintenance',
'in-use'):
LOG.debug('Only available or in-use volumes can be migrated using'
'backend assisted migration. Falling back to generic'
LOG.debug('Only available or in-use volumes can be migrated using '
'backend assisted migration. Falling back to generic '
'migration.')
return refuse_to_migrate
@ -1867,12 +1867,12 @@ class RBDDriver(driver.CloneableImageVD, driver.MigrateVD,
return refuse_to_migrate
if rbd_pool == self.configuration.rbd_pool:
LOG.debug('Migration in the same pool, just need to update'
'volumes host value to destination host.')
LOG.debug('Migration in the same pool, just need to update '
"volume's host value to destination host.")
return (True, None)
if volume.status == 'in-use':
LOG.debug('Migration in-use volume between different pools.'
LOG.debug('Migration in-use volume between different pools. '
'Falling back to generic migration.')
return refuse_to_migrate