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

install: Make stateroot configurable #622

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

omertuc
Copy link
Contributor

@omertuc omertuc commented Jun 21, 2024

(draft because untested yet, also want to add integration tests)

This commit makes it so that the bootc install stateroot will be configurable (it defaults to default). For now this is a hidden CLI option until we decide whether we want to commit to this API.

In the future we also want to make the stateroot of bootc switch be configurable (#617) so that users can install an image to a new stateroot while they already have an existing stateroot

Also removed the constant STATEROOT_DEFAULT, we're now simply taking it from the ostree_ext crate

@github-actions github-actions bot added the area/install Issues related to `bootc install` label Jun 21, 2024
lib/src/install.rs Outdated Show resolved Hide resolved
@cgwalters
Copy link
Collaborator

For tests, try adding a new case to

@omertuc omertuc force-pushed the installstateroot branch 3 times, most recently from 8e9e129 to c093213 Compare June 25, 2024 10:14
lib/src/install.rs Outdated Show resolved Hide resolved
This commit makes it so that the `bootc install` stateroot will be
configurable (it defaults to `default`). For now this is a hidden CLI
option until we decide whether we want to commit to this API.

In the future we also want to make the stateroot of `bootc switch` be
configurable (containers#617) so that
users can install an image to a new stateroot while they already have an
existing stateroot

Also removed the constant `STATEROOT_DEFAULT`, we're now simply taking
it from the `ostree_ext` crate
Copy link
Collaborator

@cgwalters cgwalters left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks sane to me, could just use a test in tests-integration/src/install.rs or so.

@@ -158,6 +156,10 @@ pub(crate) struct InstallConfigOpts {
#[clap(long)]
#[serde(default)]
pub(crate) generic_image: bool,

/// The stateroot name to use. Defaults to `default`.
#[clap(long, hide = true)]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should at least debate: any reason not to stabilize (i.e. not hide = true) this? This really I guess is just the question of whether we want to tie bootc to the ostree concept of "stateroot" as is basically forever.

I think it's unlikely to be valuable for us to try to do anything really different here, so I'd say stabilize.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/install Issues related to `bootc install` do-not-merge/work-in-progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants