-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
eos-updater: Avoid scheduler for offline updates
Currently eos-updater asks the download scheduler (mogwai) before fetching an update, so that the user's configured update schedule can be respected. However that system is designed to help users with limited Internet connections; it doesn't make sense to use it when the update comes from local sources, such as the local network or a USB drive. So this commit makes changes to eos-updater so that offline OS updates can happen regardless of whether or not automatic updates are turned on. The way this is implemented is that in the Poll() stage, we first check offline sources for updates, and then only check the Internet if none were found offline. If we simply check all the sources at once as we previously were, you'd have to make significant changes to the Fetch() stage, because the scheduler can't make a decision when the offline and online results are mixed together. There are two notable implications of this implementation: 1. This means that even if the LAN or USB drive has an older update than what's available on the Internet, we update from it first (then on the next check for updates the Internet would be used). In my opinion, this is desired behavior because after the offline update is complete, the delta for the online update may be smaller. 2. Before this commit if the fetch from an offline source fails we try to fetch from the Internet (if they both provide the latest commit). After this commit, if the offline fetch fails the whole update fails. This might be less than ideal but I don't think it will matter in practice. The alternative would be to rearchitect eos-updater or the libostree API used for the fetch in significant ways. A mounted filesystem or a peer on the network could conceivably prevent you from updating, but that's true both before and after this commit; see ostreedev/ostree#1527 https://phabricator.endlessm.com/T23972
- Loading branch information
Showing
5 changed files
with
74 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters