Repository navigation
feat(packages): Docker apart from the System packages update - #14
Merged
Merged
Conversation
The update installed everything apt could upgrade, Docker's packages included, and upgrading docker-ce or containerd.io restarts the Docker daemon: every container stops until it is back, and the ones without a restart policy stay stopped. The check lists Docker on a line of its own (version, where it came from, what apt offers, the command to type to update it oneself), and the update installs the explicit list the check shows, minus Docker's packages: --only-upgrade install of names apt printed and that pass as package names, after a second simulation of exactly that list has been found to change nothing of Docker's and to remove nothing. DPkg::Lock::Timeout=120. One check of 'the box is being changed' (a ReCasaOS update, an update of Docker, a package manager holding dpkg's lock) now guards the package update, the ReCasaOS update and the automatic updater.
…dings The check on dpkg's lock used flock(1), whose lock apt and dpkg never see (they take POSIX record locks), and counted any non-zero exit as held: on a host without dpkg it refused the ReCasaOS update for ever. The lock is now probed with fcntl F_GETLK on the lock files, only on a host that has dpkg, and tested against a lock held by another process. Also: the manual command names every package the line lists; the family is excluded only on a box that has a Docker engine; held and half-configured packages count as installed; the simulations no longer hold the update's lock; the box is looked at again right before the unit starts, and the unit itself simulates the list again right before it installs and installs nothing if it now touches Docker or removes a package; a list that is no longer the checked upgrades is a conflict; a refusal to start is not a failed attempt of the automatic updater; 'nothing to update' no longer blames Docker on a box without it.
…o protect A box with no Docker engine (a Kubernetes node's containerd, say) keeps containerd.io in its update, and the unit's own guard stops only on a removal there.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The System packages update ran one apt upgrade of everything, and upgrading docker-ce or containerd.io restarts the Docker daemon: every container stops until it is back, and the ones with no restart policy stay stopped (measured on six machines, see CasaOS-Install#15). Nothing said so.
apt-get install --only-upgrade --no-install-recommendsof names apt printed and that pass as package names, never concatenated unchecked into the unit's shell line. Before starting, a second simulation of exactly that list must change nothing of Docker's and remove nothing, otherwise the update is refused. If only Docker is left, it says so.DPkg::Lock::Timeout=120, and one 'the box is being changed' check (a ReCasaOS update, an update of Docker, dpkg's lock held) guards the package update, the ReCasaOS update and the automatic updater, which starts nothing while it holds.Unit tests for the new package pkg/dockerpkg run anywhere; the service tests need Linux (this PR's CI is their first run). The UI change follows in CasaOS-UI. Not in this PR: the guard on AppManagement's Docker root-directory route, and an 'Update Docker' action.