Closed nrwahl2 closed 2 years ago
One remaining gray area:
* Should lvmlockd/clvmd improperly running (or improperly not running) be an OCF_ERR_GENERIC or OCF_ERR_ARGS? The fact that it's a state issue rather than a config issue suggests OCF_ERR_GENERIC. The fact that it won't be fixed without user intervention suggests OCF_ERR_ARGS.
I would say _GENERIC. _ARGS would make sense if it can only happen due to incorrect configuration of the resource or lvm.conf. Also _ARGS would make it not try to restart, so _GENERIC let's it recover if it's just a user error or it died.
Also _ARGS would make it not try to restart, so _GENERIC let's it recover if it's just a user error or it died.
The clvmd_check
and lvmlockd_check
functions are invoked only during a start operation (through validate-all
). So as long as start-failure-is-fatal=true
, the behavior would be identical for _ARGS
and _GENERIC
.
In the case that start-failure-is-fatal=false
_GENERIC
for "improperly not running._ARGS
here.I'm on the fence about the "improperly running" case. But there is not much practical significance. I'm pushing an update that uses _GENERIC
for both. Happy to go either direction.
Thanks.
Splitting this commit out from #1600.
OCF_ERR_ARGS should be used when the configuration isn't valid for the local node, and so the resource should not attempt to start again locally until the issue is corrected.
OCF_ERR_CONFIGURED should be used when the configuration isn't valid on any node, and so the resource should not attempt to start again anywhere until the issue is corrected.
One remaining gray area:
More info about return code meanings:
Resolves: RHBZ#1905820
Signed-off-by: Reid Wahl nrwahl@protonmail.com