Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lxd: Fully configure new node from cluster config after it is added. #12347

Merged
merged 1 commit into from
Oct 6, 2023

Conversation

markylaing
Copy link
Contributor

When a new node is added to the cluster, it should get all cluster config (now present after it joins the cluster db) and apply configuration changes locally.

Previously we were attempting to apply changes based on the daemons current cluster config (from state) which did not reflect the full cluster configuration. Additionally, we were only applying a subset of configuration changes. This change utilises the doApi10UpdateTriggers to apply all changes consistently.

@markylaing markylaing added the Bug Confirmed to be a bug label Oct 5, 2023
@markylaing markylaing self-assigned this Oct 5, 2023
@markylaing
Copy link
Contributor Author

@tomponline I found this while ensuring the openfga config gets set on a new cluster member during the join process. I'm pretty certain that RBAC and Candid auth is not being set on joining members because the config values are coming from the state of the joining node, which hasn't been updated yet. A bunch of other configuration updates were also being missed like ACME, Loki, DNS, BGP, and so on.

If there is another place where this is all being set then please let me know. I'm not sure how this has never come up before.

@tomponline
Copy link
Member

@markylaing this is a good catch, thanks, and the way you've approached it looks great to me as it'll be future proof.

lxd/api_cluster.go Outdated Show resolved Hide resolved
lxd/api_cluster.go Outdated Show resolved Hide resolved
When a new node is added to the cluster, it should get all cluster
config (now present after it joins the cluster db) and apply
configuration changes locally.

Previously we were attempting to apply changes based on the daemons
current cluster config (from state) which did not reflect the full
cluster configuration. Additionally, we were only applying a subset of
configuration changes. This change utilises the doApi10UpdateTriggers to
apply all changes consistently.

Signed-off-by: Mark Laing <mark.laing@canonical.com>
@markylaing
Copy link
Contributor Author

I'm not sure why the docs build is failing, nor how to re-trigger it.

@markylaing markylaing mentioned this pull request Oct 5, 2023
5 tasks
@tomponline tomponline merged commit 2220b4e into canonical:main Oct 6, 2023
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Confirmed to be a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants