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>
This commit is contained in:
parent
ea5a9c35ea
commit
8819a1d6b4
|
@ -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)
|
||||
|
||||
|
|
|
@ -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'
|
||||
'volume’s 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
|
||||
|
||||
|
|
Loading…
Reference in New Issue