crmsh icon indicating copy to clipboard operation
crmsh copied to clipboard

UX: should not add any invalid cluster property into CIB

Open zzhou1 opened this issue 3 years ago • 7 comments

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

zzhou1 avatar Aug 20 '21 06:08 zzhou1

Be aware some users might have their customized cluster properties for their own use cases. Right, @fmherschel?

gao-yan avatar Sep 06 '21 10:09 gao-yan

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

fmherschel avatar Sep 27 '21 12:09 fmherschel

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 avatar Jan 27 '22 02:01 liangxin1300

@liangxin1300 Do you mean RA as resource agent?? Or do you mean, if any resource exists the behavior is different?

fmherschel avatar Feb 02 '22 08:02 fmherschel

@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'

liangxin1300 avatar Feb 02 '22 14:02 liangxin1300

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.

gao-yan avatar Feb 02 '22 15:02 gao-yan

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

fmherschel avatar Feb 02 '22 15:02 fmherschel