HomeClusterLabs Projects

Refactor: tools: Functionize danger checks in crm_shadow

Description

Refactor: tools: Functionize danger checks in crm_shadow

Create a function set_danger_error() to avoid repetition of the "To
prevent accidental destruction..." string.

Also previously, if we returned after finding the instance mismatch,
then we never warned of the inherent danger of the command (that is,
overwriting the active cluster or deleting the shadow file). It seems
more appropriate to warn of the inherent danger no matter what, and warn
of the mismatch if appropriate.

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

Details

Provenance
nrwahl2Authored on Feb 27 2023, 2:30 AM
Parents
rP9ef3dee00c4a: Refactor: tools: Skip mismatch check for crm_shadow --create-empty
Branches
Unknown
Tags
Unknown