[Errno 2] No such file or directory: '/usr/lib/python3/dist- packages/ironic/drivers/raid_config_schema.json'.

Bug #2073643 reported by Felipe Reyes
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Cloud Archive
Fix Committed
Undecided
Unassigned
Caracal
Triaged
Undecided
Unassigned
ironic (Ubuntu)
Fix Released
Critical
Felipe Reyes
Noble
Fix Committed
Undecided
Unassigned

Bug Description

[Impact]

The python3-ironic package available in Ubuntu Noble fails when trying to load the ironic drivers, because there is a json schema file missing. This is because the package is not including it when it was built.

Stacktrace:

2024-07-19 15:24:28.547 1009815 ERROR oslo_service.service [None req-ee11f675-cc73-4c39-92d5-9a2ace917501 - - - - - -] Error starting thread.: ironic.common.exception.DriverLoadError: Driver, hardware type or interface no-raid could
 not be loaded. Reason: [Errno 2] No such file or directory: '/usr/lib/python3/dist-packages/ironic/drivers/raid_config_schema.json'.
2024-07-19 15:24:28.547 1009815 ERROR oslo_service.service Traceback (most recent call last):
2024-07-19 15:24:28.547 1009815 ERROR oslo_service.service File "/usr/lib/python3/dist-packages/stevedore/extension.py", line 206, in _load_plugins
2024-07-19 15:24:28.547 1009815 ERROR oslo_service.service ext = self._load_one_plugin(ep,
2024-07-19 15:24:28.547 1009815 ERROR oslo_service.service File "/usr/lib/python3/dist-packages/stevedore/named.py", line 156, in _load_one_plugin
2024-07-19 15:24:28.547 1009815 ERROR oslo_service.service return super(NamedExtensionManager, self)._load_one_plugin(
2024-07-19 15:24:28.547 1009815 ERROR oslo_service.service File "/usr/lib/python3/dist-packages/stevedore/extension.py", line 242, in _load_one_plugin
2024-07-19 15:24:28.547 1009815 ERROR oslo_service.service obj = plugin(*invoke_args, **invoke_kwds)
2024-07-19 15:24:28.547 1009815 ERROR oslo_service.service File "/usr/lib/python3/dist-packages/ironic/drivers/base.py", line 1461, in __init__
2024-07-19 15:24:28.547 1009815 ERROR oslo_service.service with open(RAID_CONFIG_SCHEMA, 'r') as raid_schema_fobj:
2024-07-19 15:24:28.547 1009815 ERROR oslo_service.service FileNotFoundError: [Errno 2] No such file or directory: '/usr/lib/python3/dist-packages/ironic/drivers/raid_config_schema.json'

[ Test Plan ]

1. get a copy of charm-ironic-conductor: git clone https://opendev.org/openstack/charm-ironic-conductor
2. Build a local copy of the charm: tox -e build
3. Run the functional testing: cd src/ ; tox -e func-target -- noble-caracal

Expected results: All the tests passes

Current result: /var/log/ironic/ironic-conductor.log has the error logged "FileNotFoundError: [Errno 2] No such file or directory: '/usr/lib/python3/dist-packages/ironic/drivers/raid_config_schema.json'"

[ Where problems could occur ]

This change will make the python3-ironic package larger in size since it's including all files present in the released tarball, but not less. A possible issue could be that unused files are installed in the system, and this could be a problem for users producing OCI images, rocks and cheaseled images.

[ Other Info ]

This patch[0] was used to test this fix in jammy-caracal -> jammy-caracal-alt https://openstack-ci-reports.ubuntu.com/artifacts/6e7/924544/2/check/jammy-caracal-alt/6e746fb/ : SUCCESS in 59m 10s

[0] https://review.opendev.org/c/openstack/charm-ironic-conductor/+/924544

Related branches

Felipe Reyes (freyes)
Changed in ironic (Ubuntu):
status: New → Triaged
Changed in cloud-archive:
status: New → Triaged
Changed in ironic (Ubuntu Noble):
status: New → Triaged
Changed in ironic (Ubuntu):
importance: Undecided → Critical
assignee: nobody → Felipe Reyes (freyes)
Felipe Reyes (freyes)
description: updated
Revision history for this message
James Page (james-page) wrote :

Uploaded for SRU team review.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ironic - 1:24.1.1-0ubuntu2

---------------
ironic (1:24.1.1-0ubuntu2) oracular; urgency=medium

  * d/p/install-missing-files.patch: Install all data files under the ironic/
    directory (LP: #2073643).
  * d/p/install-missing-db-files.patch: Dropped in favor of
    d/p/install-missing-files.patch.

 -- Felipe Reyes <email address hidden> Fri, 26 Jul 2024 15:43:51 +0100

Changed in ironic (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Robie Basak (racb) wrote :

> [ Test Plan ]

> 1. Install python3-ironic: apt-get install python3-ironic
> 2. Check the file /usr/lib/python3/dist- packages/ironic/drivers/raid_config_schema.json is available

This is insufficient. The Impact statement says:

> The python3-ironic package available in Ubuntu Noble fails when trying to load the ironic drivers, because there is a json schema file missing.

So in the Test Plan, please actually exercise the user story that results in the failure, and check that the user story is successful.

This isn't a full SRU review since I'm at EOD now, but hopefully this will help save time by avoiding a further review iteration.

Changed in ironic (Ubuntu Noble):
status: Triaged → Incomplete
Revision history for this message
Felipe Reyes (freyes) wrote : Re: [Bug 2073643] Re: [Errno 2] No such file or directory: '/usr/lib/python3/dist- packages/ironic/drivers/raid_config_schema.json'.

On Wed, 2024-08-14 at 16:57 +0000, Robie Basak wrote:
>
> > [ Test Plan ]
>
>
>
> > 1. Install python3-ironic: apt-get install python3-ironic
> > 2. Check the file /usr/lib/python3/dist- packages/ironic/drivers/raid_config_schema.json is available
>
>
> This is insufficient. The Impact statement says:
>
>
> > The python3-ironic package available in Ubuntu Noble fails when trying
>
> to load the ironic drivers, because there is a json schema file missing.
>
> So in the Test Plan, please actually exercise the user story that
> results in the failure, and check that the user story is successful.

I updated the test case to include the deployment and run of all the functional testing, this should not just validate the fix, but any potential regressions as well.

description: updated
Changed in ironic (Ubuntu Noble):
status: Incomplete → New
Revision history for this message
Timo Aaltonen (tjaalton) wrote : Please test proposed package

Hello Felipe, or anyone else affected,

Accepted ironic into noble-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/ironic/1:24.1.1-0ubuntu1.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-noble to verification-done-noble. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-noble. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in ironic (Ubuntu Noble):
status: New → Fix Committed
tags: added: verification-needed verification-needed-noble
Revision history for this message
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (ironic/1:24.1.1-0ubuntu1.1)

All autopkgtests for the newly accepted ironic (1:24.1.1-0ubuntu1.1) for noble have finished running.
The following regressions have been reported in tests triggered by the package:

ironic/1:24.1.1-0ubuntu1.1 (s390x)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/noble/update_excuses.html#ironic

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

James Page (james-page)
Changed in cloud-archive:
status: Triaged → Fix Committed
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.