← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 2109592] Re: [master][periodic] oslo master jobs broken with ImportError: cannot import name 'format_inspector' from 'oslo_utils.imageutils'

 

Reviewed:  https://review.opendev.org/c/openstack/devstack/+/956595
Committed: https://opendev.org/openstack/devstack/commit/b6bf0b126b46042341cc3d47a92ad9b0d9b9a523
Submitter: "Zuul (22348)"
Branch:    master

commit b6bf0b126b46042341cc3d47a92ad9b0d9b9a523
Author: Sean Mooney <work@xxxxxxxxxxxxxxx>
Date:   Tue Aug 5 16:44:26 2025 +0000

    Use novnc from source by default
    
    This change restores the default devstack behavior in the zuul jobs
    by removing the override of NOVNC_FROM_PACKAGE from devstack-base.
    
    When installed locally, devstack defaults to installing novnc from
    git. As reported in bug #2109592, Ubuntu and possibly other distros
    have a packaging bug where the python3-novnc package 1) exists and
    2) depends on `oslo.config` and, as a result, `oslo.utils`. The
    reason python3-novnc existing is a bug is that novnc has not had any
    Python deliverable since the 0.6.0 release around 2016. So this
    package is no longer used and is effectively empty since novnc fully
    moved to using JavaScript.
    
    For unrelated reasons, devstack creates the global venv with
    --site-packages to install `libvirt-python`, which also means that
    any other Python dependencies installed at the system level also
    infect the devstack venv.
    
    In the past, this was not a problem, but as of epoxy, Nova requires
    a newer version of oslo than Ubuntu provides in the distro package.
    This is where the python3-novnc package and its incorrect dependency
    on oslo breaks CI.
    
    This is not seen locally, as devstack uses novnc from git. This
    change makes CI do that also.
    
    Closes-Bug: #2109592
    
    Change-Id: I8f018e1e57e3f54997d2cf55b1b3aa728e82899b
    Signed-off-by: Sean Mooney <work@xxxxxxxxxxxxxxx>


** Changed in: devstack
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/2109592

Title:
  [master][periodic] oslo master jobs broken with ImportError: cannot
  import name 'format_inspector' from 'oslo_utils.imageutils'

Status in devstack:
  Fix Released
Status in neutron:
  Invalid
Status in OpenStack Compute (nova):
  Invalid
Status in oslo.utils:
  Invalid

Bug description:
  Example failure:-
  2025-04-29 02:44:40.231850 | controller | + lib/nova:init_nova:889                   :   /opt/stack/data/venv/bin/nova-manage --config-file /etc/nova/nova.conf api_db sync
  2025-04-29 02:44:43.960708 | controller | Traceback (most recent call last):
  2025-04-29 02:44:43.960846 | controller |   File "/opt/stack/data/venv/bin/nova-manage", line 5, in <module>
  2025-04-29 02:44:43.960947 | controller |     from nova.cmd.manage import main
  2025-04-29 02:44:43.961048 | controller |   File "/opt/stack/nova/nova/cmd/manage.py", line 85, in <module>
  2025-04-29 02:44:43.961135 | controller |     from nova.virt.libvirt import machine_type_utils
  2025-04-29 02:44:43.961590 | controller |   File "/opt/stack/nova/nova/virt/libvirt/__init__.py", line 15, in <module>
  2025-04-29 02:44:43.961610 | controller |     from nova.virt.libvirt import driver
  2025-04-29 02:44:43.961620 | controller |   File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 108, in <module>
  2025-04-29 02:44:43.961630 | controller |     from nova.virt.disk import api as disk_api
  2025-04-29 02:44:43.961639 | controller |   File "/opt/stack/nova/nova/virt/disk/api.py", line 43, in <module>
  2025-04-29 02:44:43.961648 | controller |     from nova.virt import images
  2025-04-29 02:44:43.961657 | controller |   File "/opt/stack/nova/nova/virt/images.py", line 28, in <module>
  2025-04-29 02:44:43.961666 | controller |     from oslo_utils.imageutils import format_inspector
  2025-04-29 02:44:43.961675 | controller | ImportError: cannot import name 'format_inspector' from 'oslo_utils.imageutils' (/usr/lib/python3/dist-packages/oslo_utils/imageutils.py)
  2025-04-29 02:44:44.654218 | controller | + lib/nova:init_nova:1                     :   exit_trap
  2025-04-29 02:44:44.654846 | controller | + inc/async:async_inner:68                 :   rc=1
  2025-04-29 02:44:44.657331 | controller | + ./stack.sh:exit_trap:543                 :   local r=1
  2025-04-29 02:44:44.663187 | controller | ++ ./stack.sh:exit_trap:544                 :   jobs -p
  2025-04-29 02:44:44.667380 | controller | + ./stack.sh:exit_trap:544                 :   jobs='53865

  Example failures:-
  https://zuul.openstack.org/build/ed4861b111b342f4916e8a7b004930a7
  https://zuul.openstack.org/build/49f753c4cdd3484b83dc26dffce1426a

  Builds:- https://zuul.openstack.org/builds?job_name=neutron-ovn-
  tempest-ovs-release-with-oslo-master&job_name=neutron-ovs-tempest-
  with-oslo-master&skip=0

To manage notifications about this bug go to:
https://bugs.launchpad.net/devstack/+bug/2109592/+subscriptions



References