* [Drbd-dev] [PATCH] scripts: Updated rhcs_fence script
@ 2013-03-13 14:02 Vlastimil Holer
2013-03-13 19:54 ` Lars Ellenberg
0 siblings, 1 reply; 4+ messages in thread
From: Vlastimil Holer @ 2013-03-13 14:02 UTC (permalink / raw)
To: drbd-dev; +Cc: Vlastimil Holer
cman_tool option -f is obsolete in current RHEL 6.x.
Syntax for kill action allows only:
-n <nodename> The name of the node to kill (can specify multiple times)
Although node is successfully fenced, rhcs_fence ends with failure
due to wrong $exit condition handling. Part of debug log:
rhcs_fence: 253; DEBUG: fence node2.localdomain dev 0.0 agent fence_ipmilan result: success
fence_node[28511]: fence node2.localdomain success
rhcs_fence: 253; DEBUG: fence node2.localdomain success
rhcs_fence: 267; DEBUG: Attempt to fence node: [node2.localdomain] exited with: [0]
rhcs_fence: 272; Attempt to fence: [node2.localdomain] failed!
kernel: d-con drbd0: helper command: /sbin/drbdadm fence-peer drbd0 exit code 1 (0x100)
kernel: d-con drbd0: fence-peer helper broken, returned 1
---
scripts/rhcs_fence | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/scripts/rhcs_fence b/scripts/rhcs_fence
index ca53678..1294660 100644
--- a/scripts/rhcs_fence
+++ b/scripts/rhcs_fence
@@ -1,8 +1,8 @@
#!/usr/bin/perl
#
# Author: Digimer (digimer@alteeve.com)
-# Version: 0.2.4
-# Released: 2012-01-20
+# Version: 0.2.5
+# Released: 2013-03-13
# License: GPL v2+
#
# This program ties Linbit's DRBD into Red Hat's RHCS's fence daemon via the
@@ -266,7 +266,7 @@ sub kill_target
if ($conf->{sys}{debug}) { to_log($conf, 0, __LINE__, "DEBUG: Attempt to fence node: [$remote_node] exited with: [$sc_exit]"); }
# Exit.
- if (not $exit)
+ if ($exit)
{
if ($conf->{sys}{debug}) { to_log($conf, 1, __LINE__, "Attempt to fence: [$remote_node] failed!"); }
}
@@ -300,7 +300,7 @@ sub eject_target
# next.
if ($conf->{sys}{debug}) { to_log($conf, 0, __LINE__, "Target node: [$remote_node] is a cluster member, attempting to eject."); }
$sc=IO::Handle->new();
- $shell_call="$conf->{path}{cman_tool} kill -f $remote_node";
+ $shell_call="$conf->{path}{cman_tool} kill -n $remote_node";
if ($conf->{sys}{debug}) { to_log($conf, 0, __LINE__, "DEBUG: shell call: [$shell_call]"); }
open ($sc, "$shell_call 2>&1 |") or to_log($conf, 1, __LINE__, "Failed to call: [$sc], error was: $!");
while(<$sc>)
--
1.8.1.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Drbd-dev] [PATCH] scripts: Updated rhcs_fence script
2013-03-13 14:02 [Drbd-dev] [PATCH] scripts: Updated rhcs_fence script Vlastimil Holer
@ 2013-03-13 19:54 ` Lars Ellenberg
2013-03-13 23:05 ` Madison Kelly
0 siblings, 1 reply; 4+ messages in thread
From: Lars Ellenberg @ 2013-03-13 19:54 UTC (permalink / raw)
To: drbd-dev; +Cc: digimer
On Wed, Mar 13, 2013 at 03:02:05PM +0100, Vlastimil Holer wrote:
> cman_tool option -f is obsolete in current RHEL 6.x.
> Syntax for kill action allows only:
> -n <nodename> The name of the node to kill (can specify multiple times)
>
> Although node is successfully fenced, rhcs_fence ends with failure
> due to wrong $exit condition handling. Part of debug log:
> rhcs_fence: 253; DEBUG: fence node2.localdomain dev 0.0 agent fence_ipmilan result: success
> fence_node[28511]: fence node2.localdomain success
> rhcs_fence: 253; DEBUG: fence node2.localdomain success
> rhcs_fence: 267; DEBUG: Attempt to fence node: [node2.localdomain] exited with: [0]
> rhcs_fence: 272; Attempt to fence: [node2.localdomain] failed!
> kernel: d-con drbd0: helper command: /sbin/drbdadm fence-peer drbd0 exit code 1 (0x100)
> kernel: d-con drbd0: fence-peer helper broken, returned 1
> ---
> scripts/rhcs_fence | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/scripts/rhcs_fence b/scripts/rhcs_fence
> index ca53678..1294660 100644
> --- a/scripts/rhcs_fence
> +++ b/scripts/rhcs_fence
> @@ -1,8 +1,8 @@
> #!/usr/bin/perl
> #
> # Author: Digimer (digimer@alteeve.com)
> -# Version: 0.2.4
> -# Released: 2012-01-20
> +# Version: 0.2.5
> +# Released: 2013-03-13
Nope, see upstream of that script:
https://github.com/digimer/rhcs_fence/commits/master
> # License: GPL v2+
> #
> # This program ties Linbit's DRBD into Red Hat's RHCS's fence daemon via the
> @@ -266,7 +266,7 @@ sub kill_target
> if ($conf->{sys}{debug}) { to_log($conf, 0, __LINE__, "DEBUG: Attempt to fence node: [$remote_node] exited with: [$sc_exit]"); }
>
> # Exit.
> - if (not $exit)
> + if ($exit)
> {
> if ($conf->{sys}{debug}) { to_log($conf, 1, __LINE__, "Attempt to fence: [$remote_node] failed!"); }
> }
That part has been fixed by the original Author already,
in a better way. We just did not notice, and did not update the
rhcs_fence as shipped with the DRBD source and package.
But that one:
> @@ -300,7 +300,7 @@ sub eject_target
> # next.
> if ($conf->{sys}{debug}) { to_log($conf, 0, __LINE__, "Target node: [$remote_node] is a cluster member, attempting to eject."); }
> $sc=IO::Handle->new();
> - $shell_call="$conf->{path}{cman_tool} kill -f $remote_node";
> + $shell_call="$conf->{path}{cman_tool} kill -n $remote_node";
digimer, what do you say?
> if ($conf->{sys}{debug}) { to_log($conf, 0, __LINE__, "DEBUG: shell call: [$shell_call]"); }
> open ($sc, "$shell_call 2>&1 |") or to_log($conf, 1, __LINE__, "Failed to call: [$sc], error was: $!");
> while(<$sc>)
> --
> 1.8.1.4
Thanks,
Lars
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Drbd-dev] [PATCH] scripts: Updated rhcs_fence script
2013-03-13 19:54 ` Lars Ellenberg
@ 2013-03-13 23:05 ` Madison Kelly
2013-03-15 9:26 ` Lars Ellenberg
0 siblings, 1 reply; 4+ messages in thread
From: Madison Kelly @ 2013-03-13 23:05 UTC (permalink / raw)
To: drbd-dev
On 03/13/2013 03:54 PM, Lars Ellenberg wrote:
> On Wed, Mar 13, 2013 at 03:02:05PM +0100, Vlastimil Holer wrote:
>> cman_tool option -f is obsolete in current RHEL 6.x.
>> Syntax for kill action allows only:
>> -n <nodename> The name of the node to kill (can specify multiple times)
>>
>> Although node is successfully fenced, rhcs_fence ends with failure
>> due to wrong $exit condition handling. Part of debug log:
>> rhcs_fence: 253; DEBUG: fence node2.localdomain dev 0.0 agent fence_ipmilan result: success
>> fence_node[28511]: fence node2.localdomain success
>> rhcs_fence: 253; DEBUG: fence node2.localdomain success
>> rhcs_fence: 267; DEBUG: Attempt to fence node: [node2.localdomain] exited with: [0]
>> rhcs_fence: 272; Attempt to fence: [node2.localdomain] failed!
>> kernel: d-con drbd0: helper command: /sbin/drbdadm fence-peer drbd0 exit code 1 (0x100)
>> kernel: d-con drbd0: fence-peer helper broken, returned 1
>> ---
>> scripts/rhcs_fence | 8 ++++----
>> 1 file changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/scripts/rhcs_fence b/scripts/rhcs_fence
>> index ca53678..1294660 100644
>> --- a/scripts/rhcs_fence
>> +++ b/scripts/rhcs_fence
>> @@ -1,8 +1,8 @@
>> #!/usr/bin/perl
>> #
>> # Author: Digimer (digimer@alteeve.com)
>> -# Version: 0.2.4
>> -# Released: 2012-01-20
>> +# Version: 0.2.5
>> +# Released: 2013-03-13
>
> Nope, see upstream of that script:
> https://github.com/digimer/rhcs_fence/commits/master
>
>
>> # License: GPL v2+
>> #
>> # This program ties Linbit's DRBD into Red Hat's RHCS's fence daemon via the
>> @@ -266,7 +266,7 @@ sub kill_target
>> if ($conf->{sys}{debug}) { to_log($conf, 0, __LINE__, "DEBUG: Attempt to fence node: [$remote_node] exited with: [$sc_exit]"); }
>>
>> # Exit.
>> - if (not $exit)
>> + if ($exit)
>> {
>> if ($conf->{sys}{debug}) { to_log($conf, 1, __LINE__, "Attempt to fence: [$remote_node] failed!"); }
>> }
>
> That part has been fixed by the original Author already,
> in a better way. We just did not notice, and did not update the
> rhcs_fence as shipped with the DRBD source and package.
>
> But that one:
>
>> @@ -300,7 +300,7 @@ sub eject_target
>> # next.
>> if ($conf->{sys}{debug}) { to_log($conf, 0, __LINE__, "Target node: [$remote_node] is a cluster member, attempting to eject."); }
>> $sc=IO::Handle->new();
>> - $shell_call="$conf->{path}{cman_tool} kill -f $remote_node";
>> + $shell_call="$conf->{path}{cman_tool} kill -n $remote_node";
>
> digimer, what do you say?
>
>
>> if ($conf->{sys}{debug}) { to_log($conf, 0, __LINE__, "DEBUG: shell call: [$shell_call]"); }
>> open ($sc, "$shell_call 2>&1 |") or to_log($conf, 1, __LINE__, "Failed to call: [$sc], error was: $!");
>> while(<$sc>)
>> --
>> 1.8.1.4
>
>
> Thanks,
>
> Lars
>
Strike the delay, I've made the changes and pushed to github
(https://github.com/digimer/rhcs_fence).
--
Alteeve's Niche!
Madison Kelly - 647-501-5200
https://alteeve.ca/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Drbd-dev] [PATCH] scripts: Updated rhcs_fence script
2013-03-13 23:05 ` Madison Kelly
@ 2013-03-15 9:26 ` Lars Ellenberg
0 siblings, 0 replies; 4+ messages in thread
From: Lars Ellenberg @ 2013-03-15 9:26 UTC (permalink / raw)
To: drbd-dev
On Wed, Mar 13, 2013 at 07:05:56PM -0400, Madison Kelly wrote:
> On 03/13/2013 03:54 PM, Lars Ellenberg wrote:
> >On Wed, Mar 13, 2013 at 03:02:05PM +0100, Vlastimil Holer wrote:
> >>cman_tool option -f is obsolete in current RHEL 6.x.
> >>Syntax for kill action allows only:
> >> -n <nodename> The name of the node to kill (can specify multiple times)
...
> Strike the delay, I've made the changes and pushed to github
> (https://github.com/digimer/rhcs_fence).
Thanks, will show up in the drbd repo shortly.
Lars
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-03-15 9:26 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-13 14:02 [Drbd-dev] [PATCH] scripts: Updated rhcs_fence script Vlastimil Holer
2013-03-13 19:54 ` Lars Ellenberg
2013-03-13 23:05 ` Madison Kelly
2013-03-15 9:26 ` Lars Ellenberg
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.