Skip to content

Commit

Permalink
Merge pull request ceph#291 from SUSE/ses5-fix-iscsi_smoke_test
Browse files Browse the repository at this point in the history
qa/tasks: iscsiadm should listen on non lo ip address
  • Loading branch information
smithfarm committed May 6, 2019
2 parents aedf222 + 712e339 commit 9bb2035
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion qa/tasks/scripts/iscsi_smoke_test.sh
Expand Up @@ -11,7 +11,16 @@ zypper --non-interactive --no-gpg-checks install \
systemctl start iscsid.service
sleep 5
systemctl --no-pager --full status iscsid.service
iscsiadm -m discovery -t st -p $(hostname)
# Find out ipv4 address of the first non-localhost network device.
# We can't use this because ip -j is not supported yet for sle12-sp3
# my_ip=$(ip -4 -j a show |
# jq -r '[.[]|select(."ifname" != "lo")][0] |.addr_info[]|.local')
# Using brief format, for example:
# lo UNKNOWN 127.0.0.1/8
# eth0 UP 192.168.0.1/24
first_non_lo_dev=($(ip -4 -br a | grep -v ^lo | head -1))
my_ip=${first_non_lo_dev[2]%/*}
iscsiadm -m discovery -t st -p $my_ip
iscsiadm -m node -L all
sleep 5
ls -l /dev/disk/by-path
Expand Down

0 comments on commit 9bb2035

Please sign in to comment.