[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: PATCH: Remove obsolete and unused code from _stopIscsiDaemon (#470229)



On Thu, Nov 06, 2008 at 05:16:47PM +0100, Hans de Goede wrote:
> hi All,
>
> Januari 2008 _stopIscsiDaemon moved to using "iscsiadm -k 0" instead of using
> "killall iscsid", but the old code (which also logs out of all targets which
> the new code does not do) was kept as fallback, since "iscsiadm -k 0"
> practically always works, and since the old fallback code behaves differently
> (also logs out of all targets), remove the old code.
>
> This patch also fixes the new code not setting iscsidStarted to False when
> iscsid was successfully stopped.
>
> Regards,
>
> Hans
>

Minus signs good.  I like it.

> >From 7f4a56761cb44413b1b09fbae2c6c455aaa9fd58 Mon Sep 17 00:00:00 2001
> From: Hans de Goede <hdegoede redhat com>
> Date: Thu, 6 Nov 2008 17:10:31 +0100
> Subject: [PATCH] Remove obsolete normally never reached code from _stopIscsiDaemon (#470229)
> 
> Januari 2008 _stopIscsiDaemon moved to using "iscsiadm -k 0" instead of using
> "killall iscsid", but the old code (which also logs out of all targets which
> the new code does not do) was kept as fallback, since "iscsiadm -k 0"
> practically always works, and since the old fallback code behaves differently
> (also logs out of all targets), remove the old code.
> 
> This patch also fixes the new code not setting iscsidStarted to False when
> iscsid was successfully stopped.
> ---
>  iscsi.py |   14 --------------
>  1 files changed, 0 insertions(+), 14 deletions(-)
> 
> diff --git a/iscsi.py b/iscsi.py
> index 915e9ca..f65e0db 100644
> --- a/iscsi.py
> +++ b/iscsi.py
> @@ -312,20 +312,6 @@ class iscsi(object):
>          result = iutil.execWithCapture(ISCSIADM, ["-k", "0"])
>          result.strip()
>          if result == "":
> -            return
> -
> -        psout = iutil.execWithCapture("/usr/bin/pidof", ["iscsid"])
> -        if psout.strip() != "":
> -            log.info("iSCSI shutdown")
> -            for t in self.targets:
> -                t.logout()
> -
> -            for pidstr in psout.split():
> -                pid = string.atoi(pidstr)
> -                log.info("killing %s %d" % (ISCSID, pid))
> -
> -                os.kill(pid, signal.SIGKILL)
> -
>              self.iscsidStarted = False
>  
>      def shutdown(self):
> -- 
> 1.6.0.3
> 

> _______________________________________________
> Anaconda-devel-list mailing list
> Anaconda-devel-list redhat com
> https://www.redhat.com/mailman/listinfo/anaconda-devel-list

-- 
David Cantrell <dcantrell redhat com>
Red Hat / Honolulu, HI

Attachment: pgpJ35C9PWfdx.pgp
Description: PGP signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]