Discussion:
[Linux-ha-dev] [Pacemaker] A couple of SendArp resource changes
Dejan Muhamedagic
2013-03-13 18:01:33 UTC
Permalink
Hi,
Hi,
I've been using the ocf:heartbeat:SendArp script and notice a couple of
issues - some problems with starting and monitoring the service, and
also a file descriptor leak in the binary (which would cause it to
terminate).
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=701913
Cannot just replace the whole RA. Sorry. If you could split the
patch we can consider them on a one-by-one basis. Otherwise, I
found some patch in my local queue, which never got pushed for
some reason. Don't know if that would help (attached).
and
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=701914
Can you try the attached send_arp.libnet.c patch. It does first
packet build then reuses them.

Cheers,

Dejan
... they're not perfect, but an improvement I think.
HTH,
Tim.
--
South East Open Source Solutions Limited
Registered in England and Wales with company number 06134732.
Registered Office: 2 Powell Gardens, Redhill, Surrey, RH1 1TQ
VAT number: 900 6633 53 http://seoss.co.uk/ +44-(0)1273-808309
_______________________________________________
http://oss.clusterlabs.org/mailman/listinfo/pacemaker
Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org
Dejan Muhamedagic
2013-04-03 16:27:31 UTC
Permalink
Hello,

Anybody have objections to the patches posted here? If not, I'll
push them upstream.

Cheers,

Dejan
Post by Dejan Muhamedagic
Hi,
Hi,
I've been using the ocf:heartbeat:SendArp script and notice a couple of
issues - some problems with starting and monitoring the service, and
also a file descriptor leak in the binary (which would cause it to
terminate).
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=701913
Cannot just replace the whole RA. Sorry. If you could split the
patch we can consider them on a one-by-one basis. Otherwise, I
found some patch in my local queue, which never got pushed for
some reason. Don't know if that would help (attached).
and
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=701914
Can you try the attached send_arp.libnet.c patch. It does first
packet build then reuses them.
Cheers,
Dejan
... they're not perfect, but an improvement I think.
HTH,
Tim.
--
South East Open Source Solutions Limited
Registered in England and Wales with company number 06134732.
Registered Office: 2 Powell Gardens, Redhill, Surrey, RH1 1TQ
VAT number: 900 6633 53 http://seoss.co.uk/ +44-(0)1273-808309
_______________________________________________
http://oss.clusterlabs.org/mailman/listinfo/pacemaker
Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org
Tim Small
2013-04-08 13:33:27 UTC
Permalink
Post by Dejan Muhamedagic
If you could split the
patch we can consider them on a one-by-one basis.
I used Debian's "start-stop-daemon" utility in my modified script, and
it looks like Redhat etc. doesn't package it (yet):
http://fedoraproject.org/wiki/Features/start-stop-daemon

... the comments in that page express why I chose to use
start-stop-daemon - reworking the script to have the same level of
functionality as the start-stop-daemon version (but just using lsb
stuff) would be a bit awkward + time-consuming.

How about I use start-stop-daemon where available, and the LSB functions
when not? This would still represent an improvement on the current
behaviour of the script - which is pretty broken - e.g. stopping an
already-stopped resource fails, and stuff like this:


#
# This is always active, because it doesn't do much
#
sendarp_monitor() {
return $OCF_SUCCESS
}



and this:



sendarp_status() {
if
[ -f "$SENDARPPIDFILE" ]
then
return $OCF_SUCCESS
else
return $OCF_NOT_RUNNING
fi
}


"A pid file is there, so it must be running!"
Post by Dejan Muhamedagic
Otherwise, I found some patch in my local queue, which never got pushed for some reason. Don't know if that would help (attached).
I'll have a go with them, and check to see if they fix the bug which I
was seeing.

Tim.
--
South East Open Source Solutions Limited
Registered in England and Wales with company number 06134732.
Registered Office: 2 Powell Gardens, Redhill, Surrey, RH1 1TQ
VAT number: 900 6633 53 http://seoss.co.uk/ +44-(0)1273-808309
Dejan Muhamedagic
2013-05-29 14:52:46 UTC
Permalink
Post by Tim Small
Post by Dejan Muhamedagic
If you could split the
patch we can consider them on a one-by-one basis.
I used Debian's "start-stop-daemon" utility in my modified script, and
http://fedoraproject.org/wiki/Features/start-stop-daemon
... the comments in that page express why I chose to use
start-stop-daemon - reworking the script to have the same level of
functionality as the start-stop-daemon version (but just using lsb
stuff) would be a bit awkward + time-consuming.
How about I use start-stop-daemon where available, and the LSB functions
when not? This would still represent an improvement on the current
behaviour of the script - which is pretty broken - e.g. stopping an
#
# This is always active, because it doesn't do much
#
sendarp_monitor() {
return $OCF_SUCCESS
}
sendarp_status() {
if
[ -f "$SENDARPPIDFILE" ]
then
return $OCF_SUCCESS
else
return $OCF_NOT_RUNNING
fi
}
"A pid file is there, so it must be running!"
The fix for the resource agent itself is already in the
repository. It is based on the standard ha_pseudo_* functions
like in any other pseudo agents (i.e. those that don't have long
running processes).
Post by Tim Small
Post by Dejan Muhamedagic
Otherwise, I found some patch in my local queue, which never got pushed for some reason. Don't know if that would help (attached).
I'll have a go with them, and check to see if they fix the bug which I
was seeing.
Did you get a chance to verify the two patches attached? There's
now also a pull request for the socket leaks issue at github.com:

https://github.com/ClusterLabs/resource-agents/pull/247

Cheers,

Dejan
Post by Tim Small
Tim.
--
South East Open Source Solutions Limited
Registered in England and Wales with company number 06134732.
Registered Office: 2 Powell Gardens, Redhill, Surrey, RH1 1TQ
VAT number: 900 6633 53 http://seoss.co.uk/ +44-(0)1273-808309
_______________________________________________________
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/
Loading...