diff options
author | Dmitry Tantsur <dtantsur@protonmail.com> | 2021-05-03 17:03:29 +0200 |
---|---|---|
committer | Dmitry Tantsur <dtantsur@protonmail.com> | 2021-05-04 14:28:25 +0200 |
commit | 929907d68473ae8a433ebb8c4dcb110473d42676 (patch) | |
tree | 3b946e32ddbe3e7e91f1a8a88625b2e23af06add /ironic/db | |
parent | e79f163837dd2c27f84f693aba0f1575fa2353f7 (diff) | |
download | ironic-929907d68473ae8a433ebb8c4dcb110473d42676.tar.gz |
Bye-bye iSCSI deploy, you served us well
The iSCSI deploy was very easy to start with, but it has since become
apparently that it suffers from scalability and maintenance issues.
It was deprecated in the Victoria cycle and can now be removed.
Hide the guide to upgrade to hardware types since it's very outdated.
I had to remove the iBMC diagram since my SVG-fu is not enough to fix it.
Change-Id: I2cd6bf7b27fe0be2c08104b0cc37654b506b2e62
Diffstat (limited to 'ironic/db')
-rw-r--r-- | ironic/db/api.py | 12 | ||||
-rw-r--r-- | ironic/db/sqlalchemy/api.py | 53 |
2 files changed, 0 insertions, 65 deletions
diff --git a/ironic/db/api.py b/ironic/db/api.py index d44ea73ef..da0838478 100644 --- a/ironic/db/api.py +++ b/ironic/db/api.py @@ -974,18 +974,6 @@ class Connection(object, metaclass=abc.ABCMeta): """ @abc.abstractmethod - def migrate_from_iscsi_deploy(self, context, max_count): - """Tries to migrate away from the iscsi deploy interface. - - :param context: the admin context - :param max_count: The maximum number of objects to migrate. Must be - >= 0. If zero, all the objects will be migrated. - :returns: A 2-tuple, 1. the total number of objects that need to be - migrated (at the beginning of this call) and 2. the number - of migrated objects. - """ - - @abc.abstractmethod def set_node_traits(self, node_id, traits, version): """Replace all of the node traits with specified list of traits. diff --git a/ironic/db/sqlalchemy/api.py b/ironic/db/sqlalchemy/api.py index 2029d8942..702755e97 100644 --- a/ironic/db/sqlalchemy/api.py +++ b/ironic/db/sqlalchemy/api.py @@ -1578,59 +1578,6 @@ class Connection(api.Connection): return total_to_migrate, total_migrated - @oslo_db_api.retry_on_deadlock - def migrate_from_iscsi_deploy(self, context, max_count, force=False): - """Tries to migrate away from the iscsi deploy interface. - - :param context: the admin context - :param max_count: The maximum number of objects to migrate. Must be - >= 0. If zero, all the objects will be migrated. - :returns: A 2-tuple, 1. the total number of objects that need to be - migrated (at the beginning of this call) and 2. the number - of migrated objects. - """ - # TODO(dtantsur): maybe change to force=True by default in W? - if not force: - if 'direct' not in CONF.enabled_deploy_interfaces: - LOG.warning('The direct deploy interface is not enabled, will ' - 'not migrate nodes to it. Run with --option ' - '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 ' - 'force=true to override.') - return 0, 0 - - total_to_migrate = (model_query(models.Node) - .filter_by(deploy_interface='iscsi') - .count()) - if not total_to_migrate: - return 0, 0 - - max_to_migrate = max_count or total_to_migrate - - with _session_for_write(): - query = (model_query(models.Node.id) - .filter_by(deploy_interface='iscsi') - .slice(0, max_to_migrate)) - ids = [row[0] for row in query] - - num_migrated = (model_query(models.Node) - .filter_by(deploy_interface='iscsi') - .filter(models.Node.id.in_(ids)) - .update({'deploy_interface': 'direct'}, - synchronize_session=False)) - - return total_to_migrate, num_migrated - @staticmethod def _verify_max_traits_per_node(node_id, num_traits): """Verify that an operation would not exceed the per-node trait limit. |