Skip to content

ctdb-common: add ctdb_read_nodes_cmd function

This work-in-progress branch is an attempt to add dynamic loading of nodes to CDTB. In short, the idea is support use cases like having the nodes file stored elsewhere (or generated) for cases where there is no locally mounted shared file system. For my use case in particular, we will be using a vfs module and containers and have no way to simply open a common nodes file. These changes attempt to mirror the workflow of setting up a cluster lock command rather than a cluster lock file. You can now specify nodes list = in the conf file. If the value starts with an exclamation point character (!), the remainder of the value will be used as a command to execute. The standard out of the command will be read and parsed like a regular nodes file.

The server parts of the changes are working well enough for me so far. The command line parts were more difficult as there seems to be code duplicated between the server libs and the cli tool and I wasn't sure what to do about that. I'm also currently working on trying to make the current test suite pass before I finalize things with new tests and docs.

Checklist

  • Commits have Signed-off-by: with name/author being identical to the commit author
  • (optional) This MR is just one part towards a larger feature.
  • (optional, if backport required) Bugzilla bug filed and BUG: tag added
  • Test suite updated with functionality tests
  • Test suite updated with negative tests
  • Documentation updated
  • CI timeout is 3h or higher (see Settings/CICD/General pipelines/ Timeout)

Reviewer's checklist:

  • There is a test suite reasonably covering new functionality or modifications
  • Function naming, parameters, return values, types, etc., are consistent and according to README.Coding.md
  • This feature/change has adequate documentation added
  • No obvious mistakes in the code
Edited by John Mulligan

Merge request reports