-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request juju#16647 from SimonRichardson/bootstrap-worker
juju#16647 Adds the bootstrap worker scaffolding. The core concept is to perform the deployment of the controller charm within the dependency engine and not outside of it. We currently have issues with slide-loading various state functions in the tests (machine legacy tests). The new model is for bootstrapping a database with dqlite to prevent that same modeling aspect. Instead, to access the database you have two core concepts. 1. Insert bootstrap database functions 2. Access the database from within the dependency engine. The way we're planning to add a binary blob to the object store is to be immutable once added. There is no concept of updating the hash of an existing object (there are consequences to doing this after the fact which complicates the model). So with that in mind, we calculate the hash of the blob when writing to the underlying storage and then populate the database. This rules out doing point 1, unless we're willing to swallow calculating the hash multiple times and I'm not even sure it's possible to do it nicely for charmhub charms. Moving it to the bootstrap worker allows us to keep the second concept pure. The only complication is ensuring that if we add the application and fail at a later step, then it's still recoverable or exits in a clean fashion. <!-- Why this change is needed and what it does. --> ## Checklist <!-- If an item is not applicable, use `~strikethrough~`. --> - [x] Code style: imports ordered, good names, simple structure, etc - [x] Comments saying why design decisions were made - [x] Go unit tests, with comments saying what you're testing ## QA steps We need to ensure that we can still bootstrap. ```sh $ juju bootstrap lxd test --build-agent $ juju enable-ha $ juju add-model default $ juju deploy ubuntu ``` ## Links **Jira card:** JUJU-4972
- Loading branch information
Showing
21 changed files
with
1,474 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.