From d2cfdd0cabb2da938b596386d53a267910624a96 Mon Sep 17 00:00:00 2001 From: tomasfratrik Date: Fri, 28 Jun 2024 14:27:41 +0200 Subject: [PATCH] Fix storage scanner parsing error Output separators were before set to ':', but the output values could also contain this symbol, therefore changing separator symbol should fix this issue. Jira: RHEL-34570 --- .../actors/storagescanner/libraries/storagescanner.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/repos/system_upgrade/common/actors/storagescanner/libraries/storagescanner.py b/repos/system_upgrade/common/actors/storagescanner/libraries/storagescanner.py index f15f0d87d6..b4614e2ac1 100644 --- a/repos/system_upgrade/common/actors/storagescanner/libraries/storagescanner.py +++ b/repos/system_upgrade/common/actors/storagescanner/libraries/storagescanner.py @@ -191,7 +191,7 @@ def _get_lsblk_info(): @aslist def _get_pvs_info(): """ 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 yield PvsEntry( pv=pv, @@ -205,7 +205,7 @@ def _get_pvs_info(): @aslist def _get_vgs_info(): """ 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 yield VgsEntry( vg=vg, @@ -220,7 +220,7 @@ def _get_vgs_info(): @aslist def _get_lvdisplay_info(): """ 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 yield LvdisplayEntry( lv=lv,