[ClusterLabs] Antw: Re: Q: The effect of using "default" attribute in RA metadata
kgaillot at redhat.com
Thu Sep 5 10:23:31 EDT 2019
On Thu, 2019-09-05 at 09:31 +0200, Ulrich Windl wrote:
> > > > Tomas Jelinek <tojeline at redhat.com> schrieb am 05.09.2019 um
> > > > 09:22 in
> <651630f8-b871-e4c1-68d8-e6a42dd292aa at redhat.com>:
> > Dne 03. 09. 19 v 11:27 Ulrich Windl napsal(a):
> > > Hi!
> > >
> > > Reading the RA API metadata specification, there is a "default"
> > > attribute
> > for "parameter".
> > > I wonder what the effect of specifying a default is: Is it
> > > purely
> > documentation (and the RA has to take care it uses the same default
> > value as
> > in the metadata), or will the configuration tools actually use that
> > value if
> > the user did not specify a parameter value?
> > Pcs doesn't use the default values. If you don't specify a value
> > for an
> > option, pcs simply doesn't put that option into the CIB leaving it
> > to
> > the RA to figure out a default value. This has a benefit of always
> > following the default even if it changes. There is no plan to
> > change the
> > behavior.
> I see. However changing a default value (that way) can cause
> surprises at the user's end.
> When copying the default to the actual resource configuration at the
> time when
> it was configured could prevent unexpected surprises (and the values
> being used
> are somewhat "documented") in the configuration.
> I agree that it's no longer obvious then whether those default values
> were set
> explicitly or implicitly,
> > Copying default values to the CIB has at least two disadvantages:
> > 1) If the default in a RA ever changes, the change would have no
> > effect
> > ‑ a value in the CIB would still be set to the previous default.
> > To
> > configure it to follow the defaults, one would have to remove the
> > option
> > value afterwards or a new option to pcs commands to control the
> > behavior
> > would have to be added.
> > 2) When a value is the same as its default it would be unclear if
> > the
> > intention is to follow the default or the user set a value which is
> > the
> > same as the default by coincidence.
> Are there any plans to decorate the DTD or RNG with comments some
> day? I think
> that would be the perfect place to describe the meanings.
The standard has its own repo:
The ra/next directory is where we're putting proposed changes (ra-
api.rng is the RNG). Once accepted for the upcoming 1.1 standard, the
changes are copied to the ra/1.1 directory, and at some point, 1.1 will
be officially adopted as the current standard.
So, pull requests are welcome :)
I have an outstanding PR that unfortunately I had to put on the back
burner but should be the last big set of changes for 1.1:
Ken Gaillot <kgaillot at redhat.com>
More information about the Users