summaryrefslogtreecommitdiff
path: root/ironic/db
diff options
context:
space:
mode:
authorMark Goddard <mark@stackhpc.com>2020-09-30 15:03:36 +0100
committerMark Goddard <mark@stackhpc.com>2020-09-30 15:03:59 +0100
commit42d83a2bff1e91abd961c817cd70e0e0ecfc82bc (patch)
tree466b24c7e1b3b8e11e909602dff099ddbde76e56 /ironic/db
parent2151d660d2156c5f75986fbebe2fc7f35b0de81b (diff)
downloadironic-42d83a2bff1e91abd961c817cd70e0e0ecfc82bc.tar.gz
Don't migrate away from iscsi if it is the default
We hit an issue in Kayobe CI where we have the following config: enabled_deploy_interfaces: iscsi,direct default_deploy_interface: iscsi In practice, direct does not work out of the box in Kayobe currently. The online migration added recently to move nodes from iscsi to direct caused issues in our upgrade jobs, since it migrated nodes to direct, without the config in place to make this work. This change avoids migrating nodes when iscsi is the default deploy interface. Story: 2008114 Task: 40996 Change-Id: I5cf0684dc53a2d89fac12e578b28e73e7697a97e
Diffstat (limited to 'ironic/db')
-rw-r--r--ironic/db/sqlalchemy/api.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/ironic/db/sqlalchemy/api.py b/ironic/db/sqlalchemy/api.py
index 3e859226c..7c478b009 100644
--- a/ironic/db/sqlalchemy/api.py
+++ b/ironic/db/sqlalchemy/api.py
@@ -1546,6 +1546,12 @@ class Connection(api.Connection):
'force=true to override.')
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':
LOG.warning('The direct deploy interface is using swift, will '
'not migrate nodes to it. Run with --option '