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
>From 7f4a56761cb44413b1b09fbae2c6c455aaa9fd58 Mon Sep 17 00:00:00 2001 From: Hans de Goede <hdegoede@xxxxxxxxxx> 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@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list