[ClusterLabs] Antw: [EXT] [Problem] crm_attirbute fails to expand run options.
Ken Gaillot
kgaillot at redhat.com
Wed Mar 8 09:55:00 EST 2023
On Wed, 2023-03-08 at 08:38 +0100, Ulrich Windl wrote:
> > > > <renayama19661014 at ybb.ne.jp> schrieb am 07.03.2023 um 08:41 in
> > > > Nachricht
> <215883790.380746.1678174910897.JavaMail.yahoo at mail.yahoo.co.jp>:
> > Hi All,
> >
> > The crm_attribute command expands the contents of options from the
> > OCF_RESOURCE_INSTANCE environment variable if the p option is not
> > specified.
> >
> > However, if -INFINITY is specified as the value of the v option at
> > this
> > time, crm_attributes will incorrectly expand -INFINITY as an option
> > and
> > processing will fail.
> >
> > ----
> > [root at rh91-01dev tools]# crm_attribute -p pgsql -v 100
> > [root at rh91-01dev tools]# crm_attribute -p pgsql -v -INFINITY
>
> Would "crm_attribute -p pgsql -v -- -INFINITY" work?
The fix is already in the main branch, but in my testing, a workaround
for older versions is to simply put the -v before the -p, like
crm_attribute -v -INFINITY -p
The trigger is that -p takes an optional argument, so with -p -v the
parser's not entirely sure whether -v is a new argument or an argument
to -p. But again, it's fixed in main branch.
>
> > [root at rh91-01dev tools]# OCF_RESOURCE_INSTANCE=pgsql crm_attribute
> > -p -v
> > 100
> > [root at rh91-01dev tools]# OCF_RESOURCE_INSTANCE=pgsql crm_attribute
> > -p -v
> > -INFINITY
> > crm_attribute: Could not map name=FINITY to a UUID
> >
> > ----
> >
> > This problem occurs with the latest resource agent running on
> > RHEL9.1, but
> > also with the development version of pacemaker.
> >
> >
> > Due to this issue, some resource agents such as pgsql will fail to
> > configure
> > a cluster after version 4.12.
> >
> > It's a very serious problem.
> >
> > RAs such as pgsql should be run with the p
> > option(OCF_RESOURCE_INSTANCE)
> > provisionally when paired with a pacemaker version that does not
> > resolve this
> > issue.
> > ----
> > (snip)
> > ocf_promotion_score() {
> > ocf_version_cmp "$OCF_RESKEY_crm_feature_set" "3.10.0"
> > res=$?
> > if [ $res -eq 2 ] || [ $res -eq 1 ] || ! have_binary
> > "crm_master";
> > then
> > ${HA_SBIN_DIR}/crm_attribute -p
> > $OCF_RESOURCE_INSTANCE $@
> > else
> > ${HA_SBIN_DIR}/crm_master -l reboot $@
> > fi
> > (snip)
> > ----
> >
> > This content has also been registered in the following Bugzilla:
> > https://bugs.clusterlabs.org/show_bug.cgi?id=5509
> >
> > Best Regards,
> > Hideo Yamauchi.
> >
--
Ken Gaillot <kgaillot at redhat.com>
More information about the Users
mailing list