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

question: ostree admin upgrade does it twice #640

Closed
johan-smits opened this issue Jan 4, 2017 · 7 comments
Closed

question: ostree admin upgrade does it twice #640

johan-smits opened this issue Jan 4, 2017 · 7 comments
Labels

Comments

@johan-smits
Copy link

When we run a ostree admin upgrade it deploys a new one (when there is one).
When you run it again (and you did not reboot yet to the new one) it does a redeploy of the already deployed again.
Why does it redeploy when the last one was successful?

We want to cron the upgrade task on the desktops but we are limited to daily because we do not want to reboot automatically but we want to check for updates more frequently.

@cgwalters
Copy link
Member

You can do the "download but don't deploy" with a raw "ostree pull". We don't have good porcelain for this right now though.

@paulvt
Copy link

paulvt commented Jan 4, 2017

One would expect ostree admin upgrade downloads and decides not to deploy if it already has done so.
You do get this desired behaviour if you are already booted to the newest OS:

$ sudo ostree admin upgrade

1 metadata, 0 content objects fetched; 313 B transferred in 0 seconds                                                   
No update available.

@cgwalters
Copy link
Member

Yes - it's complex, one reason we do a redeploy is to re-do copying /etc, in case there were any changes. See also coreos/rpm-ostree#40

Big picture, at some point I'd like to merge the "pure ostree daemon" code from https://github.com/endlessm/eos-updater into ostree, and have it support things like "background pull of updates, deploy last pulled and reboot".

@cgwalters
Copy link
Member

Daemon aside, I think it'd be pretty easy to implement:

ostree admin upgrade --pull-only  # Run this in a cron job
ostree admin upgrade --deploy --reboot # Run this to actually do the deployment, just before rebooting

@johan-smits
Copy link
Author

We use it in a desktop environment and we want to prevent a reboot (users can be working on their desktop and do not appreciate a reboot in the middle of their work).

Will have a look at https://github.com/endlessm/eos-updater

cgwalters added a commit to cgwalters/ostree that referenced this issue Jan 5, 2017
This makes it easier to script downloading updates in the background,
and only do deployments just before rebooting.

Partially addresses ostreedev#640
@cgwalters
Copy link
Member

I took a quick crack at this in #642

cgwalters added a commit to cgwalters/ostree that referenced this issue Jan 5, 2017
This makes it easier to script downloading updates in the background,
and only do deployments just before rebooting.

Partially addresses ostreedev#640
cgwalters added a commit to cgwalters/ostree that referenced this issue Feb 13, 2017
This makes it easier to script downloading updates in the background,
and only do deployments just before rebooting.

Partially addresses ostreedev#640
rh-atomic-bot pushed a commit that referenced this issue Feb 27, 2017
This makes it easier to script downloading updates in the background,
and only do deployments just before rebooting.

Partially addresses #640

Closes: #642
Approved by: jlebon
@cgwalters
Copy link
Member

Going to close this as fixed by #642 - but I only lightly tested that, so feel free to reopen. There's definitely bigger picture stuff here around having better tooling than raw ostree admin upgrade to fix, but I think the raw functionality is there now.

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

No branches or pull requests

3 participants