-
Notifications
You must be signed in to change notification settings - Fork 594
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
many: allow systems installed via installer API to pick optional snaps and components #14426
many: allow systems installed via installer API to pick optional snaps and components #14426
Conversation
3870e0b
to
5eba35a
Compare
5eba35a
to
6762c7a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple of minor test comments
tests/lib/muinstaller/main.go
Outdated
@@ -295,6 +297,21 @@ func postSystemsInstallFinish(cli *client.Client, | |||
return waitChange(chgId) | |||
} | |||
|
|||
func maybeGetOptionalInstall() *client.OptionalInstallRequest { | |||
f, err := os.Open("./optional-install.json") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be better to pass the json file as a program argument to make it more explicit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but agreed on this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added flags to muinstaller in c853aa3.
# default (unencrypted) case | ||
NESTED_ENABLE_TPM: false | ||
NESTED_ENABLE_SECURE_BOOT: false | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could remove the "plain" ones I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it probably would be better to run the various test cases with encryption on, right? And then leave this plain
case to cover the unencrypted case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, then these two should be set to true and maybe remove the "encrypted" case as it will be covered by the "install*" cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in a881fd2.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the changes, LGTM, but please look at testing comment
# default (unencrypted) case | ||
NESTED_ENABLE_TPM: false | ||
NESTED_ENABLE_SECURE_BOOT: false | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, then these two should be set to true and maybe remove the "encrypted" case as it will be covered by the "install*" cases.
0b9ce2a
to
a881fd2
Compare
5afd742
to
3a019e8
Compare
…epresent uses devicestate.OptionalContainers
3a019e8
to
437f018
Compare
The tests failing here are known and unrelated to the changes in this PR, and I've verified that they're also present on master. |
…s and components (canonical#14426) * daemon, o/devicestate: rename devicestate.OptionalInstall to better represent uses devicestate.OptionalContainers * o/devicestate: add available optional snap and components to the System struct * daemon: report available optional containers for a system available for install * o/devicestate, s/seedtest: handle optional-install field on install-finish task * tests: test seeding optional snaps and components from snapd installer api * tests: use flags for arguments passed to the muinstaller * tests: use encrypted installation for cases with optional snaps and components * tests: make test work for core24 too
This PR ties together work that enables users to pick which snaps and components to install from a set of available containers.