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

Tomas Jelinek tojeline at redhat.com
Thu Sep 5 03:22:35 EDT 2019


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.

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.


Regards,
Tomas

> 
> I would favor the second, of course ;-)
> 
> Regards,
> Ulrich
> 
> 
> 
> _______________________________________________
> Manage your subscription:
> https://lists.clusterlabs.org/mailman/listinfo/users
> 
> ClusterLabs home: https://www.clusterlabs.org/
> 


More information about the Users mailing list