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

Add a builtin command to pin the current deployment? #1922

Open
juhp opened this issue Sep 16, 2019 · 4 comments
Open

Add a builtin command to pin the current deployment? #1922

juhp opened this issue Sep 16, 2019 · 4 comments

Comments

@juhp
Copy link

juhp commented Sep 16, 2019

Would it make sense to add a built-in command (or option) to pin the current deployment?
(I actually wrote a tiny tool to do this already but in Haskell: https://github.com/juhp/ostree-pin/blob/master/Main.hs.)
I think this would be useful on Silverblue, where it is easy to "lose" one's last "good" deployment (ie with just a reboot into stage and then one more rpm-ostree operation and a reboot).

I am thinking something like ostree admin pin --current.

@juhp
Copy link
Author

juhp commented Sep 16, 2019

I should add that I really want a bit more than just pinning the booted deployment - actually I want to move the pin to the current deployment.

@jlebon
Copy link
Member

jlebon commented Sep 17, 2019

Would it make sense to add a built-in command (or option) to pin the current deployment?

This could probably be an rpm-ostree command, e.g. rpm-ostree pin.

I think this would be useful on Silverblue, where it is easy to "lose" one's last "good" deployment (ie with just a reboot into stage and then one more rpm-ostree operation).

Yeah, that's bothered me as well in the past. I think what we may want to express here is GC based on versions rather than number of deployments. So no matter the number of e.g. rpm-ostree install follow-up operations, you always keep at least one deployment of the previous version. This would probably be an rpm-ostree thing though, since that's where the base/layer concepts live.

@juhp
Copy link
Author

juhp commented Sep 18, 2019

That's an attractive idea and probably better than just keeping 3 deployments.
I suppose this could also be implemented by pinning perhaps.

@jlebon
Copy link
Member

jlebon commented Sep 18, 2019

OK, split that one out as coreos/rpm-ostree#1905. We can keep this here to track the original request too though (though I do think we should wrap pin in rpm-ostree, so would be good with just moving this issue there too -- but let's see if anyone else is interested in enhancing ostree admin pin specifically).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants