From 745d45ce0d39349ecc7928bce84c9d1e7b3eeace Mon Sep 17 00:00:00 2001 From: Steffen Maier Date: Tue, 28 Feb 2023 17:48:04 +0100 Subject: [PATCH] respect explicit user choice for full path in zfcp dracut_setup_args Complements RHBZ#1937030. Signed-off-by: Steffen Maier --- blivet/devices/disk.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/blivet/devices/disk.py b/blivet/devices/disk.py index 5053f7bb8..676637543 100644 --- a/blivet/devices/disk.py +++ b/blivet/devices/disk.py @@ -496,7 +496,12 @@ def dracut_setup_args(self): from ..zfcp import has_auto_lun_scan # zFCP auto LUN scan needs only the device ID - if has_auto_lun_scan(self.hba_id): + # If the user explicitly over-specified with a full path configuration + # respect this choice and emit a full path specification nonetheless. + errorlevel = util.run_program(["lszdev", "zfcp-lun", "--configured", + "%s:%s:%s" % (self.hba_id, self.wwpn, + self.fcp_lun)]) + if has_auto_lun_scan(self.hba_id) and errorlevel != 0: dracut_args = set(["rd.zfcp=%s" % self.hba_id]) else: dracut_args = set(["rd.zfcp=%s,%s,%s" % (self.hba_id, self.wwpn, self.fcp_lun,)])