Discussion:
[Linux-ha-dev] Patch for named
Serge Dubrouski
2012-09-22 15:11:53 UTC
Permalink
Hello -

Attached a short patch for named RA to fix improve getpid function.
--
Serge Dubrouski.
Dejan Muhamedagic
2012-09-28 08:53:54 UTC
Permalink
Hi Serge,
Post by Serge Dubrouski
Hello -
Attached a short patch for named RA to fix improve getpid function.
Sorry for the delay. Is this the same as
https://github.com/ClusterLabs/resource-agents/issues/134
and
https://github.com/ClusterLabs/resource-agents/pull/140

Cheers,

Dejan
Post by Serge Dubrouski
--
Serge Dubrouski.
_______________________________________________________
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/
Serge Dubrouski
2012-09-28 11:09:55 UTC
Permalink
Yes it is. It also includes a fix for a small bug. So 2 lines changed.
Post by Dejan Muhamedagic
Hi Serge,
Post by Serge Dubrouski
Hello -
Attached a short patch for named RA to fix improve getpid function.
Sorry for the delay. Is this the same as
https://github.com/ClusterLabs/resource-agents/issues/134
and
https://github.com/ClusterLabs/resource-agents/pull/140
Cheers,
Dejan
Post by Serge Dubrouski
--
Serge Dubrouski.
_______________________________________________________
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/
_______________________________________________________
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/
Serge Dubrouski
2012-10-02 02:29:50 UTC
Permalink
Hi, Dejan -

Will you apply it?
Post by Serge Dubrouski
Yes it is. It also includes a fix for a small bug. So 2 lines changed.
Post by Dejan Muhamedagic
Hi Serge,
Post by Serge Dubrouski
Hello -
Attached a short patch for named RA to fix improve getpid function.
Sorry for the delay. Is this the same as
https://github.com/ClusterLabs/resource-agents/issues/134
and
https://github.com/ClusterLabs/resource-agents/pull/140
Cheers,
Dejan
Post by Serge Dubrouski
--
Serge Dubrouski.
_______________________________________________________
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/
_______________________________________________________
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/
--
Serge Dubrouski.
Dejan Muhamedagic
2012-10-03 13:44:40 UTC
Permalink
Hi Serge,
Post by Serge Dubrouski
Hi, Dejan -
Will you apply it?
The grep ps part I'll apply. I was just curious why the previous
version didn't work, but I guess it's not worth the time to
investigate.

And I'm trying to understand this part:

named_getpid () {
local pattern="$OCF_RESKEY_named"

- if [ -n "$OCF_RESKEY_named_rootdir" ]; then
+ if [ -n "$OCF_RESKEY_named_rootdir" -a "x${OCF_RESKEY_named_rootdir}" != "x/" ]; then
pattern="$pattern.*-t $OCF_RESKEY_named_rootdir"
fi

How would named_rootdir be set to "/" unless the user sets it as
a parameter? Why would "/" then be treated differently?

Cheers,

Dejan
Post by Serge Dubrouski
Post by Serge Dubrouski
Yes it is. It also includes a fix for a small bug. So 2 lines changed.
Post by Dejan Muhamedagic
Hi Serge,
Post by Serge Dubrouski
Hello -
Attached a short patch for named RA to fix improve getpid function.
Sorry for the delay. Is this the same as
https://github.com/ClusterLabs/resource-agents/issues/134
and
https://github.com/ClusterLabs/resource-agents/pull/140
Cheers,
Dejan
Post by Serge Dubrouski
--
Serge Dubrouski.
_______________________________________________________
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/
_______________________________________________________
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/
--
Serge Dubrouski.
_______________________________________________________
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/
Serge Dubrouski
2012-10-03 13:59:55 UTC
Permalink
Look at start function. If one sets rootdir parameter to / , then start
function strips it and monitor fails. So the patch fixes it.
Post by Dejan Muhamedagic
Hi Serge,
Post by Serge Dubrouski
Hi, Dejan -
Will you apply it?
The grep ps part I'll apply. I was just curious why the previous
version didn't work, but I guess it's not worth the time to
investigate.
named_getpid () {
local pattern="$OCF_RESKEY_named"
- if [ -n "$OCF_RESKEY_named_rootdir" ]; then
+ if [ -n "$OCF_RESKEY_named_rootdir" -a "x${OCF_RESKEY_named_rootdir}" != "x/" ]; then
pattern="$pattern.*-t $OCF_RESKEY_named_rootdir"
fi
How would named_rootdir be set to "/" unless the user sets it as
a parameter? Why would "/" then be treated differently?
Cheers,
Dejan
Post by Serge Dubrouski
Post by Serge Dubrouski
Yes it is. It also includes a fix for a small bug. So 2 lines changed.
Post by Dejan Muhamedagic
Hi Serge,
Post by Serge Dubrouski
Hello -
Attached a short patch for named RA to fix improve getpid function.
Sorry for the delay. Is this the same as
https://github.com/ClusterLabs/resource-agents/issues/134
and
https://github.com/ClusterLabs/resource-agents/pull/140
Cheers,
Dejan
Post by Serge Dubrouski
--
Serge Dubrouski.
_______________________________________________________
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/
_______________________________________________________
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/
--
Serge Dubrouski.
_______________________________________________________
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/
_______________________________________________________
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/
Dejan Muhamedagic
2012-10-03 14:35:10 UTC
Permalink
Post by Serge Dubrouski
Look at start function. If one sets rootdir parameter to / , then start
function strips it and monitor fails. So the patch fixes it.
Ah, OK. Missed that. Applied now. Many thanks for the patches!

Cheers,

Dejan
Post by Serge Dubrouski
Post by Dejan Muhamedagic
Hi Serge,
Post by Serge Dubrouski
Hi, Dejan -
Will you apply it?
The grep ps part I'll apply. I was just curious why the previous
version didn't work, but I guess it's not worth the time to
investigate.
named_getpid () {
local pattern="$OCF_RESKEY_named"
- if [ -n "$OCF_RESKEY_named_rootdir" ]; then
+ if [ -n "$OCF_RESKEY_named_rootdir" -a "x${OCF_RESKEY_named_rootdir}"
!= "x/" ]; then
pattern="$pattern.*-t $OCF_RESKEY_named_rootdir"
fi
How would named_rootdir be set to "/" unless the user sets it as
a parameter? Why would "/" then be treated differently?
Cheers,
Dejan
Post by Serge Dubrouski
Post by Serge Dubrouski
Yes it is. It also includes a fix for a small bug. So 2 lines changed.
Post by Dejan Muhamedagic
Hi Serge,
Post by Serge Dubrouski
Hello -
Attached a short patch for named RA to fix improve getpid function.
Sorry for the delay. Is this the same as
https://github.com/ClusterLabs/resource-agents/issues/134
and
https://github.com/ClusterLabs/resource-agents/pull/140
Cheers,
Dejan
Post by Serge Dubrouski
--
Serge Dubrouski.
_______________________________________________________
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/
_______________________________________________________
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/
--
Serge Dubrouski.
_______________________________________________________
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/
_______________________________________________________
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/
_______________________________________________________
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/
Loading...