From 4e338b93999996f9eae873d7aab84ef30dd0688e Mon Sep 17 00:00:00 2001 From: Marek 'marx' Grac Date: Wed, 17 Jun 2015 19:40:11 +0200 Subject: [PATCH 03/10] fence_scsi: Status report "off" if any device is off during "on" action We need status to report "on" if any device is on most of the time so that stonith or other entities can know if a host is capable of accessing shared resources, but during an "on" action this is problematic because even if some devices are off, we will skip turning them on since we reported the status as on. This changes the behavior to report "off" if any device is off, but only during "on" actions. Resolves: rhbz#1214919 --- fence/agents/scsi/fence_scsi.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fence/agents/scsi/fence_scsi.py b/fence/agents/scsi/fence_scsi.py index de301a5..f373e6b 100644 --- a/fence/agents/scsi/fence_scsi.py +++ b/fence/agents/scsi/fence_scsi.py @@ -32,6 +32,9 @@ def get_status(conn, options): else: logging.debug("No registration for key "\ + options["--key"] + " on device " + dev + "\n") + if options["--action"] == "on": + status = "off" + break return status -- 1.9.3