Bug 1859289

Summary: OSP16: circular import when using glance-cache-manage
Product: Red Hat OpenStack Reporter: Cyril Roelandt <cyril>
Component: openstack-glanceAssignee: Cyril Roelandt <cyril>
Status: CLOSED ERRATA QA Contact: Mike Abrams <mabrams>
Severity: medium Docs Contact: Chuck Copello <ccopello>
Priority: medium    
Version: 16.0 (Train)CC: akekane, athomas, eglynn, gcharot, owalsh
Target Milestone: z3Keywords: Triaged
Target Release: 16.1 (Train on RHEL 8.2)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-glance-19.0.4-1.20200812170818.5bbd356.el8ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-10-28 15:38:25 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1790755    

Description Cyril Roelandt 2020-07-21 15:57:00 UTC
Reported by Hyonjeong Jang <hjang> on rhos-rech:


The command is not working at the controller node's glance-api container.


()[glance@ctrl1 /]$ *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'


The command is not working at the edge compute node's glance-api container
also.
()[glance@com2 /]$ *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'

Comment 10 errata-xmlrpc 2020-10-28 15:38:25 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Red Hat OpenStack Platform 16.1 bug fix and enhancement advisory), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2020:4284