glance-cache-manage utility is broken

Bug #1888349 reported by Abhishek Kekane
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Fix Released
High
Abhishek Kekane
Train
Fix Committed
High
Unassigned
Ussuri
Fix Committed
High
Unassigned

Bug Description

When I try to run any of glance-cache-manage command it fails with below error;

glance-cache-manage --host 172.16.2.23 list-cached
Traceback (most recent call last):
  File "/usr/bin/glance-cache-manage", line 6, in <module>
    from glance.cmd.cache_manage import main
  File "/usr/lib/python3.6/site-packages/glance/cmd/cache_manage.py", line 46, in <module>
    import glance.image_cache.client
  File "/usr/lib/python3.6/site-packages/glance/image_cache/__init__.py", line 30, in <module>
    from glance.common import utils
  File "/usr/lib/python3.6/site-packages/glance/common/utils.py", line 50, in <module>
    from glance.common import wsgi
  File "/usr/lib/python3.6/site-packages/glance/common/wsgi.py", line 61, in <module>
    from glance.image_cache import prefetcher
  File "/usr/lib/python3.6/site-packages/glance/image_cache/prefetcher.py", line 28, in <module>
    from glance.image_cache import base
  File "/usr/lib/python3.6/site-packages/glance/image_cache/base.py", line 15, in <module>
    from glance.image_cache import ImageCache
ImportError: cannot import name 'ImageCache'

.
glance-cache-manage --help
Traceback (most recent call last):
  File "/usr/bin/glance-cache-manage", line 6, in <module>
    from glance.cmd.cache_manage import main
  File "/usr/lib/python3.6/site-packages/glance/cmd/cache_manage.py", line 46, in <module>
    import glance.image_cache.client
  File "/usr/lib/python3.6/site-packages/glance/image_cache/__init__.py", line 30, in <module>
    from glance.common import utils
  File "/usr/lib/python3.6/site-packages/glance/common/utils.py", line 50, in <module>
    from glance.common import wsgi
  File "/usr/lib/python3.6/site-packages/glance/common/wsgi.py", line 61, in <module>
    from glance.image_cache import prefetcher
  File "/usr/lib/python3.6/site-packages/glance/image_cache/prefetcher.py", line 28, in <module>
    from glance.image_cache import base
  File "/usr/lib/python3.6/site-packages/glance/image_cache/base.py", line 15, in <module>
    from glance.image_cache import ImageCache
ImportError: cannot import name 'ImageCache'

Changed in glance:
assignee: nobody → Abhishek Kekane (abhishek-kekane)
importance: Undecided → High
Changed in glance:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (master)

Reviewed: https://review.opendev.org/742115
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=ffd2f5e63f8b7aebc8986c05aea249c75a8a692b
Submitter: Zuul
Branch: master

commit ffd2f5e63f8b7aebc8986c05aea249c75a8a692b
Author: Abhishek Kekane <email address hidden>
Date: Tue Jul 21 09:18:31 2020 +0000

    Fix broken glance-cache-manage utility

    glance-cahce-manage is broken due to circilar imports.
    Fixed the same by importing 'prefetcher' module right before
    'Prefetcher' object is initialized.

    Closes-Bug: #1888349
    Change-Id: I57d473572ca0a341082bacc3883cd9f763d77fa7

Changed in glance:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (stable/ussuri)

Reviewed: https://review.opendev.org/742742
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=1bb6a32bad7b84f43e54d1f6d7c68e062fcc673a
Submitter: Zuul
Branch: stable/ussuri

commit 1bb6a32bad7b84f43e54d1f6d7c68e062fcc673a
Author: Abhishek Kekane <email address hidden>
Date: Tue Jul 21 09:18:31 2020 +0000

    Fix broken glance-cache-manage utility

    glance-cahce-manage is broken due to circilar imports.
    Fixed the same by importing 'prefetcher' module right before
    'Prefetcher' object is initialized.

    Closes-Bug: #1888349
    Change-Id: I57d473572ca0a341082bacc3883cd9f763d77fa7
    (cherry picked from commit ffd2f5e63f8b7aebc8986c05aea249c75a8a692b)

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

Reviewed: https://review.opendev.org/742889
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=277322515c486b2cbc7f9e1729ae74894397c096
Submitter: Zuul
Branch: stable/train

commit 277322515c486b2cbc7f9e1729ae74894397c096
Author: Abhishek Kekane <email address hidden>
Date: Tue Jul 21 09:18:31 2020 +0000

    Fix broken glance-cache-manage utility

    glance-cahce-manage is broken due to circilar imports.
    Fixed the same by importing 'prefetcher' module right before
    'Prefetcher' object is initialized.

    Conflicts:
            glance/common/wsgi.py
            glance/tests/unit/test_cache_manage.py

    Closes-Bug: #1888349
    Change-Id: I57d473572ca0a341082bacc3883cd9f763d77fa7
    (cherry picked from commit ffd2f5e63f8b7aebc8986c05aea249c75a8a692b)
    (cherry picked from commit 1bb6a32bad7b84f43e54d1f6d7c68e062fcc673a)

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.