Mailing List Archive

In RHEL5 and RHEL6 about different HA_RSCTMP
Hi

A maintenance mode in the heartbeat-stack does not work by this
difference now in RHEL6.
The reason is because /var/run/heartbeat/rsctmp is deleted at the
time of initialization of Heartbeat.
Some RA makes a status file there.

The resource-agents.spec files are as follows.
------
151 %if 0%{?fedora} >= 11 || 0%{?centos_version} > 5 || 0%{?rhel} > 5
152 CFLAGS="$(echo '%{optflags}')"
153 %global conf_opt_rsctmpdir
"--with-rsctmpdir=%{_var}/run/heartbeat/rsctmp"
154 %global conf_opt_fatal "--enable-fatal-warnings=no"
155 %else
156 CFLAGS="${CFLAGS} ${RPM_OPT_FLAGS}"
157 %global conf_opt_fatal "--enable-fatal-warnings=yes"
158 %endif
------
Why is it that I use rsctmp in RHEL6?
Should I want to delete the 153 line if possible?
I contribute a patch if good.

Regards,
Tomo
_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/
Re: In RHEL5 and RHEL6 about different HA_RSCTMP [ In reply to ]
Hi

I requested pull.
https://github.com/ClusterLabs/resource-agents/pull/41

Regards,
Tomo

2011/12/6 nozawat <nozawat@gmail.com>:
> Hi
>
>  A maintenance mode in the heartbeat-stack does not work by this
> difference now in RHEL6.
>  The reason is because /var/run/heartbeat/rsctmp is deleted at the
> time of initialization of Heartbeat.
>  Some RA makes a status file there.
>
>  The resource-agents.spec files are as follows.
> ------
>    151 %if 0%{?fedora} >= 11 || 0%{?centos_version} > 5 || 0%{?rhel} > 5
>    152 CFLAGS="$(echo '%{optflags}')"
>    153 %global conf_opt_rsctmpdir
> "--with-rsctmpdir=%{_var}/run/heartbeat/rsctmp"
>    154 %global conf_opt_fatal "--enable-fatal-warnings=no"
>    155 %else
>    156 CFLAGS="${CFLAGS} ${RPM_OPT_FLAGS}"
>    157 %global conf_opt_fatal "--enable-fatal-warnings=yes"
>    158 %endif
> ------
>  Why is it that I use rsctmp in RHEL6?
>  Should I want to delete the 153 line if possible?
>  I contribute a patch if good.
>
> Regards,
> Tomo
_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/
Re: In RHEL5 and RHEL6 about different HA_RSCTMP [ In reply to ]
On Tue, Dec 6, 2011 at 8:00 PM, nozawat <nozawat@gmail.com> wrote:
> Hi
>
>  A maintenance mode in the heartbeat-stack does not work by this
> difference now in RHEL6.
>  The reason is because /var/run/heartbeat/rsctmp is deleted at the
> time of initialization of Heartbeat.

Right, but the location and its deletion date back over 8 years IIRC.

>  Some RA makes a status file there.

Which makes the resource seemed stopped?
At the point heartbeat starts all bets are off and the RA needs to be
able to correctly rediscover its own state.

>
>  The resource-agents.spec files are as follows.
> ------
>    151 %if 0%{?fedora} >= 11 || 0%{?centos_version} > 5 || 0%{?rhel} > 5
>    152 CFLAGS="$(echo '%{optflags}')"
>    153 %global conf_opt_rsctmpdir
> "--with-rsctmpdir=%{_var}/run/heartbeat/rsctmp"
>    154 %global conf_opt_fatal "--enable-fatal-warnings=no"
>    155 %else
>    156 CFLAGS="${CFLAGS} ${RPM_OPT_FLAGS}"
>    157 %global conf_opt_fatal "--enable-fatal-warnings=yes"
>    158 %endif
> ------
>  Why is it that I use rsctmp in RHEL6?
>  Should I want to delete the 153 line if possible?
>  I contribute a patch if good.
>
> Regards,
> Tomo
> _______________________________________________________
> Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
> http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
> Home Page: http://linux-ha.org/
_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/
Re: In RHEL5 and RHEL6 about different HA_RSCTMP [ In reply to ]
Hi Andrew

> Right, but the location and its deletion date back over 8 years IIRC.
I seem to delete it in the following.
->http://hg.linux-ha.org/heartbeat-STABLE_3_0/file/7e3a82377fa8/heartbeat/heartbeat.c
------
991 if (system("rm -fr " RSC_TMPDIR) != 0) {
992 cl_log(LOG_INFO, "Removing %s failed, recreating.", RSC_TMPDIR);
993 }
------

Regards,
Tomo

2011/12/8 Andrew Beekhof <andrew@beekhof.net>:
> On Tue, Dec 6, 2011 at 8:00 PM, nozawat <nozawat@gmail.com> wrote:
>> Hi
>>
>>  A maintenance mode in the heartbeat-stack does not work by this
>> difference now in RHEL6.
>>  The reason is because /var/run/heartbeat/rsctmp is deleted at the
>> time of initialization of Heartbeat.
>
> Right, but the location and its deletion date back over 8 years IIRC.
>
>>  Some RA makes a status file there.
>
> Which makes the resource seemed stopped?
> At the point heartbeat starts all bets are off and the RA needs to be
> able to correctly rediscover its own state.
>
>>
>>  The resource-agents.spec files are as follows.
>> ------
>>    151 %if 0%{?fedora} >= 11 || 0%{?centos_version} > 5 || 0%{?rhel} > 5
>>    152 CFLAGS="$(echo '%{optflags}')"
>>    153 %global conf_opt_rsctmpdir
>> "--with-rsctmpdir=%{_var}/run/heartbeat/rsctmp"
>>    154 %global conf_opt_fatal "--enable-fatal-warnings=no"
>>    155 %else
>>    156 CFLAGS="${CFLAGS} ${RPM_OPT_FLAGS}"
>>    157 %global conf_opt_fatal "--enable-fatal-warnings=yes"
>>    158 %endif
>> ------
>>  Why is it that I use rsctmp in RHEL6?
>>  Should I want to delete the 153 line if possible?
>>  I contribute a patch if good.
>>
>> Regards,
>> Tomo
>> _______________________________________________________
>> Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
>> http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
>> Home Page: http://linux-ha.org/
> _______________________________________________________
> Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
> http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
> Home Page: http://linux-ha.org/
_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/
Re: In RHEL5 and RHEL6 about different HA_RSCTMP [ In reply to ]
On 12/07/2011 09:14 PM, nozawat wrote:
> Hi Andrew
>
>> Right, but the location and its deletion date back over 8 years IIRC.
> I seem to delete it in the following.
> ->http://hg.linux-ha.org/heartbeat-STABLE_3_0/file/7e3a82377fa8/heartbeat/heartbeat.c
> ------
> 991 if (system("rm -fr " RSC_TMPDIR) != 0) {
> 992 cl_log(LOG_INFO, "Removing %s failed, recreating.", RSC_TMPDIR);
> 993 }
> ------
>
> Regards,
> Tomo

For what it's worth - this directory was added with the sole purpose of
being a place to put files that would automatically be deleted when
heartbeat started. It has been that way from the first day it was
created. Andrew has this right (it was probably actually even longer
than 8 years ago). I created it for pseudo-resources - things like
MailTo that need to track their state so they can follow normal resource
agent expectations. For that purpose, this behavior is right. You
certainly don't want a machine to reboot and think that these
pseudo-resources are still running.

If you don't like that behavior, then put your status files somewhere
else...


--
Alan Robertson<alanr@unix.sh> - @OSSAlanR

"Openness is the foundation and preservative of friendship... Let me claim from you at all times your undisguised opinions." - William Wilberforce
_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/
Re: In RHEL5 and RHEL6 about different HA_RSCTMP [ In reply to ]
Hi Alan

Thank you for your comments.

This was solved with the following patches.
<https://github.com/ClusterLabs/resource-agents/commit/e567a6d99ee71d40970d1dd00cb50dc4eeb6af29#resource-agents.spec.in>

Regards,
Tomo

2012$BG/(B1$B7n(B23$BF|(B14:30 Alan Robertson <alanr@unix.sh>:
> On 12/07/2011 09:14 PM, nozawat wrote:
>> Hi Andrew
>>
>>> Right, but the location and its deletion date back over 8 years IIRC.
>> I seem to delete it in the following.
>> ->http://hg.linux-ha.org/heartbeat-STABLE_3_0/file/7e3a82377fa8/heartbeat/heartbeat.c
>> ------
>> 991 if (system("rm -fr " RSC_TMPDIR) != 0) {
>> 992 cl_log(LOG_INFO, "Removing %s failed, recreating.", RSC_TMPDIR);
>> 993 }
>> ------
>>
>> Regards,
>> Tomo
>
> For what it's worth - this directory was added with the sole purpose of
> being a place to put files that would automatically be deleted when
> heartbeat started. It has been that way from the first day it was
> created. Andrew has this right (it was probably actually even longer
> than 8 years ago). I created it for pseudo-resources - things like
> MailTo that need to track their state so they can follow normal resource
> agent expectations. For that purpose, this behavior is right. You
> certainly don't want a machine to reboot and think that these
> pseudo-resources are still running.
>
> If you don't like that behavior, then put your status files somewhere
> else...
>
>
> --
> Alan Robertson<alanr@unix.sh> - @OSSAlanR
>
> "Openness is the foundation and preservative of friendship... Let me claim from you at all times your undisguised opinions." - William Wilberforce
> _______________________________________________________
> Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
> http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
> Home Page: http://linux-ha.org/
_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/