Skip to content

Commit

Permalink
respect explicit user choice for full path in zfcp dracut_setup_args
Browse files Browse the repository at this point in the history
Complements RHBZ#1937030.

Signed-off-by: Steffen Maier <[email protected]>
  • Loading branch information
steffen-maier committed Oct 13, 2023
1 parent 2bf4c37 commit 745d45c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion blivet/devices/disk.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,)])
Expand Down

0 comments on commit 745d45c

Please sign in to comment.