Skip to content

Allow NewMember hook before initialialization#37

Merged
stgraber merged 1 commit into
canonical:mainfrom
masnax:hook-init
Oct 11, 2022
Merged

Allow NewMember hook before initialialization#37
stgraber merged 1 commit into
canonical:mainfrom
masnax:hook-init

Conversation

@masnax
Copy link
Copy Markdown
Contributor

@masnax masnax commented Oct 11, 2022

After we are initialized, we send out a message to every other cluster member, telling them to run the NewMember hook. However, if those cluster members are also in the process of initializing, then this will fail and our cluster member won't initialize properly.

This allows POST and GET on /cluster to be available pre-init. In the case of POST, which is used for the above example, we will allow the request to go through it it's a cluster notification to run the hook. Otherwise, both methods will fail if the daemon has not been initialized, as before.

…zation

Signed-off-by: Max Asnaashari <max.asnaashari@canonical.com>
@stgraber stgraber merged commit 813eda8 into canonical:main Oct 11, 2022
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