Skip to content

Commit f11b0d4

Browse files
bskjoismisanjumn
authored andcommitted
iscsi: Adapt package names for SUSE installations
When attempting to install iSCSI initiator and target packages on SUSE, it was observed that the test suite was failing due to incorrect package names. Specifically, SUSE utilizes open-iscsi for the iSCSI initiator, as opposed to iscsi-initiator-utils. Similarly, the SCSI target utilities on SUSE are provided by the tgt package, not scsi-target-utils. This commit introduces a conditional check for SUSE distributions to ensure the correct iSCSI initiator (open-iscsi) and target (tgt) packages are selected and installed, thereby resolving installation failures on SUSE systems. NOTE: This PR has already been merged in upstream. upstream PR: avocado-framework#4136 Signed-off-by: Kowshik Jois B S [email protected] Signed-off-by: Kowshik Jois B S <[email protected]>
1 parent 500e95a commit f11b0d4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

virttest/iscsi.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -797,8 +797,9 @@ class Iscsi(object):
797797
def create_iSCSI(params, root_dir=data_dir.get_tmp_dir()):
798798
iscsi_instance = None
799799
ubuntu = distro.detect().name == "Ubuntu"
800+
suse = distro.detect().name == "SuSE"
800801
# check and install iscsi initiator packages
801-
if ubuntu:
802+
if ubuntu or suse:
802803
iscsi_package = ["open-iscsi"]
803804
else:
804805
iscsi_package = ["iscsi-initiator-utils"]
@@ -813,7 +814,7 @@ def create_iSCSI(params, root_dir=data_dir.get_tmp_dir()):
813814
"target-utils or tgt package"
814815
)
815816
# try with scsi target utils if targetcli is not available
816-
if ubuntu:
817+
if ubuntu or suse:
817818
iscsi_package = ["tgt"]
818819
else:
819820
iscsi_package = ["scsi-target-utils"]

0 commit comments

Comments
 (0)