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

RFE: Add a hidden option to ostree admin kargs edit-in-place to update all existing deployments in place #2617

Closed
HuijingHei opened this issue May 26, 2022 · 5 comments

Comments

@HuijingHei
Copy link
Collaborator

Describe the enhancement

Add a hidden option to ostree admin kargs edit-in-place to update all existing deployments in place.

Example:

$ sudo ostree admin kargs edit-in-place --append-if-missing=rw
This would be useful for: https://fedoraproject.org/wiki/Changes/Silverblue_Kinoite_readonly_sysroot

@HuijingHei HuijingHei changed the title RFE: Add a hidden option to ostree admin kargs edit-in-place --append-if-missing=rw to update all existing deployments in place RFE: Add a hidden option to ostree admin kargs edit-in-place to update all existing deployments in place May 26, 2022
@cgwalters
Copy link
Member

My main uncertainty here is whether this is a new subcommand or simply a flag. The current proposal is a subcommand, but I think a flag makes more sense because it can apply to all other operations (delete/add) etc.

In the subcommand version:

$ ostree admin kargs edit-in-place --append=foo=bar`
$ ostree admin kargs --append=foo=bar

In the flag version:

$ ostree admin kargs --in-place --append=foo=bar
$ ostree admin kargs --append=foo=bar

@lucab
Copy link
Member

lucab commented May 27, 2022

@cgwalters we'd like to scope this logic into an hidden subcommand, solving the immediate needs of Silverblue only. This task has two odd semantic requirements (in-place changes; tweaking all the deployments) which we'd like not to advertise too much.

For future public kargs verbs we'd like to stick to something similar to rpm-ostree behavior, which creates new deployments and does not touch inactive ones. In that regard, future non-hidden/documented subcommands may look like this:

$ sudo ostree admin kargs edit --append-if-missing=rw
## Creates new deployment, starts from the default active one, does not impact inactive ones

$ ostree admin kargs editor
## Like the one above, but interactive editing via $EDITOR

Flags like --in-place and --all-deployments will create odd mixes, which we'd like not to surface to users right now as we hope to keep future UX cleaner and closer to the existing rpm-ostree one.

@HuijingHei
Copy link
Collaborator Author

Both make sense, the flag version can better reuse the code, and subcommand version make the logic more specific.
I will try with subcommand version (like sudo ostree admin kargs edit-in-place --append-if-missing=rw), when review if found the other is better then can change

@travier @cgwalters @lucab @jlebon , WDYT?

@cgwalters
Copy link
Member

I will try with subcommand version (like sudo ostree admin kargs edit-in-place --append-if-missing=rw), when review if found the other is better then can change

Sounds good to me!

HuijingHei added a commit to HuijingHei/ostree that referenced this issue Jun 4, 2022
update all existing deployments in place

Example:
$ sudo ostree admin kargs edit-in-place --append-if-missing=rw
See ostreedev#2617
HuijingHei added a commit to HuijingHei/ostree that referenced this issue Jun 5, 2022
update all existing deployments in place

Example:
$ sudo ostree admin kargs edit-in-place --append-if-missing=rw
See ostreedev#2617
HuijingHei added a commit to HuijingHei/ostree that referenced this issue Jun 6, 2022
update all existing deployments in place

Example:
$ sudo ostree admin kargs edit-in-place --append-if-missing=rw
See ostreedev#2617
HuijingHei added a commit to HuijingHei/ostree that referenced this issue Jun 8, 2022
update all existing deployments in place

Example:
$ sudo ostree admin kargs edit-in-place --append-if-missing=rw
See ostreedev#2617
HuijingHei added a commit to HuijingHei/ostree that referenced this issue Jun 8, 2022
update all existing deployments in place

Example:
$ sudo ostree admin kargs edit-in-place --append-if-missing=rw
See ostreedev#2617
HuijingHei added a commit to HuijingHei/ostree that referenced this issue Jun 9, 2022
update all existing deployments in place

Example:
$ sudo ostree admin kargs edit-in-place --append-if-missing=rw
See ostreedev#2617
HuijingHei added a commit to HuijingHei/ostree that referenced this issue Jun 10, 2022
update all existing deployments in place

Example:
$ sudo ostree admin kargs edit-in-place --append-if-missing=rw
See ostreedev#2617
HuijingHei added a commit to HuijingHei/ostree that referenced this issue Jun 10, 2022
update all existing deployments in place

Example:
$ sudo ostree admin kargs edit-in-place --append-if-missing=rw
See ostreedev#2617
HuijingHei added a commit to HuijingHei/ostree that referenced this issue Jun 13, 2022
update all existing deployments in place

Example:
$ sudo ostree admin kargs edit-in-place --append-if-missing=rw
See ostreedev#2617
HuijingHei added a commit to HuijingHei/ostree that referenced this issue Jun 14, 2022
update all existing deployments in place

Example:
$ sudo ostree admin kargs edit-in-place --append-if-missing=rw
See ostreedev#2617
HuijingHei added a commit to HuijingHei/ostree that referenced this issue Jun 14, 2022
update all existing deployments in place

Example:
$ sudo ostree admin kargs edit-in-place --append-if-missing=rw
See ostreedev#2617
HuijingHei added a commit to HuijingHei/ostree that referenced this issue Jun 14, 2022
update all existing deployments in place

Example:
$ sudo ostree admin kargs edit-in-place --append-if-missing=rw
See ostreedev#2617
HuijingHei added a commit to HuijingHei/ostree that referenced this issue Jun 15, 2022
update all existing deployments in place

Example:
$ sudo ostree admin kargs edit-in-place --append-if-missing=rw
See ostreedev#2617
HuijingHei added a commit to HuijingHei/ostree that referenced this issue Jun 15, 2022
update all existing deployments in place

Example:
$ sudo ostree admin kargs edit-in-place --append-if-missing=rw
See ostreedev#2617
HuijingHei added a commit to HuijingHei/ostree that referenced this issue Jun 15, 2022
update all existing deployments in place

Example:
$ sudo ostree admin kargs edit-in-place --append-if-missing=rw
See ostreedev#2617
HuijingHei added a commit to HuijingHei/ostree that referenced this issue Jun 15, 2022
update all existing deployments in place

Example:
$ sudo ostree admin kargs edit-in-place --append-if-missing=rw
See ostreedev#2617
HuijingHei added a commit to HuijingHei/ostree that referenced this issue Jun 15, 2022
update all existing deployments in place

Example:
$ sudo ostree admin kargs edit-in-place --append-if-missing=rw
See ostreedev#2617
HuijingHei added a commit to HuijingHei/ostree that referenced this issue Jun 15, 2022
update all existing deployments in place

Example:
$ sudo ostree admin kargs edit-in-place --append-if-missing=rw
See ostreedev#2617
HuijingHei added a commit to HuijingHei/ostree that referenced this issue Jun 15, 2022
update all existing deployments in place

Example:
$ sudo ostree admin kargs edit-in-place --append-if-missing=rw
See ostreedev#2617
HuijingHei added a commit to HuijingHei/ostree that referenced this issue Jun 20, 2022
update all existing deployments in place

Example:
$ sudo ostree admin kargs edit-in-place --append-if-missing=rw
See ostreedev#2617
HuijingHei added a commit to HuijingHei/ostree that referenced this issue Jun 21, 2022
update all existing deployments in place

Example:
$ sudo ostree admin kargs edit-in-place --append-if-missing=rw
See ostreedev#2617
HuijingHei added a commit to HuijingHei/ostree that referenced this issue Jun 23, 2022
update all existing deployments in place

Example:
$ sudo ostree admin kargs edit-in-place --append-if-missing=rw
See ostreedev#2617
HuijingHei added a commit to HuijingHei/ostree that referenced this issue Jun 23, 2022
update all existing deployments in place

Example:
$ sudo ostree admin kargs edit-in-place --append-if-missing=rw
See ostreedev#2617

This will not add duplicate key, if there is `TESTARG=VAL1` in the
kernel arguments, `--append-if-missing=TESTARG=VAL2` will be ignored.
HuijingHei added a commit to HuijingHei/ostree that referenced this issue Jun 23, 2022
update all existing deployments in place

Example:
$ sudo ostree admin kargs edit-in-place --append-if-missing=rw
See ostreedev#2617

This will not add duplicate key, if there is `TESTARG=VAL1` in the
kernel arguments, `--append-if-missing=TESTARG=VAL2` will be ignored.
@HuijingHei
Copy link
Collaborator Author

Close this refer to #2639

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

No branches or pull requests

3 participants