Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Soften zfcp validation not to expect strict mapping #11872

Merged
merged 1 commit into from
Feb 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 0 additions & 2 deletions schedule/yast/zfcp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,11 @@ test_data:
port_type: 'NPIV VPORT'
fcp_luns:
- wwpn: '0x500507630718d3b3'
names: 'sda sg0'
scsi:
peripheral_type: disk
vendor_model_revision: 'IBM'
device_node_name: '/dev/sda'
- wwpn: '0x500507630713d3b3'
names: 'sdb sg1'
scsi:
peripheral_type: disk
vendor_model_revision: 'IBM'
Expand Down
6 changes: 3 additions & 3 deletions tests/console/validate_zfcp.pm
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ sub verify_scsi_devices {
my $vendor_model_revision = $lun->{scsi}->{vendor_model_revision};
my $device_node_name = $lun->{scsi}->{device_node_name};
my $iscsi_output = script_output("lsscsi | grep '$device_node_name'");

unless ($iscsi_output =~ /^\[(?<hctl>.*)\]\s*$peripheral_type\s+$vendor_model_revision/)
{
die "SCSI device $device_node_name was not found with peripheral type '$peripheral_type' and " .
Expand All @@ -133,10 +134,9 @@ sub verify_scsi_devices {
validate_script_output("lszfcp -D -b $fcp_channel | grep '$bus_wwpn'", qr/$hctl/);

# Validate scsi devices with specific command for zfcp: lszdev
my $names = $lun->{names};
$bus_wwpn = "$fcp_channel:$wwpn";
validate_script_output("lszdev --no-headings zfcp-lun | grep '$names'",
jknphy marked this conversation as resolved.
Show resolved Hide resolved
qr/$bus_wwpn/);
assert_script_run("lszdev --no-headings zfcp-lun | grep $bus_wwpn",
fail_message => "Device with wwpn: '$bus_wwpn' not listed in lszdev output");

# Set SCSI devices offline and set back online (other states are also possible)
my $state_file = "\"/sys/bus/scsi/devices/$hctl/state\"";
Expand Down