Description of problem: Before 4.2, it was possible to the documentation for vdsm configuration file by running vdsm/config.py as a script: python /usr/lib/python2.7/site-packages/vdsm/common/config.py This fails now with this error: # python /usr/lib/python2.7/site-packages/vdsm/common/config.py Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/vdsm/common/config.py", line 739, in <module> config = load('vdsm') File "/usr/lib/python2.7/site-packages/vdsm/common/config.py", line 711, in load read_configs(cfg, name) File "/usr/lib/python2.7/site-packages/vdsm/common/config.py", line 733, in read_configs dropins.extend(glob.glob(pattern)) AttributeError: 'module' object has no attribute 'glob' The issue is the new vdsm/common/glob.py module, added in: commit fd13ee1e55d61f06516ad10c890470a2c822b9c8 Author: Idan Shaby <ishaby> Date: Thu Jan 12 18:43:56 2017 +0200 compat: add glob.escape from Python 3.6 glob.escape was added in Python 3.6. Since we need it for escaping values that are passed to glob.glob, this patch adds it to glob.py. Change-Id: Id2989a9edcc87ec671d8c29ec7900e01b537b3f1 Related-To: https://bugzilla.redhat.com/1302358 Signed-off-by: Idan Shaby <ishaby> But having a glob.py module in vdsm is correct; we use absolute imports, so this module does not hide the python stdlib glob module. In vdsm, we import our private glob with: from vdsm.common import glob So the real issue is running config.py as a script - this is not a reliable way to print configuration, since running a script change PYTHONPATH to include the directory where the script is located, and this hides the python builtin glob module. The right way to print the configuration is: # python -c "from vdsm.common import config; config.print_config()" # VDSM Sample Configuration [vars] # Enable core dump. # core_dump_enable = true # Reserves memory for the host to prevent VMs from using all the # physical pages. The values are in Mbytes. # host_mem_reserve = 256 ... Version-Release number of selected component (if applicable): vdsm > 4.19.10 How reproducible: Always Steps to Reproduce: 1. Run: python /usr/lib/python2.7/site-packages/vdsm/common/config.py I think the best way to resolve this would be to convert config.py to regular module, so it is not possible to run it as a script. If the feature of printing the configuration is important enough, it should be provided by "vdsm-tool show-default-config".
This is a regression introduced in 4.1.
This bug report has Keywords: Regression or TestBlocker. Since no regressions or test blockers are allowed between releases, it is also being identified as a blocker for this release. Please resolve ASAP.
Removing regression keyword to avoid automatic assignment of blocker flag.
Verified on vdsm-4.40.0-180.giteba0b75.el8ev.x86_64 Now you can do 'vdsm-tool show-default-config'
This bugzilla is included in oVirt 4.4.0 release, published on May 20th 2020. Since the problem described in this bug report should be resolved in oVirt 4.4.0 release, it has been closed with a resolution of CURRENT RELEASE. If the solution does not work for you, please open a new bug report.