HomeClusterLabs Projects

LVM-activate: Fix return codes

Description

LVM-activate: Fix return codes

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: Should lvmlockd/lvmetad/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. The approach here is to use
GENERIC for all of these. One can make the case that "improperly
running" should use ARGS, since a process must be manually stopped to
fix the issue, and that "improperly not running" should use GENERIC,
since there's a small chance the process died and will be recovered in
some way.

More info about return code meanings:

Resolves: RHBZ#1905820

Signed-off-by: Reid Wahl <nrwahl@protonmail.com>

Details

Provenance
nrwahl2Authored on Dec 13 2020, 5:58 PM
Parents
rR8286811b438e: Merge pull request #1779 from oalbrigt/promotable
Branches
Unknown
Tags
Unknown