Ironic refuses to launch if neutron network_interface is set and no cleaning/provisioning default is hard coded.

Bug #2054728 reported by Julia Kreger
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ironic
Fix Released
High
Julia Kreger

Bug Description

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ironic (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/ironic/+/909937

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ironic (master)

Reviewed: https://review.opendev.org/c/openstack/ironic/+/909937
Committed: https://opendev.org/openstack/ironic/commit/50ced3a3fab28af50951d39bbb76e561818aee44
Submitter: "Zuul (22348)"
Branch: master

commit 50ced3a3fab28af50951d39bbb76e561818aee44
Author: Julia Kreger <email address hidden>
Date: Thu Feb 22 11:45:01 2024 -0800

    neutron: do not error if no cleaning/provisioning on launch

    In the early days of the neutron network interface, we had a hard
    launch failure added to prevent ironic.conf from having a neutron
    network configuration which was not valid when the neutron network
    interface was in use.

    But as time has moved on, these settings became node-settable,
    and ironic configuration largely became mutable as well, so they
    can always be added after the process has been launched.

    But we kept the error being returned. Which doesn't make sense
    now that it can always be back-filled into a working state
    or just entirely be "user supplied" via the API by an appropriate
    user.

    Closes-Bug: 2054728
    Change-Id: I33e76929ca9bf7869b3b4ef4d6501e692cf0a922

Changed in ironic:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ironic (stable/2023.2)

Fix proposed to branch: stable/2023.2
Review: https://review.opendev.org/c/openstack/ironic/+/910310

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ironic (stable/2023.1)

Fix proposed to branch: stable/2023.1
Review: https://review.opendev.org/c/openstack/ironic/+/910311

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ironic (stable/2023.2)

Reviewed: https://review.opendev.org/c/openstack/ironic/+/910310
Committed: https://opendev.org/openstack/ironic/commit/606edbd13efd6ccc7f01afa447f076ae83fef19b
Submitter: "Zuul (22348)"
Branch: stable/2023.2

commit 606edbd13efd6ccc7f01afa447f076ae83fef19b
Author: Julia Kreger <email address hidden>
Date: Thu Feb 22 11:45:01 2024 -0800

    neutron: do not error if no cleaning/provisioning on launch

    In the early days of the neutron network interface, we had a hard
    launch failure added to prevent ironic.conf from having a neutron
    network configuration which was not valid when the neutron network
    interface was in use.

    But as time has moved on, these settings became node-settable,
    and ironic configuration largely became mutable as well, so they
    can always be added after the process has been launched.

    But we kept the error being returned. Which doesn't make sense
    now that it can always be back-filled into a working state
    or just entirely be "user supplied" via the API by an appropriate
    user.

    Closes-Bug: 2054728
    Change-Id: I33e76929ca9bf7869b3b4ef4d6501e692cf0a922
    (cherry picked from commit 50ced3a3fab28af50951d39bbb76e561818aee44)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ironic (stable/2023.1)

Reviewed: https://review.opendev.org/c/openstack/ironic/+/910311
Committed: https://opendev.org/openstack/ironic/commit/4315431aeeb1e924c30214b30d83271083dc66a5
Submitter: "Zuul (22348)"
Branch: stable/2023.1

commit 4315431aeeb1e924c30214b30d83271083dc66a5
Author: Julia Kreger <email address hidden>
Date: Thu Feb 22 11:45:01 2024 -0800

    neutron: do not error if no cleaning/provisioning on launch

    In the early days of the neutron network interface, we had a hard
    launch failure added to prevent ironic.conf from having a neutron
    network configuration which was not valid when the neutron network
    interface was in use.

    But as time has moved on, these settings became node-settable,
    and ironic configuration largely became mutable as well, so they
    can always be added after the process has been launched.

    But we kept the error being returned. Which doesn't make sense
    now that it can always be back-filled into a working state
    or just entirely be "user supplied" via the API by an appropriate
    user.

    Closes-Bug: 2054728
    Change-Id: I33e76929ca9bf7869b3b4ef4d6501e692cf0a922
    (cherry picked from commit 50ced3a3fab28af50951d39bbb76e561818aee44)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/ironic 24.1.0

This issue was fixed in the openstack/ironic 24.1.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/ironic 21.4.1

This issue was fixed in the openstack/ironic 21.4.1 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/ironic 23.0.1

This issue was fixed in the openstack/ironic 23.0.1 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.