Skip to content

Allow MicroOVN init to take values from stdin. - #353

Merged
matperin merged 1 commit into
canonical:mainfrom
crypticC0der:goodinit
Jul 22, 2026
Merged

Allow MicroOVN init to take values from stdin.#353
matperin merged 1 commit into
canonical:mainfrom
crypticC0der:goodinit

Conversation

@crypticC0der

Copy link
Copy Markdown
Contributor

The microovn init functionality is not very machine usable, which is a problem because we like machines and the operator charm could gain a lot of extra functionality through the init options.

The simple solution is to allow passing values though init as a yaml object.

@crypticC0der
crypticC0der requested a review from a team as a code owner July 14, 2026 13:54

@matperin matperin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @crypticC0der for the changes.

There is nothing worth flagging in what is currently present, the implementation is very well done, imho.

I think there are a few things missing before calling this feature complete, though:

  • While the main functionality testing is covered (end-to-end bootstrap + join of a 3-node cluster via preseed YAML) we are still missing coverage for some added paths.
    I think adding one preseed test that sets services and custom_encapsulation_ip (and, ideally, a custom_ca variant mirroring init_cluster_user_ca.bats) and one test using additional_servers might be worthwhile. Also, while not entirely needed, one could also argue to add a couple of negative validation tests (invalid mode / bad YAML / join without token).
  • Since this is a new user/machine-facing interface, I would advise against leaving it undocumented. Leaving no mentions of preseed or the YAML fields on the docs risks making the feature undiscoverable by the charm authors who are the stated audience (mostly us, but still good for future-proofing).
    I'd suggest a new how-to (e.g. docs/how-to/preseed-init.rst) that documents the full InitValues YAML schema and which fields apply to bootstrap vs join (i.e. the validation rules, token required for join and forbidden for bootstrap are non-obvious and should be spelled out), the additional_servers behavior (issues join tokens, printed to stdout) and maybe a note that if stdin is a TTY the command stays interactive. Also, a bootstrap example and a join example piping YAML into microovn init could be useful.

Other than this everything looks good.

The microovn init functionality is not very machine usable, which is a
problem because we like machines and the operator charm could gain a lot
of extra functionality through the init options.

The simple solution is to allow passing values though init as a yaml object.

Signed-off-by: MJ Ponsonby <mj.ponsonby@canonical.com>

@matperin matperin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the added tests.
I see that the documentation is still missing but we can add it in a later commit, if needed.

@matperin
matperin merged commit f86e1cd into canonical:main Jul 22, 2026
107 of 109 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants