Page MenuHomeClusterLabs Projects

Drop "default" as an allowed value for some meta-attributes
Open, NormalPublic

Assigned To
None
Authored By
nrwahl2
Jan 2 2024, 3:22 PM
Tags
  • Restricted Project
  • Restricted Project
  • Restricted Project
Referenced Files
None
Subscribers

Description

Currently, "default" is an allowed value for is-managed, resource-stickiness, migration-threshold, and target-role. At the time of writing, the first three are in pe__unpack_resource() and target-role is in get_target_role().

"default" was added as an allowed value by commit 5050638. It seems never to have been documented, so no one should be using it or even aware of it.

Out of a great abundance of caution, we can wait until 3.0.0 to drop it.

Ref: https://github.com/ClusterLabs/pacemaker/pull/3301/commits/3af014ef63e74091ccb3b361823a4b0cbd631972#r1439558366


Also drop special handling for "#default" as a meta-attribute value. The "#default" handling code was added by commit ea1359b. It seems that it was never documented except as an allowed value for the target-role meta-attribute. In that use case, it's now considered an invalid value.

The documentation for "target-role=#default" was only in the crm.dtd file (not in the doc books), which was removed in 2.0.0 by commit 79a739c.

Any user relying on it is relying on undefined and undocumented behavior. But again, out of a great abundance of caution, we'll wait until 3.0.0.

We will also have to update some tests. When we drop the "#default" line from add_hash_param(), a "#default" value gets added to a resource's meta-attributes if present in the XML. This results in a resource definition change, which would change two test outputs.

Ref https://github.com/ClusterLabs/pacemaker/pull/3301/commits/fd5509d50f36e9e861c4d7a5625e0639771dcd44#r1439575747

Event Timeline

nrwahl2 triaged this task as Normal priority.Jan 2 2024, 3:22 PM
nrwahl2 created this task.
nrwahl2 created this object with edit policy "Restricted Project (Project)".
nrwahl2 added a project: Restricted Project.Jan 2 2024, 3:46 PM
nrwahl2 added a project: Restricted Project.
kgaillot moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.Jan 24 2024, 1:05 PM