<div dir="ltr">Hi,<div><br></div><div>Fence agents have not understood 'XXs' notations until recently. Currently, it is supported only in unreleased upstream (master branch of git repo) and it is planned to be included in next releases of both upstream and RHEL. As it requires some changes in pcs, it is hard to expect when it will happend. </div><div><br></div><div>Bug is tracked: <a href="https://bugzilla.redhat.com/show_bug.cgi?id=1377928">https://bugzilla.redhat.com/show_bug.cgi?id=1377928</a></div><div><br></div><div>m,</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jul 13, 2017 at 3:11 PM, Ron Kerry <span dir="ltr"><<a href="mailto:ron.kerry@hpe.com" target="_blank">ron.kerry@hpe.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I have a customer who recently tried to create fence-ipmilan resources with a power_timeout parameters set to 60s. His reasoning was that the parameter is set to be a string value, so he expected the 's' modifier on the 60 value to be interpreted correctly. It is not.<br>
<br>
    <parameter name="power_timeout" unique="0" required="0"><br>
        <getopt mixed="--power-timeout=[second<wbr>s]" /><br>
        <content type="string" default="20"  /><br>
        <shortdesc lang="en">Test X seconds for status change after ON/OFF</shortdesc><br>
    </parameter><br>
<br>
Here is an example of his resource definition.<br>
<br>
primitive smc0002_fencing stonith:fence_ipmilan \<br>
        params ipaddr=X.X.X.X login=admin passwd=pppppp lanplus=true power_timeout=60s pcmk_host_check=static-list pcmk_host_list=smc0002 \<br>
        op stop on-fail=ignore interval=0 timeout=20s \<br>
        op monitor interval=60s timeout=20s \<br>
        meta target-role=Started<br>
<br>
STONITH does not work and gets the following errors.<br>
<br>
-----<br>
Jul 13 00:34:20 smc0001 stonith-ng[3921]:  notice: Client stonith_admin.30337.1d0dee53 wants to fence (reboot) 'smc0002' with device '(any)'<br>
Jul 13 00:34:20 smc0001 stonith-ng[3921]:  notice: Requesting peer fencing (reboot) of smc0002<br>
Jul 13 00:34:20 smc0001 stonith-ng[3921]:  notice: smc0002_fencing can fence (reboot) smc0002: static-list<br>
Jul 13 00:34:20 smc0001 stonith-ng[3921]:  notice: smc0002_fencing can fence (reboot) smc0002: static-list<br>
Jul 13 00:34:20 smc0001 python: detected unhandled Python exception in '/usr/sbin/fence_ipmilan'<br>
Jul 13 00:34:20 smc0001 python: can't communicate with ABRT daemon, is it running? [Errno 2] No such file or directory<br>
Jul 13 00:34:20 smc0001 stonith-ng[3921]: warning: fence_ipmilan[30338] stderr: [ Traceback (most recent call last): ]<br>
Jul 13 00:34:20 smc0001 stonith-ng[3921]: warning: fence_ipmilan[30338] stderr: [   File "/usr/sbin/fence_ipmilan", line 204, in <module> ]<br>
Jul 13 00:34:20 smc0001 stonith-ng[3921]: warning: fence_ipmilan[30338] stderr: [     main() ]<br>
Jul 13 00:34:20 smc0001 stonith-ng[3921]: warning: fence_ipmilan[30338] stderr: [   File "/usr/sbin/fence_ipmilan", line 200, in main ]<br>
Jul 13 00:34:20 smc0001 stonith-ng[3921]: warning: fence_ipmilan[30338] stderr: [     result = fence_action(None, options, set_power_status, get_power_status, None, reboot_fn) ]<br>
Jul 13 00:34:20 smc0001 stonith-ng[3921]: warning: fence_ipmilan[30338] stderr: [   File "/usr/share/fence/fencing.py", line 973, in fence_action ]<br>
Jul 13 00:34:20 smc0001 stonith-ng[3921]: warning: fence_ipmilan[30338] stderr: [     status = get_multi_power_fn(tn, options, get_power_fn) ]<br>
Jul 13 00:34:20 smc0001 stonith-ng[3921]: warning: fence_ipmilan[30338] stderr: [   File "/usr/share/fence/fencing.py", line 880, in get_multi_power_fn ]<br>
Jul 13 00:34:20 smc0001 stonith-ng[3921]: warning: fence_ipmilan[30338] stderr: [     plug_status = get_power_fn(tn, options) ]<br>
Jul 13 00:34:20 smc0001 stonith-ng[3921]: warning: fence_ipmilan[30338] stderr: [   File "/usr/sbin/fence_ipmilan", line 17, in get_power_status ]<br>
Jul 13 00:34:20 smc0001 stonith-ng[3921]: warning: fence_ipmilan[30338] stderr: [     output = run_command(options, create_command(options, "status")) ]<br>
Jul 13 00:34:20 smc0001 stonith-ng[3921]: warning: fence_ipmilan[30338] stderr: [   File "/usr/share/fence/fencing.py", line 1192, in run_command ]<br>
Jul 13 00:34:20 smc0001 stonith-ng[3921]: warning: fence_ipmilan[30338] stderr: [     timeout = float(timeout) ]<br>
Jul 13 00:34:20 smc0001 stonith-ng[3921]: warning: fence_ipmilan[30338] stderr: [ ValueError: invalid literal for float(): 60s ]<br>
Jul 13 00:34:21 smc0001 python: detected unhandled Python exception in '/usr/sbin/fence_ipmilan'<br>
Jul 13 00:34:22 smc0001 python: can't communicate with ABRT daemon, is it running? [Errno 2] No such file or directory<br>
Jul 13 00:34:22 smc0001 stonith-ng[3921]: warning: fence_ipmilan[30343] stderr: [ Traceback (most recent call last): ]<br>
Jul 13 00:34:22 smc0001 stonith-ng[3921]: warning: fence_ipmilan[30343] stderr: [   File "/usr/sbin/fence_ipmilan", line 204, in <module> ]<br>
Jul 13 00:34:22 smc0001 stonith-ng[3921]: warning: fence_ipmilan[30343] stderr: [     main() ]<br>
Jul 13 00:34:22 smc0001 stonith-ng[3921]: warning: fence_ipmilan[30343] stderr: [   File "/usr/sbin/fence_ipmilan", line 200, in main ]<br>
Jul 13 00:34:22 smc0001 stonith-ng[3921]: warning: fence_ipmilan[30343] stderr: [     result = fence_action(None, options, set_power_status, get_power_status, None, reboot_fn) ]<br>
Jul 13 00:34:22 smc0001 stonith-ng[3921]: warning: fence_ipmilan[30343] stderr: [   File "/usr/share/fence/fencing.py", line 973, in fence_action ]<br>
Command failed: No route to host<br>
Jul 13 00:34:22 smc0001 stonith-ng[3921]: warning: fence_ipmilan[30343] stderr: [     status = get_multi_power_fn(tn, options, get_power_fn) ]<br>
Jul 13 00:34:22 smc0001 stonith-ng[3921]: warning: fence_ipmilan[30343] stderr: [   File "/usr/share/fence/fencing.py", line 880, in get_multi_power_fn ]<br>
Jul 13 00:34:22 smc0001 stonith-ng[3921]: warning: fence_ipmilan[30343] stderr: [     plug_status = get_power_fn(tn, options) ]<br>
Jul 13 00:34:22 smc0001 stonith-ng[3921]: warning: fence_ipmilan[30343] stderr: [   File "/usr/sbin/fence_ipmilan", line 17, in get_power_status ]<br>
Jul 13 00:34:22 smc0001 stonith-ng[3921]: warning: fence_ipmilan[30343] stderr: [     output = run_command(options, create_command(options, "status")) ]<br>
Jul 13 00:34:22 smc0001 stonith-ng[3921]: warning: fence_ipmilan[30343] stderr: [   File "/usr/share/fence/fencing.py", line 1192, in run_command ]<br>
Jul 13 00:34:22 smc0001 stonith-ng[3921]: warning: fence_ipmilan[30343] stderr: [     timeout = float(timeout) ]<br>
[root@smc0001 lib64]# Jul 13 00:34:22 smc0001 stonith-ng[3921]: warning: fence_ipmilan[30343] stderr: [ ValueError: invalid literal for float(): 60s ]<br>
Jul 13 00:34:22 smc0001 stonith-ng[3921]:   error: Operation 'reboot' [30343] (call 2 from stonith_admin.30337) for host 'smc0002' with device 'smc0002_fencing' returned: -201 (Generic Pacemaker error)<br>
Jul 13 00:34:22 smc0001 stonith-ng[3921]:  notice: Couldn't find anyone to fence (reboot) smc0002 with any device<br>
Jul 13 00:34:22 smc0001 stonith-ng[3921]:   error: Operation reboot of smc0002 by <no-one> for stonith_admin.30337@smc0001.a7<wbr>b73c3b: No route to host<br>
Jul 13 00:34:22 smc0001 crmd[3925]:  notice: Peer smc0002 was not terminated (reboot) by <anyone> for smc0001: No route to host (ref=a7b73c3b-b67f-4a85-815e-d<wbr>f877055eb37) by client stonith_admin.30337<br>
----<br>
<br>
So clearly, the code is expecting power_timeout to be an integer value. I suspect this is also true for the other internal timeout values: timeout, login_timeout, shell_timeout, power_timeout.<br>
<br>
Is this a bug? Should the metadata definitions define these parameters as integers or floats instead of strings? Or should the code correctly interpret the 's' (or other modifiers)? Or should the metadata documentation clearly state that no time modifiers like 's' are allowed in order to facilitate specifying fractional numbers of seconds? Or is this just the way it is (if so, please give me some logical reasoning that I can pass along to the customer)?<br>
<br>
-- <br>
<br>
Ron Kerry<br>
Global Product Support<br>
<br>
<a href="mailto:ron.kerry@hpe.com" target="_blank">ron.kerry@hpe.com</a><br>
Hewlett Packard Enterprise<br>
<br>
<br>
______________________________<wbr>_________________<br>
Users mailing list: <a href="mailto:Users@clusterlabs.org" target="_blank">Users@clusterlabs.org</a><br>
<a href="http://lists.clusterlabs.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.clusterlabs.org/m<wbr>ailman/listinfo/users</a><br>
<br>
Project Home: <a href="http://www.clusterlabs.org" rel="noreferrer" target="_blank">http://www.clusterlabs.org</a><br>
Getting started: <a href="http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf" rel="noreferrer" target="_blank">http://www.clusterlabs.org/doc<wbr>/Cluster_from_Scratch.pdf</a><br>
Bugs: <a href="http://bugs.clusterlabs.org" rel="noreferrer" target="_blank">http://bugs.clusterlabs.org</a><br>
</blockquote></div><br></div>