Skip to content

Commit

Permalink
fix(iscsi): do not exit in handle_netroot() if discovery failed
Browse files Browse the repository at this point in the history
User may specify multiple netroot in cmdline, failed to connect one netroot
do not mean all netroot are not accessible. So if one netroot failed, do
not exit the discovery and login flow.

Signed-off-by: Wenchao Hao <haowenchao@huawei.com>
  • Loading branch information
Wenchao Hao authored and johannbg committed May 5, 2022
1 parent b3ab303 commit 319dc7f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules.d/95iscsi/iscsiroot.sh
Expand Up @@ -229,7 +229,7 @@ handle_netroot() {
echo "$target"
done
})
[ -z "$targets" ] && echo "Target discovery to $iscsi_target_ip:${iscsi_target_port:+$iscsi_target_port} failed with status $?" && exit 1
[ -z "$targets" ] && warn "Target discovery to $iscsi_target_ip:${iscsi_target_port:+$iscsi_target_port} failed with status $?" && return 1

found=
for target in $targets; do
Expand Down

0 comments on commit 319dc7f

Please sign in to comment.