Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12:Update
dracut
0306-95iscsi-set-rd.iscsi.firmware-for-qla4xxx-...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0306-95iscsi-set-rd.iscsi.firmware-for-qla4xxx-sessions.patch of Package dracut
Index: dracut-037/modules.d/95iscsi/iscsiroot.sh =================================================================== --- dracut-037.orig/modules.d/95iscsi/iscsiroot.sh +++ dracut-037/modules.d/95iscsi/iscsiroot.sh @@ -55,34 +55,44 @@ set_login_retries() { handle_firmware() { if ! [ -e /tmp/iscsistarted-firmware ]; then - local ipparam retries + local ifaces retry + # Depending on the 'ql4xdisablesysfsboot' qla4xxx + # will be autostarting sessions without presenting + # them via the firmware interface. + # In these cases 'iscsiadm -m fw' will fail, but + # the iSCSI sessions will still be present. if ! iscsistart -f; then warn "iscistart: Could not get list of targets from firmware." - return 1 - fi - - #default to ip setup via ibft - ipparam=$(getarg ip) - if [ "$ipparam" = "ibft" ] || [ -z "$ipparam" ]; then - iscsistart -N - fi + else + ifaces=( $(echo /sys/firmware/ibft/ethernet*) ) + [ -f /tmp/session-retry ] || echo 1 > /tmp/session-retry + retry=$(cat /tmp/session-retry) - for p in $(getargs rd.iscsi.param -d iscsi_param); do - iscsi_param="$iscsi_param --param $p" - done - - #limit iscsistart login retries - if [[ ! "$iscsi_param" =~ "node.session.initial_login_retry_max" ]]; then - set_login_retries - retries=$? - if [ $retries -gt 0 ]; then - iscsi_param="${iscsi_param% } --param node.session.initial_login_retry_max=$retries" + for p in $(getargs rd.iscsi.param -d iscsi_param); do + iscsi_param="$iscsi_param --param $p" + done + + #limit iscsistart login retries + if [[ ! "$iscsi_param" =~ "node.session.initial_login_retry_max" ]]; then + set_login_retries + retries=$? + if [ $retries -gt 0 ]; then + iscsi_param="${iscsi_param% } --param node.session.initial_login_retry_max=$retries" + fi fi - fi - if ! iscsistart -b $iscsi_param; then - warn "'iscsistart -b $iscsi_param' failed" + if [ $retry -lt ${#ifaces[*]} ]; then + let retry++ + echo $retry > /tmp/session-retry + return 1 + fi + + if ! iscsistart -b $iscsi_param; then + warn "'iscsistart -b $iscsi_param' failed" + else + need_shutdown + fi fi if [ -d /sys/class/iscsi_session ]; then Index: dracut-037/modules.d/95iscsi/module-setup.sh =================================================================== --- dracut-037.orig/modules.d/95iscsi/module-setup.sh +++ dracut-037/modules.d/95iscsi/module-setup.sh @@ -66,6 +66,7 @@ install_iscsiroot() { # qla4xxx flashnode session; skip iBFT discovery iscsi_initiator=$(cat /sys/class/iscsi_host/${iscsi_host}/initiatorname) echo "rd.iscsi.initiator=${iscsi_initiator}" + echo "rd.iscsi.firmware=1" return; fi done
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor