crmsh
crmsh copied to clipboard
UX: should not add any invalid cluster property into CIB
tw:~ # crm configure property maintenance=true WARNING: cib-bootstrap-options: unknown attribute 'maintenance' tw:~ # crm configure show | grep maintenance maintenance=true
Instead of a WARNING, it's an ERROR. And, crmsh should not add any invalid cluster property into CIB. ERROR: cib-bootstrap-options: unknown attribute 'maintenance'
Or, ideally, better to be, tw:~ # crm configure property maintenance=true WARNING: cib-bootstrap-options: the best match of unknown attribute 'maintenance' is 'maintenance-mode' tw:~ # crm configure show | grep maintenance maintenance-mode=true
Be aware some users might have their customized cluster properties for their own use cases. Right, @fmherschel?
@gao-yan that's true! For SAPHanaSR* resource agents we meed to add special properties not already known by the cluster. The RA does the writes and the reads so the cluster core is here only a vehicle.
BTW, I found this "WARNING" only raised when there is RA added in cluster When there is no RA added, there is no "WARNING" when you adding any unknown properties Should this behavior be changed? @zzhou1 @gao-yan
@liangxin1300 Do you mean RA as resource agent?? Or do you mean, if any resource exists the behavior is different?
@liangxin1300 Do you mean RA as resource agent?? Or do you mean, if any resource exists the behavior is different?
Yes I mean this behavior:
# newly setup cluster without any resource agent configured
crm(live/15sp3-1)configure# property name_test=xin # add unknown property
crm(live/15sp3-1)configure# commit # don't complain here
crm(live/15sp3-1)configure# primitive d Dummy # add resource agent
crm(live/15sp3-1)configure# commit
crm(live/15sp3-1)configure# property age=19 # add unknown property
crm(live/15sp3-1)configure# commit # do complain here
WARNING: cib-bootstrap-options: unknown attribute 'name_test'
WARNING: cib-bootstrap-options: unknown attribute 'age'
I don't know why it has to behave differently with/without resources :-)
But AFAICS it alright as long as they are just warnings rather than errors, so that crm configure commit
should succeed.
@liangxin1300 My point was only about you do not add an resource agent but a resource. The resource agent is a part ot Software handling the resource as a plugin of the cluster. Adding a resource agent would be to add a script in e.g. /usr/lib/ocf/resource.d/heartbeat/MyNewDummy. And such things could also influence the warnings, if you then add a resource using the new RA (here MyNewDummy).