HomeClusterLabs Projects

Low: fencer: Don't remove device if child is deleted

Description

Low: fencer: Don't remove device if child is deleted

If the child of a primitive element representing a fencing device was
deleted, and we didn't catch it earlier as instance_attributes or
meta_attributes, then previously we would remove the fencing device. We
should remove the device only if the primitive itself was deleted.

By inspection, it looks like this would unregister a fencing device if
one of its operations (op elements) were deleted.

If we find that only a child of the primitive was deleted, fall through
to the next if block -- that is, "continue" only if the primitive itself
was deleted and we call stonith_device_remove().

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

Details

Provenance
nrwahl2Authored on Sun, Mar 30, 5:31 AM
Parents
rP8a12fef10d50: Refactor: fencer: Some best practices in stonith_device_register()
Branches
Unknown
Tags
Unknown