Skip to content

Director baskets: move from Data Fields to Custom Variables #1556

Description

@markuslf

Describe the solution you'd like

Icinga Director v1.12.0 deprecates Data Fields in favour of the new Custom Variables. Our Director baskets are built entirely on Data Fields, currently 4027 of them.

Nothing breaks today. The current basket imports and deploys unchanged on Director v1.12.1, both upstream and the Linuxfabrik fork (verified on Rocky 8 with all 156 Service Sets deployed). Upstream has not announced a removal of Data Fields.

Goal: make the Linuxfabrik Director fork obsolete. When a Custom Variable is renamed in a basket, the official Director moves the values already set on hosts and services along with it. For Data Fields this is the only feature we still maintain the fork for (Icinga/icingaweb2-module-director#2910). The fork's remaining patch (Icinga/icingaweb2-module-director#2725) only reverses the display order in the basket diff and does not justify a fork on its own.

What needs to be done:

  1. Verify the upstream behaviour first. So far it is only known from the Director source (PropertyValueMigration, CustomVariableValueCleaner) and docs: import a basket with a Custom Variable, set values on a host and a service, import a basket with the same variable renamed (same UUID), and check that the values moved.
  2. tools/build-basket and tools/basket-join write Custom Variables (basket key CustomVariable) instead of Data Fields, with fixed UUIDs per variable.
  3. Define a transition for existing installations that already have our Data Fields. As long as a Data Field with the same name exists, the Director deliberately leaves the values of a Custom Variable untouched on rename or delete.
  4. Document the upgrade path in ICINGA.md.
  5. Once all installations have switched, move them to the official Director and archive the fork. Until then, installations still importing Data Field baskets need the fork.

Constraints:

  • The resulting basket requires Director v1.12.0 or newer. Installations on v1.11 can no longer import it.
  • icingacli director migrate datafields is not an option for customer installations. It assigns random UUIDs per instance, so a renamed variable in a later basket would be created as a new one instead of being renamed.

Already checked: our baskets use no var_filter (not supported by Custom Variables), and all Data Field types (String, Boolean, Datalist, Array) have a Custom Variable equivalent.

Additional context

Suggested timing: once upstream announces the removal of Data Fields, or once all installations run Director v1.12 or newer.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions