Ironic drivers are accidentally being loaded even when unconfigured

Bug #1697657 reported by Sam Betts
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ironic
Opinion
Undecided
Unassigned

Bug Description

Seeing debug errors in the CI test logs that look like:

Jun 12 17:47:35.703861 ubuntu-xenial-osic-cloud1-s3700-9266719 ironic-conductor[9206]: DEBUG ironic.drivers.base [None req-64f3bfeb-da6d-49b2-92c2-7b4cecaf7162 None None] Found clean steps [] for interface boot: DriverLoadError: Driver, hardware type or interface PXEAndIRMCDriver could not be loaded. Reason: Unable to import python-scciclient library. {{(pid=9206) __new__ /opt/stack/new/ironic/ironic/drivers/base.py:243}}

Jun 12 17:47:35.794952 ubuntu-xenial-osic-cloud1-s3700-9266719 ironic-conductor[9206]: INFO ironic.drivers.modules.inspector [None req-64f3bfeb-da6d-49b2-92c2-7b4cecaf7162 None None] Inspection via ironic-inspector is disabled in configuration for driver AgentAndSSHDriver. To enable, change [inspector] enabled = True.: DriverLoadError: Driver, hardware type or interface FakeUcsDriver could not be loaded. Reason: Unable to import UcsSdk library.

None of the vendor driver are loaded though:

default_boot_interface = None
default_console_interface = None
default_deploy_interface = None
default_inspect_interface = None
default_management_interface = None
default_network_interface = None
default_power_interface = None
default_raid_interface = None
default_storage_interface = None
default_vendor_interface = None
enabled_boot_interfaces = ['pxe']
enabled_console_interfaces = ['no-console']
enabled_deploy_interfaces = ['iscsi', 'direct']
enabled_drivers = ['fake', 'pxe_ssh', 'pxe_ipmitool']
enabled_hardware_types = ['ipmi']
enabled_inspect_interfaces = ['no-inspect']
enabled_management_interfaces = ['ipmitool']
enabled_network_interfaces = ['flat', 'noop']
enabled_power_interfaces = ['ipmitool']
enabled_raid_interfaces = ['agent', 'no-raid']
enabled_storage_interfaces = ['noop']
enabled_vendor_interfaces = ['ipmitool', 'no-vendor']

Revision history for this message
Vladyslav Drok (vdrok) wrote :

Yes, we do load them all, but treat only the enabled ones as errors -- https://github.com/openstack/ironic/blob/stable/pike/ironic/common/driver_factory.py#L482-L507, because we use the NameDispatchExtensionManager. do you think we should load drivers one by one? This might slow down things a bit.

Changed in ironic:
status: New → Opinion
Revision history for this message
Sam Betts (sambetts) wrote :

If you look at the error messages that are being displayed, the driver load errors that are supposed to be being suppressed at the driver factory, are being bubbled up into places they shouldn't be. E.g. in

Inspection via ironic-inspector is disabled in configuration for driver AgentAndSSHDriver. To enable, change [inspector] enabled = True.: DriverLoadError: Driver, hardware type or interface FakeUcsDriver
could not be loaded. Reason: Unable to import UcsSdk library.

The error here ^^ is about the AgentAndSshDriver, but the exception that is being bubbled is for the UcsDriver which has no connection to the AgentAndSSHDriver.

Something is going wrong somewhere and this leads to terrible logging.

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.