Merge "Don't migrate away from iscsi if it is the default"
This commit is contained in:
commit
35281912c3
|
@ -1546,6 +1546,12 @@ class Connection(api.Connection):
|
||||||
'force=true to override.')
|
'force=true to override.')
|
||||||
return 0, 0
|
return 0, 0
|
||||||
|
|
||||||
|
if CONF.default_deploy_interface == 'iscsi':
|
||||||
|
LOG.warning('The iscsi deploy interface is the default, will '
|
||||||
|
'not migrate nodes away from it. Run with '
|
||||||
|
'--option force=true to override.')
|
||||||
|
return 0, 0
|
||||||
|
|
||||||
if CONF.agent.image_download_source == 'swift':
|
if CONF.agent.image_download_source == 'swift':
|
||||||
LOG.warning('The direct deploy interface is using swift, will '
|
LOG.warning('The direct deploy interface is using swift, will '
|
||||||
'not migrate nodes to it. Run with --option '
|
'not migrate nodes to it. Run with --option '
|
||||||
|
|
|
@ -290,6 +290,14 @@ class MigrateFromIscsiTestCase(base.DbTestCase):
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
(0, 0), self.dbapi.migrate_from_iscsi_deploy(self.context, 0))
|
(0, 0), self.dbapi.migrate_from_iscsi_deploy(self.context, 0))
|
||||||
|
|
||||||
|
def test_migration_impossible3(self):
|
||||||
|
self.config(default_deploy_interface='iscsi')
|
||||||
|
for _i in range(3):
|
||||||
|
uuid = uuidutils.generate_uuid()
|
||||||
|
utils.create_test_node(uuid=uuid, deploy_interface='iscsi')
|
||||||
|
self.assertEqual(
|
||||||
|
(0, 0), self.dbapi.migrate_from_iscsi_deploy(self.context, 0))
|
||||||
|
|
||||||
def test_force_migration(self):
|
def test_force_migration(self):
|
||||||
self.config(enabled_deploy_interfaces='iscsi')
|
self.config(enabled_deploy_interfaces='iscsi')
|
||||||
utils.create_test_node(deploy_interface='direct')
|
utils.create_test_node(deploy_interface='direct')
|
||||||
|
|
Loading…
Reference in New Issue