Doron Shoham wrote:
>> If you promise to test me the script with the STP fixes I'll be willing
>> to add it. Sadly I don't have time currently to do any decent testing here,
>> but I'm always open to patches :-)
>>
>> Cheers,
>>
>> Hannes
> 
> Hi Hannes,
> 
> Unfortunately I don't have any setup which I could test any script with STP 
> fixes.
> As far as I understood, due to Mike's patch, there is no need to re-discover 
> all nodes
> at startup.
> So I suggest to remove the re-discover and to logout from all nodes and not
> only from the automatic nodes.
> Please tell me if what is your opinion.
> 
> Thanks,
> Doron
> 
> 
> revert some of the changes from commit 
> 2146208ccd8c6579fa1accbe3dbe7181b46539b3.
> logout to all nodes when stopping open-iscsi.
> do not try to re-discover nodes on startup.
> 
> Signed-off-by: Doron Shoham <[EMAIL PROTECTED]>
> ---
>  etc/initd/initd.suse |   40 ++--------------------------------------
>  1 files changed, 2 insertions(+), 38 deletions(-)
> 
> diff --git a/etc/initd/initd.suse b/etc/initd/initd.suse
> index 23bbac0..4bf216c 100644
> --- a/etc/initd/initd.suse
> +++ b/etc/initd/initd.suse
> @@ -39,8 +39,8 @@ iscsi_login_all_nodes()
>  iscsi_logout_all_nodes()
>  {
>       echo -n "Closing all iSCSI connections: "
> -     # Logout from all sessions marked automatic
> -     if ! $ISCSIADM -m node --logoutall=automatic 2> /dev/null; then
> +     # Logout from all sessions
> +     if ! $ISCSIADM -m node --logoutall=all 2> /dev/null; then
>               if [ $? == 19 ] ; then
>                   RETVAL=6
>               else
No. We cannot do this as it kills root on iSCSI. We can only logout
from the nodes marked 'automatic' and 'manual', not those marked 'onboot'.

> @@ -101,38 +101,6 @@ iscsi_list_all_nodes()
>      done
>  }
>  
> -iscsi_discover_all_targets()
> -{
> -     # Strip off any existing ID information
> -     RAW_NODE_LIST=`iscsiadm -m node | sed -nre 's/^(\[[0-9a-f]*\] 
> )?(.*)$/\2/p'`
> -     # Obtain IPv4 list
> -     IPV4_NODE_LIST=`echo "$RAW_NODE_LIST" | sed -nre 
> 's/^([0-9]{1,3}(\.[0-9]{1,3}){3}):[^: ]* (.*)$/\1 \3/p'`
> -     # Now obtain IPv6 list
> -     IPV6_NODE_LIST=`echo "$RAW_NODE_LIST" | sed -nre 
> 's/^([0-9a-f]{1,4}(:[0-9a-f]{0,4}){6}:[0-9a-f]{1,4}):[^: ]* (.*)$/\1 \3/p'`
> -
> -     DISC_TARGETS=""
> -     while read NODE_ADDR NODE_NAME; do
> -             [ -z "$NODE_ADDR" -a -z "$NODE_NAME" ] && continue
> -             NODE_ATTRS=`iscsiadm -m node -p "$NODE_ADDR" -T "$NODE_NAME"`
> -             NODE_STATUS=`echo "$NODE_ATTRS" | sed -nre 
> 's/^.*node\.conn\[0\]\.startup = ([a-z]*).*$/\1/p'`
> -
> -             if [ "$NODE_STATUS" == 'automatic' ]; then
> -                     DISC_TARGETS=`echo "$DISC_TARGETS" | sed -re 
> '/'"$NODE_ADDR"'/!{s/(.*)/\1 '"$NODE_ADDR"'/}'`
> -             fi
> -     done < <(echo "$IPV4_NODE_LIST"; echo "$IPV6_NODE_LIST")
> -
> -     for TARGET_ADDR in $DISC_TARGETS; do
> -             echo -n "Attempting discovery on target at ${TARGET_ADDR}: "
> -             iscsiadm -m discovery -t st -p "$TARGET_ADDR" > /dev/null 2>&1
> -             if [ "$?" -ne 0 ]; then
> -                     rc_failed 1
> -                     rc_status -v
> -                     return 1
> -             fi
> -             rc_status -v
> -     done
> -}
> -
>  case "$1" in
>      start)
>       [ ! -d /var/lib/iscsi ] && mkdir -p /var/lib/iscsi
> @@ -147,10 +115,6 @@ case "$1" in
>           rc_status -v
>       fi
>       if [ "$RETVAL" == "0" ]; then
> -         iscsi_discover_all_targets
> -         RETVAL=$?
> -     fi
> -     if [ "$RETVAL" == "0" ]; then
>           iscsi_login_all_nodes
>       fi
>       ;;

Yes, this looks okay. However, I would _really_ like to test it against the STP 
scenario.
Hmm. I see if I can pull it in for SLES11. Care to open a bugzilla?

Cheers,

Hannes
-- 
Dr. Hannes Reinecke                   zSeries & Storage
[EMAIL PROTECTED]                             +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Markus Rex, HRB 16746 (AG Nürnberg)

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To post to this group, send email to open-iscsi@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/open-iscsi
-~----------~----~----~----~------~----~------~--~---

Reply via email to