Page MenuHomeClusterLabs Projects

Drop "default" as an allowed value for some meta-attributes
Open (Work In Progress), NormalPublic

Assigned To
Authored By
nrwahl2
Jan 2 2024, 3:22 PM
Tags
  • 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


An XSL transform should drop these

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

I suspect the use case for this feature was being able to set an explicit value in one block of meta-attributes, then have another rule-based block of attributes that resets the value to the default. Simply omitting the meta-attribute from the rule-based block wouldn't cause the explicit value to be removed.

However since the same effect can be achieved by setting the explicit value in another rule-based block, I think we can still drop support.

nrwahl2 changed the task status from Open to WIP.Tue, Jul 2, 5:36 AM
nrwahl2 claimed this task.
This comment was removed by nrwahl2.
nrwahl2 removed a project: Restricted Project.Tue, Jul 9, 4:43 AM