Eventlet will patch the "os" library and how it works.
If "oslo_config.cfg" is called after "eventlet":
- "oslo_config.cfg" imports "stevedore"
- "stevedore" imports "importlib_metadata"
- this library will try to use "os.open" library, but patched
- "eventlet" imports "oslo_service"
- "oslo_service" imports "oslo_logging"
- "oslo_logging" imports "oslo_config.cfg", but at this point,
the instance cfg.CONF does not exist yet
If "oslo_config.cfg" is imported before calling eventlet,
"oslo_logging" is not called and there is no circular import.
Closes-Bug: #1888213
[1]I8b08f289d446f4775eac1e1a91997fa96f25f641
Change-Id: Idcc04f46b2a01e24dfd56cef8121694439e0339e
(cherry picked from commit bc99e56515537210a35988d3fbdec0669469d0b3)
Reviewed: https:/ /review. opendev. org/757061 /git.openstack. org/cgit/ openstack/ neutron/ commit/ ?id=20e8c6f5538 0bc94709bc3f25d 5c8eebd1f56bee
Committed: https:/
Submitter: Zuul
Branch: stable/stein
commit 20e8c6f55380bc9 4709bc3f25d5c8e ebd1f56bee
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Mon Jul 20 14:12:06 2020 +0000
Import "oslo_config.cfg" before "eventlet"
Eventlet will patch the "os" library and how it works.
If "oslo_config.cfg" is called after "eventlet": metadata"
- "oslo_config.cfg" imports "stevedore"
- "stevedore" imports "importlib_
- this library will try to use "os.open" library, but patched
- "eventlet" imports "oslo_service"
- "oslo_service" imports "oslo_logging"
- "oslo_logging" imports "oslo_config.cfg", but at this point,
the instance cfg.CONF does not exist yet
If "oslo_config.cfg" is imported before calling eventlet,
"oslo_logging" is not called and there is no circular import.
Closes-Bug: #1888213
[1] I8b08f289d446f4 775eac1e1a91997 fa96f25f641
Change-Id: Idcc04f46b2a01e 24dfd56cef81216 94439e0339e 0a35988d3fbdec0 669469d0b3)
(cherry picked from commit bc99e5651553721