Redesign and simplify container creation/removal#843
Merged
Conversation
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Instead of having to scroll to the end (Shift G, or page down til end), let's instead start at the end now that we have control over paging in the CLI ourselves. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
The -S switch to less seemed at the time a good idea -- chop off too long lines and allow horizontal scrolling -- however, the -F option, to skip pager for content that fit the first screen is overridden by the -S switch. This makes commands like "show containers", and similar that normally have waaaaay too few lines for a pager to always page. So let's drop -S to regain the original behavior. This will cause lines to be wrapped, but with the new raw mode in the CLI this seems to work without any weird screen artifacts. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
The mDNS daemon, Avahi, is very verbose in its syslog output. So much that it often overshadows other subsystems, and on switches and routers with more than the "normal" amount of ports and interfaces, it quickly becomes unbearable. The patches consist of: - Add -l LEVEL support to avahi-daemon - Add missing casll to setlogmask() in libdaemon:daemon_set_verbosity() Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
When deleting interfaces we skip a lot of steps in netdag_gen_iface(), this patch ensures we at least call netdag_gen_ipv4_autoconf() to drop any running zeroconf agent in the same generation. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
mattiaswal
approved these changes
Nov 28, 2024
Contributor
mattiaswal
left a comment
There was a problem hiding this comment.
Cool, now even a dumbass as myself have a chance to understand how containers setup 👍
wkz
requested changes
Nov 28, 2024
Contributor
wkz
left a comment
There was a problem hiding this comment.
All hail @troglobit - destroyer of complexity! 😆
Just want to check the "no enable" behavior before approving.
This is a complete redesign of how the system creates/deletes containers from the running-config. Containers are now removed synchronously from confd before any interfaces they may be using are removed, and created in parallel, using a Finit task, well after confd has finished setting up interfaces. The logic previously provided by execd to retry container create on any route/address changes, or periodically every 60 seconds, is now handled by a new 'setup' command in the container wrapper script. Additionally, container create is now split in wget/curl/podman pull of the image and 'podman create'. This to both consolidate image fetching and improve user feedback since most of the retry logic (above) revolves around the image download. Fixes #835 Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Since `conmon` only logs the output from the monitored container's `stdout`/`stderr`, we might as well get rid of `k8s-logger`, and let the output pass through to finit, which will then pipe the messages to syslog. Fix #836
When disabling a container in the configuration we should not remove it, because then any volumes used by it may be lost. Instead, we now simply disable the service to prevent it from starting, or stopping it, if it was running. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
627dbe4 to
fbabf0e
Compare
This was
linked to
issues
Nov 28, 2024
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.
Description
The main purpose of this PR is to fix the unreliable behavior seen in #835, a few other bugs were also hunted down and fixed in the process:
show containersChecklist
Tick relevant boxes, this PR is-a or has-a: