Going back to ironic 10.1.0, cleaning and provisioning networks could be set via driver_info parameters to enable node-level settings as *opposed* to global settings. This was made in change I4caec34d85304fe887bcc28b7528cceceb3acfe8 related to bug # 1614876.
However, turns out if you try to launch ironic without a global default, but with the neutron network interface being enabled at all. Not even as a default, you end up in a case where the service fails to start.
Unfortunately, it is reasonable to have tenants with their own networks and also for there not to be a centralized conductor network as well.
So, ideally we should just remove the initial check on service launch, and allow a node to fail validate to provide user feedback under normal circumstances.
This is rooted in __init__ in the neutron network_interface driver code located at
drivers/modules/network/neutron.py
---
For example, setting ironic.conf to have a configuration file with "enabled_network_interfaces = flat,neutron,noop" but no "cleaning_network" setting, you get a error similar to the one below:
exec /usr/bin/ironic-conductor
2024-02-22 03:13:15.451 1 INFO oslo.service.wsgi [None req-e74f91aa-fc9d-4596-ba84-4023acff0bb2 - - - - - -] ironic-json-rpc listening on :::8089
2024-02-22 03:13:15.951 1 INFO ironic.common.driver_factory [None req-e74f91aa-fc9d-4596-ba84-4023acff0bb2 - - - - - -] Loaded the following hardware types: ['fake-hardware', 'idrac', 'ilo', 'ilo5', 'ipmi', 'irmc', 'manual-management', 'redfish']
2024-02-22 03:13:15.953 1 WARNING ironic.drivers.modules.network.flat [None req-e74f91aa-fc9d-4596-ba84-4023acff0bb2 - - - - - -] Please specify a valid UUID or name for [neutron]/cleaning_network configuration option so that this interface is able to perform cleaning. Otherwise, cleaning operations will fail to start.
2024-02-22 03:13:15.953 1 ERROR oslo_service.service [None req-e74f91aa-fc9d-4596-ba84-4023acff0bb2 - - - - - -] Error starting thread.: ironic.common.exception.DriverLoadError: Driver, hardware type or interface NeutronNetwork could not be loaded. Reason: The following [neutron] group configuration options are missing: cleaning_network, provisioning_network.
2024-02-22 03:13:15.953 1 ERROR oslo_service.service Traceback (most recent call last):
2024-02-22 03:13:15.953 1 ERROR oslo_service.service File "/usr/lib/python3.9/site-packages/oslo_service/service.py", line 806, in run_service
2024-02-22 03:13:15.953 1 ERROR oslo_service.service service.start()
2024-02-22 03:13:15.953 1 ERROR oslo_service.service File "/usr/lib/python3.9/site-packages/ironic/common/rpc_service.py", line 64, in start
2024-02-22 03:13:15.953 1 ERROR oslo_service.service self._real_start()
2024-02-22 03:13:15.953 1 ERROR oslo_service.service File "/usr/lib/python3.9/site-packages/ironic/common/rpc_service.py", line 89, in _real_start
2024-02-22 03:13:15.953 1 ERROR oslo_service.service self.manager.init_host(admin_context)
2024-02-22 03:13:15.953 1 ERROR oslo_service.service File "/usr/lib/python3.9/site-packages/ironic/conductor/base_manager.py", line 137, in init_host
2024-02-22 03:13:15.953 1 ERROR oslo_service.service driver_factory.NetworkInterfaceFactory()
2024-02-22 03:13:15.953 1 ERROR oslo_service.service File "/usr/lib/python3.9/site-packages/ironic/common/driver_factory.py", line 336, in init
2024-02-22 03:13:15.953 1 ERROR oslo_service.service self.class._init_extension_manager()
2024-02-22 03:13:15.953 1 ERROR oslo_service.service File "/usr/lib/python3.9/site-packages/ironic/common/driver_factory.py", line 407, in _init_extension_manager
2024-02-22 03:13:15.953 1 ERROR oslo_service.service stevedore.NamedExtensionManager(
2024-02-22 03:13:15.953 1 ERROR oslo_service.service File "/usr/lib/python3.9/site-packages/stevedore/named.py", line 78, in init
2024-02-22 03:13:15.953 1 ERROR oslo_service.service extensions = self._load_plugins(invoke_on_load,
2024-02-22 03:13:15.953 1 ERROR oslo_service.service File "/usr/lib/python3.9/site-packages/stevedore/extension.py", line 218, in _load_plugins
2024-02-22 03:13:15.953 1 ERROR oslo_service.service self._on_load_failure_callback(self, ep, err)
2024-02-22 03:13:15.953 1 ERROR oslo_service.service File "/usr/lib/python3.9/site-packages/ironic/common/driver_factory.py", line 359, in _catch_driver_not_found
2024-02-22 03:13:15.953 1 ERROR oslo_service.service raise exc
2024-02-22 03:13:15.953 1 ERROR oslo_service.service File "/usr/lib/python3.9/site-packages/stevedore/extension.py", line 206, in _load_plugins
2024-02-22 03:13:15.953 1 ERROR oslo_service.service ext = self._load_one_plugin(ep,
2024-02-22 03:13:15.953 1 ERROR oslo_service.service File "/usr/lib/python3.9/site-packages/stevedore/named.py", line 156, in _load_one_plugin
2024-02-22 03:13:15.953 1 ERROR oslo_service.service return super(NamedExtensionManager, self)._load_one_plugin(
2024-02-22 03:13:15.953 1 ERROR oslo_service.service File "/usr/lib/python3.9/site-packages/stevedore/extension.py", line 242, in _load_one_plugin
2024-02-22 03:13:15.953 1 ERROR oslo_service.service obj = plugin(*invoke_args, **invoke_kwds)
2024-02-22 03:13:15.953 1 ERROR oslo_service.service File "/usr/lib/python3.9/site-packages/ironic/drivers/modules/network/neutron.py", line 47, in init
2024-02-22 03:13:15.953 1 ERROR oslo_service.service raise exception.DriverLoadError(
2024-02-22 03:13:15.953 1 ERROR oslo_service.service ironic.common.exception.DriverLoadError: Driver, hardware type or interface NeutronNetwork could not be loaded. Reason: The following [neutron] group configuration options are missing: cleaning_network, provisioning_network.
2024-02-22 03:13:15.953 1 ERROR oslo_service.service
Fix proposed to branch: master /review. opendev. org/c/openstack /ironic/ +/909937
Review: https:/