-
Bug
-
Resolution: Won't Do
-
Normal
-
rhel-7.9.z
-
None
-
None
-
rhel-sst-logical-storage
-
ssg_filesystems_storage_and_HA
-
1
-
False
-
-
None
-
None
-
None
-
None
-
If docs needed, set a value
-
-
Unspecified
-
None
Description of problem:
The /usr/bin/vdo script on RHEL 7 contains the following code in order to deal with importing modules from the vdo package:
~~~
- Temporary patch to address layout changes
for dir in sys.path:
vdoDir = os.path.join(dir, 'vdo')
if os.path.isdir(vdoDir):
sys.path.append(vdoDir)
break
~~~
This is so it can later do:
~~~
from utils import Command, Logger
from vdomgmnt import *
~~~
However, this can name clash with other installed modules (for example, if there's an 'utils' Python package that was installed via pip).
The RHEL 8 version of vdo already fixes this, using the correct syntax for importing Python code:
~~~
from vdo.utils import Command
from vdo.vdomgmnt import *
~~~
Version-Release number of selected component (if applicable):
vdo-6.1.3.23-5.el7.x86_64
How reproducible:
Every time if there's a package name that clashes with one of the vdo modules.
Steps to Reproduce:
1. Install a Python package that name clashes with one of the vdo modules (e.g. 'pip2 install utils')
2. Run 'vdo'
3.
Actual results:
Traceback (most recent call last):
File "/usr/bin/vdo", line 50, in <module>
from utils import Command, Logger
ImportError: cannot import name Command
Expected results:
No error, and vdo runs normally
Additional info:
- external trackers