-
Bug
-
Resolution: Unresolved
-
Undefined
-
rhel-8.6.0, rhel-8.8.0, rhel-8.9.0
-
leapp-repository-0.21.0-3.el8_10
-
None
-
Moderate
-
FutureFeature
-
1
-
rhel-sst-upgrades
-
12
-
2
-
False
-
-
None
-
Red Hat Enterprise Linux
-
Leapp: 9.6 & 10.0
-
Requested
-
None
-
-
x86_64
-
None
What were you trying to do that didn't work?
The leapp upgrae fails with error.
File "/etc/leapp/repos.d/system_upgrade/common/actors/storagescanner/libraries/storagescanner.py", line 195, in _get_pvs_info
pv, vg, fmt, attr, psize, pfree = entry
ValueError: too many values to unpack (expected 6)
Please provide the package NVR for which bug is seen:
--> Leapp Package.
How reproducible:
--> Able to reproduce internally.
Steps to reproduce
[1] Before executing leapp preupgrade, Kindly modify naming scheme of the disk and change it to this format-> /dev/disk/by-path.
[a] Firstly we need to modify the /etc/lvm/lvm.conf . And add the parameter under "devices".
devices { use_devicesfile = 0 filter = [ "a|/dev/disk/by-path/.*|","a|loop|", "r|.*|" ] }
[b] After modifying the the /etc/lvm/lvm.conf, Kindly verify it by running the below command.
- From
# pvs -a PV VG Fmt Attr PSize PFree /dev/vda1 --- 0 0 /dev/vda2 rhel lvm2 a-- <19.00g 0
- To
# pvs -a PV VG Fmt Attr PSize PFree /dev/disk/by-path/pci-0000:04:00.0-part1 --- 0 0 /dev/disk/by-path/pci-0000:04:00.0-part2 rhel lvm2 a-- <19.00g 0
[c] If it's not reflecting then we need to regenerate the "Initramfs" and "reboot" the system.
# dracut -v -f # reboot
After reboot verify once again by executing the below command.
# pvs -a
[2] Now once we execute the leapp it will fail in the preupgrade process itself.
# leapp preupgrade. Traceback (most recent call last): File "/usr/lib64/python3.6/multiprocessing/process.py", line 258, in _bootstrap self.run() File "/usr/lib64/python3.6/multiprocessing/process.py", line 93, in run self._target(*self._args, **self._kwargs) File "/usr/lib/python3.6/site-packages/leapp/repository/actor_definition.py", line 74, in _do_run actor_instance.run(*args, **kwargs) File "/usr/lib/python3.6/site-packages/leapp/actors/__init__.py", line 289, in run self.process(*args) File "/etc/leapp/repos.d/system_upgrade/common/actors/storagescanner/actor.py", line 22, in process self.produce(storagescanner.get_storage_info()) File "/etc/leapp/repos.d/system_upgrade/common/actors/storagescanner/libraries/storagescanner.py", line 271, in get_storage_info pvs=_get_pvs_info(), File "/etc/leapp/repos.d/system_upgrade/common/actors/storagescanner/libraries/storagescanner.py", line 26, in inner return list(f(*args, **kwargs)) File "/etc/leapp/repos.d/system_upgrade/common/actors/storagescanner/libraries/storagescanner.py", line 195, in _get_pvs_info pv, vg, fmt, attr, psize, pfree = entry ValueError: too many values to unpack (expected 6) 2024-04-26 07:23:59.972 ERROR PID: 47105 leapp.workflow.FactsCollection: Actor storage_scanner has crashed: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/leapp/repository/actor_definition.py", line 74, in _do_run actor_instance.run(*args, **kwargs) File "/usr/lib/python3.6/site-packages/leapp/actors/__init__.py", line 289, in run self.process(*args) File "/etc/leapp/repos.d/system_upgrade/common/actors/storagescanner/actor.py", line 22, in process self.produce(storagescanner.get_storage_info()) File "/etc/leapp/repos.d/system_upgrade/common/actors/storagescanner/libraries/storagescanner.py", line 271, in get_storage_info pvs=_get_pvs_info(), File "/etc/leapp/repos.d/system_upgrade/common/actors/storagescanner/libraries/storagescanner.py", line 26, in inner return list(f(*args, **kwargs)) File "/etc/leapp/repos.d/system_upgrade/common/actors/storagescanner/libraries/storagescanner.py", line 195, in _get_pvs_info pv, vg, fmt, attr, psize, pfree = entry ValueError: too many values to unpack (expected 6)
Expected results
While performing the "leapp preupgarde" following error should not be reported "Actor storage_scanner unexpectedly terminated with exit code: 1"
Actual results
The leapp preupgrade looks as below:-
Traceback (most recent call last): File "/usr/lib64/python3.6/multiprocessing/process.py", line 258, in _bootstrap self.run() File "/usr/lib64/python3.6/multiprocessing/process.py", line 93, in run self._target(*self._args, **self._kwargs) File "/usr/lib/python3.6/site-packages/leapp/repository/actor_definition.py", line 74, in _do_run actor_instance.run(*args, **kwargs) File "/usr/lib/python3.6/site-packages/leapp/actors/__init__.py", line 289, in run self.process(*args) File "/etc/leapp/repos.d/system_upgrade/common/actors/storagescanner/actor.py", line 22, in process self.produce(storagescanner.get_storage_info()) File "/etc/leapp/repos.d/system_upgrade/common/actors/storagescanner/libraries/storagescanner.py", line 271, in get_storage_info pvs=_get_pvs_info(), File "/etc/leapp/repos.d/system_upgrade/common/actors/storagescanner/libraries/storagescanner.py", line 26, in inner return list(f(*args, **kwargs)) File "/etc/leapp/repos.d/system_upgrade/common/actors/storagescanner/libraries/storagescanner.py", line 195, in _get_pvs_info pv, vg, fmt, attr, psize, pfree = entry ValueError: too many values to unpack (expected 6) 2024-04-26 07:23:59.972 ERROR PID: 47105 leapp.workflow.FactsCollection: Actor storage_scanner has crashed: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/leapp/repository/actor_definition.py", line 74, in _do_run actor_instance.run(*args, **kwargs) File "/usr/lib/python3.6/site-packages/leapp/actors/__init__.py", line 289, in run self.process(*args) File "/etc/leapp/repos.d/system_upgrade/common/actors/storagescanner/actor.py", line 22, in process self.produce(storagescanner.get_storage_info()) File "/etc/leapp/repos.d/system_upgrade/common/actors/storagescanner/libraries/storagescanner.py", line 271, in get_storage_info pvs=_get_pvs_info(), File "/etc/leapp/repos.d/system_upgrade/common/actors/storagescanner/libraries/storagescanner.py", line 26, in inner return list(f(*args, **kwargs)) File "/etc/leapp/repos.d/system_upgrade/common/actors/storagescanner/libraries/storagescanner.py", line 195, in _get_pvs_info pv, vg, fmt, attr, psize, pfree = entry ValueError: too many values to unpack (expected 6)
Workaround:-
First:-
[1] Rather than using the disk by path naming, kindly use the UUID naming scheme.
- From
devices { use_devicesfile = 0 filter = [ "a|/dev/disk/by-path/.*|","a|loop|", "r|.*|" ] }
- TO
devices { use_devicesfile = 0 filter = [ "a|/dev/disk/by-uuid/.*|","a|loop|", "r|.*|" ] }
Second:-
[1] Need to edit the file "/etc/leapp/repos.d/system_upgrade/common/actors/storagescanner/libraries/storagescanner.py" in line 195, in _get_pvs_info
--> The fix was pretty simple, just need to use '|' instead of ':' as separator
""" Collect storage info from pvs command """ for entry in _get_cmd_output(['pvs', '--noheadings', '--separator', r':'], ':', 6): for entry in _get_cmd_output(['pvs', '--noheadings', '--separator', r'|'], '|', 6): pv, vg, fmt, attr, psize, pfree = entry
""" Collect storage info from vgs command """ for entry in _get_cmd_output(['vgs', '--noheadings', '--separator', r':'], ':', 7): for entry in _get_cmd_output(['vgs', '--noheadings', '--separator', r'|'], '|', 7): vg, pv, lv, sn, attr, vsize, vfree = entry
""" Collect storage info from lvdisplay command """ for entry in _get_cmd_output(['lvdisplay', '-C', '--noheadings', '--separator', r':'], ':', 12): for entry in _get_cmd_output(['lvdisplay', '-C', '--noheadings', '--separator', r'|'], '|', 12): lv, vg, attr, lsize, pool, origin, data, meta, move, log, cpy_sync, convert = entry
- mentioned in
-
Page Loading...