glance status upgrade check fails with TypeError

Bug #1911700 reported by Cyril Roelandt
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Glance
Fix Released
Undecided
Cyril Roelandt

Bug Description

When the 'enabled_backends' option has not been set, it defaults to None and we get the following error:

$ touch test.conf
$ glance-status --config-file=./test.conf upgrade check
Error:
Traceback (most recent call last):
  File "/home/cyril/openstack/glance/v/lib/python3.9/site-packages/oslo_upgradecheck/upgradecheck.py", line 196, in run
    return conf.command.action_fn()
  File "/home/cyril/openstack/glance/v/lib/python3.9/site-packages/oslo_upgradecheck/upgradecheck.py", line 106, in check
    result = func(self)
  File "/home/cyril/openstack/glance/glance/cmd/status.py", line 36, in _check_sheepdog_store
    if 'sheepdog' in getattr(CONF, 'enabled_backends', {}):
TypeError: argument of type 'NoneType' is not iterable

Changed in glance:
assignee: nobody → Cyril Roelandt (cyril-roelandt)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/glance 22.0.0.0b2

This issue was fixed in the openstack/glance 22.0.0.0b2 development milestone.

Erno Kuvaja (jokke)
Changed in glance:
status: New → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (stable/victoria)

Fix proposed to branch: stable/victoria
Review: https://review.opendev.org/c/openstack/glance/+/849998

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

Reviewed: https://review.opendev.org/c/openstack/glance/+/849998
Committed: https://opendev.org/openstack/glance/commit/691206b4e8aeb822ec8be9f9e4c37c4b5d3245a3
Submitter: "Zuul (22348)"
Branch: stable/victoria

commit 691206b4e8aeb822ec8be9f9e4c37c4b5d3245a3
Author: Cyril Roelandt <email address hidden>
Date: Thu Jan 14 02:52:23 2021 +0100

    Fix upgrade checks for sheepdog

    When either CONF.enabled_backends or CONF.glance_store.stores is set to
    None (which may happen if they are not actually specified in the config
    file), a TypeError is raised. Fix this and add tests.

    Change-Id: I670f6db96998c8a2cec5d16fbca9f01857b866da
    Closes-Bug: #1911700
    (cherry picked from commit c7236a0897b87c0a0ee21655139e527d66ed7105)

tags: added: in-stable-victoria
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/glance victoria-eom

This issue was fixed in the openstack/glance victoria-eom 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.