[Pkg-iscsi-maintainers] Bug#748940: iscsitarget: "service iscsitaget stop" fails when under load

Ritesh Raj Sarraf rrs at debian.org
Fri May 23 15:10:24 UTC 2014


On 05/23/2014 08:35 PM, Ritesh Raj Sarraf wrote:
> I need to verify that. I'm not very sure how it would really behave.
>
>
> What exactly is your requirement ? Do you want the init script to exit
> clean irrespective of the module state ?

Hey Craig,

By the way, that is not the init scirpt that we ship in Debian. And for
the one that we ship, We are handling your case, as in your rmmod --wait
option.


        # check if the module is loaded at all
        lsmod | grep -q iscsi_trgt
        RETVAL=$?
        if [ $RETVAL = "0" ] ; then

                for i in $(seq $ISCSITARGET_MAX_SLEEP); do
                        log_daemon_msg "Removing iSCSI enterprise target
modules: "
                        modprobe -r iscsi_trgt
                        RETVAL=$?
                        if [ $RETVAL = "0" ]; then
                                break
                        fi
                        # give iet some time to finish processing
                        sleep 1
                done

                modprobe -r crc32c 2>/dev/null
                if [ $RETVAL = "0" ]; then
                        log_end_msg 0
                else
                        log_end_msg 1
                        exit $RETVAL
                fi
        fi


-- 
Ritesh Raj Sarraf | http://people.debian.org/~rrs
Debian - The Universal Operating System

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-iscsi-maintainers/attachments/20140523/c662ff0d/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-iscsi-maintainers/attachments/20140523/c662ff0d/attachment.sig>


More information about the Pkg-iscsi-maintainers mailing list