Skip to content

Import definitions in the post-launch phase #2396

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

Merged
merged 2 commits into from
Jun 26, 2020

Conversation

michaelklishin
Copy link
Collaborator

@michaelklishin michaelklishin commented Jun 26, 2020

To make sure definitions that depend on plugins (federation upstreams, shovels, exchanges of custom types) can be imported.

This preserves an implicit feature of the previous implementation: since definition import was performed in a boot step
that preceded the empty DB check one in the boot step DAG, a node with a definition file to load would not seed its default data (virtual host and user).

Closes #2384.

This way definitions that depend on a plugin, such as federation upstreams
or exchanges of custom types, can be imported successfully.

Closes #2384
…d on boot

This is a behavior we use to provide because definitions were
imported before the empty DB boot step. Now when the definitions
are imported in the post-launch phase, we'd always end up with
default data seeded in addition to definitions being imported.

References #2384
@michaelklishin michaelklishin merged commit f935cc1 into master Jun 26, 2020
@michaelklishin michaelklishin deleted the rabbitmq-server-2384 branch June 26, 2020 02:50
michaelklishin added a commit that referenced this pull request Jun 26, 2020
Import definitions in the post-launch phase

(cherry picked from commit f935cc1)
@michaelklishin
Copy link
Collaborator Author

Backported to v3.8.x.

lukebakken added a commit that referenced this pull request Mar 22, 2023
Fixes #7678

References:
* #2384
* #2396

PR #2396 preserved the old behavior where definitions import took
priority over the default data and environment data that may be present.
This behavior continues to confuse users where they expect
`RABBITMQ_DEFAULT_USER` / `RABBITMQ_DEFAULT_PASS` to be imported,
especially if there is no `users` data in the definitions file.

This PR allows default data and the environment to be imported first,
then possibly overwritten by the definitions file.
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.

Perform definition import after plugins are enabled
1 participant