[ClusterLabs] Antw: Re: Q: The effect of using "default" attribute in RA metadata

Ulrich Windl Ulrich.Windl at rz.uni-regensburg.de
Thu Sep 5 03:31:59 EDT 2019


>>> Tomas Jelinek <tojeline at redhat.com> schrieb am 05.09.2019 um 09:22 in
Nachricht
<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 unexpected
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.

Agreed.

> 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.

Agreed.

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.

Regards,
Ulrich



More information about the Users mailing list