Page MenuHomeClusterLabs Projects

Finish public libpacemaker API for stonith_admin
Closed (Merged)Public

Assigned To
Authored By
kgaillot
Oct 1 2024, 12:32 PM
Tags
  • Restricted Project
  • Restricted Project
  • Restricted Project
  • Restricted Project
Referenced Files
None
Subscribers

Description

stonith_admin was the first tool whose functionality was moved to libpacemaker. We implemented a public API for it but did not expose it (see BUILD_PUBLIC_LIBPACEMAKER) because we weren't sure what we should expose yet.

Now that we have more experience, it's clear we just need to drop the stonith_t argument from the public APIs. Each public API should be a wrapper that creates a stonith_t (as well as an output object), calls the internal API, and returns the (XML) result.

Two functions will need additional changes. pcmk_fence_register_level() and pcmk_fence_validate() currently take a stonith_key_value_t argument. That shouldn't be used in libpacemaker APIs because it will likely be replaced when libstonithd is eventually merged into libcrmservice. pcmk_fence_register_level() can use a GList of char* instead (create_level_registration_xml() uses only the values, not the keys). pcmk_fence_validate() can use GHashTable; the first thing stonith_api_validate() does is convert the key pairs to a GHashTable, so it can be split into a wrapper that does that and a real function that doesn't (and can be called directly by pcmk_fence_validate() rather than as a stonith_t method).

Related Objects

StatusAssignedTask
Mergedclumens

Event Timeline

kgaillot created this task.
kgaillot created this object with edit policy "Restricted Project (Project)".
kgaillot added a parent task: Restricted Maniphest Task.
clumens changed the task status from Open to WIP.Oct 18 2024, 12:02 PM
kgaillot added a project: Restricted Project.Oct 28 2024, 1:02 PM