HomeClusterLabs Projects

Feature: schemas: Disallow restart-type resource meta-attribute

Description

Feature: schemas: Disallow restart-type resource meta-attribute

It is undocumented, deprecated (with a warning), and somewhat replaced
with kind (see
https://www.mail-archive.com/linux-ha@lists.linux-ha.org/msg08220.html).

There is no one-to-one replacement: restart-type=ignore is the default
behavior, while restart-type=restart says to treat all optional ordering
constraints involving the resource as mandatory.

It's tempting to create a rule that says "if a resource has
restart-type=ignore, then add kind=Mandatory to all ordering constraints
that involve it." However, a resource may have restart-type configured
in multiple meta_attributes blocks, each governed by a rule. So in the
general case, it's impossible to determine in advance what the value of
restart-type will be for a given resource. Ordering constraints don't
support rules, so it's also impossible to make the kind attribute's
value dependent upon these rules.

We could do some form of "halfway" fix, in which we apply kind=Mandatory
only if the resource has restart-type=restart in a rule-less
meta_attributes block and there are no other meta_attributes blocks with
a higher score. However, that seems not worth the hassle for an
incomplete transformation.

Ref T280

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

Details

Provenance
nrwahl2Authored on Jul 16 2024, 6:18 AM
Parents
rPe3ce1eb8fdce: Test: cts-schemas: Add test for restart-type resource meta-attribute
Branches
Unknown
Tags
Unknown
Tasks
Restricted Maniphest Task