From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Grac Date: Thu, 19 Dec 2013 16:28:53 +0100 Subject: [Cluster-devel] [PATCH 1/3] fencing: new option --method In-Reply-To: <467334290.3048666.1385742734730.JavaMail.root@redhat.com> References: <467334290.3048666.1385742734730.JavaMail.root@redhat.com> Message-ID: <52B310B5.3080306@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi Ondrej, I have several comments: * please include patches so they depends only on upstream or posted series (2/3 can depend on 1/3) [ e.g. problem with -EC_TOOL_FAIL ] On 11/29/2013 05:32 PM, Ondrej Mular wrote: > Add new option method --method for cycle reboot > > --- > fence/agents/lib/fencing.py.py | 80 ++++++++++++++++++++++++++++++------------ > 1 file changed, 57 insertions(+), 23 deletions(-) > ... > > +def multi_reboot_cycle_fn(tn, options, reboot_cycle_fn): > + success = False; > + if options.has_key("--plugs"): > + for plug in options["--plugs"]: > + try: > + options["--uuid"] = str(uuid.UUID(plug)) > + except ValueError: > + pass > + except KeyError: > + pass > + options["--plug"] = plug > + plug_status = reboot_cycle_fn(tn, options) > + if plug_status: > + success = plug_status > + else: > + success = reboot_cycle_fn(tn, options) > + return success Although we support multiple ports (--plugs) it is possible only when using 'method=offon' because otherwise we will just reboot port #1, reboot port #2, ... so the machine with redundant power supply will not be rebooted. We should end with a failure message when users attempts to do this combination. imho it will be best to include this constrain directly to do it in check_input() in fencing library m,