Bug #38469
closedIf installed python packages share names with mgr modules, ceph-mgr loads the wrong thing
0%
Description
Before loading each mgr module, ceph-mgr sets python's sys.path to the site-packages directories, followed by the mgr module path. For example:
ceph-mgr[25988]: 2019-02-22 11:06:05.334 7f57f8872b40 10 mgr[py] Computed sys.path '/usr/lib/python36.zip:/usr/lib64/python3.6:/usr/lib64/python3.6:/usr/lib64/python3.6/lib-dynload:/usr/lib64/python3.6/site-packages:/usr/lib/python3.6/site-packages:/usr/local/lib64/python3.6/site-packages:/usr/local/lib/python3.6/site-packages:/usr/lib64/ceph/mgr'
This means that if there's some random python package installed on the system that has the same name as a ceph-mgr module, ceph-mgr will try to load that thing, instead of the actual ceph-mgr module. This will of course fail, and the expected mgr module will not be available (see for example https://github.com/SUSE/DeepSea/pull/1543#issuecomment-466369489).
We can fix this by changing sys.path so the mgr module path comes before the various site-packages directories.
Updated by Tim Serong about 5 years ago
- Status changed from New to Fix Under Review
- Pull request ID set to 26623
Updated by Sage Weil about 5 years ago
- Status changed from Fix Under Review to Pending Backport
Updated by Nathan Cutler about 5 years ago
- Tags deleted (
luminous,mimic) - Backport set to luminous,mimic
Updated by Nathan Cutler about 5 years ago
- Copied to Backport #38531: luminous: If installed python packages share names with mgr modules, ceph-mgr loads the wrong thing added
Updated by Nathan Cutler about 5 years ago
- Copied to Backport #38532: mimic: If installed python packages share names with mgr modules, ceph-mgr loads the wrong thing added
Updated by Nathan Cutler about 3 years ago
- Status changed from Pending Backport to Resolved
While running with --resolve-parent, the script "backport-create-issue" noticed that all backports of this issue are in status "Resolved" or "Rejected".