The fixtures library is missing from requirements.txt

Bug #1958075 reported by Takashi Kajinami
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Critical
Takashi Kajinami

Bug Description

Description
===========
The following change[1] made the nova.utils module depend on the fixtures library.
[1] https://review.opendev.org/c/openstack/nova/+/824280

However the fixtures library is listed only in test-requirements.txt and is not yet listed in requirements.txt .
Because of this the library is not installed in normal deployment and the `nova-manage api_db sync` command fails with the following error.

Traceback (most recent call last):
  File "/usr/bin/nova-manage", line 6, in <module>
    from nova.cmd.manage import main
  File "/usr/lib/python3.6/site-packages/nova/cmd/manage.py", line 49, in <module>
    from nova.cmd import common as cmd_common
  File "/usr/lib/python3.6/site-packages/nova/cmd/common.py", line 26, in <module>
    import nova.db.main.api
  File "/usr/lib/python3.6/site-packages/nova/db/main/api.py", line 45, in <module>
    from nova import block_device
  File "/usr/lib/python3.6/site-packages/nova/block_device.py", line 26, in <module>
    from nova import utils
  File "/usr/lib/python3.6/site-packages/nova/utils.py", line 32, in <module>
    import fixtures
ModuleNotFoundError: No module named 'fixtures'

This issue was initially detected in litmus jobs in puppet repos[2].
These jobs uses rdo packages which define dependencies based on requirements.txt

[2] example: https://zuul.opendev.org/t/openstack/build/e086ca3375714860ae463b7a1d9b1bab

Steps to reproduce
==================

Expected result
===============

Actual result
=============

Environment
===========

Logs & Configs
==============

Tags: gate-failure
Changed in nova:
assignee: nobody → Takashi Kajinami (kajinamit)
Changed in nova:
status: New → In Progress
Changed in nova:
importance: Undecided → Critical
tags: added: gate-failure
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.opendev.org/c/openstack/nova/+/824830
Committed: https://opendev.org/openstack/nova/commit/33bc5c09f576680d150435fb7ad435b23e778316
Submitter: "Zuul (22348)"
Branch: master

commit 33bc5c09f576680d150435fb7ad435b23e778316
Author: Takashi Kajinami <email address hidden>
Date: Sun Jan 16 23:30:41 2022 +0900

    Add fixtures to requirements

    The commit 887c445a7a6a17b92a37b6ed1dcdcc7dd009f65d made the nova.utils
    module dependent on the fixtures library but the change missed updating
    requirements and the fixtures library is not installed automatically.

    This change migrates the fixtures library from test-requirements.txt to
    requirements.txt so that the library is installed without test codes.

    Closes-Bug: #1958075
    Change-Id: I712f88fc1b6053fe6d1f13e708f3bd8874452a8f

Changed in nova:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to nova (master)

Related fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/nova/+/824931

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to nova (master)

Reviewed: https://review.opendev.org/c/openstack/nova/+/824931
Committed: https://opendev.org/openstack/nova/commit/a341851f15060efc2e6e30717339c47c015ed0b7
Submitter: "Zuul (22348)"
Branch: master

commit a341851f15060efc2e6e30717339c47c015ed0b7
Author: Balazs Gibizer <email address hidden>
Date: Mon Jan 17 13:29:35 2022 +0100

    Move ReaderWriterLock to the test tree

    The commit I168fffac8002f274a905cfd53ac4f6c9abe18803 added a wrapper
    around fasteners.ReaderWriterLock to fix up an issue with eventlet. But
    the wrapper was added to nova.utils module that is use not only by the
    nova tests but also the nova production code. This made the fixture
    library a dependency of the nova production code. While the current
    ReaderWriterLock usage only limited to the nova test sub tree. The
    I712f88fc1b6053fe6d1f13e708f3bd8874452a8f commit fix the issue of not
    having fixtures in the nova requirements.txt. However I think a better
    fix is to move the wrapper to the test subtree instead. This patch does
    that and restores the state of the requirements.txt

    Change-Id: I6903ce53b9b91325f7268cf2ebd02e4488579560
    Related-Bug: #1958075

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 25.0.0.0rc1

This issue was fixed in the openstack/nova 25.0.0.0rc1 release candidate.

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.