47 Commits
Author SHA1 Message Date
Joachim Wiberg 674fd6c396 confd: allow both ends of a veth pair to be assigned to containers
Previously at least one end of a veth pair had to remain in the host
namespace, because that end created and destroyed the pair.  Assigning
both ends to containers left no one to create it.

Select a deterministic primary end so exactly one side creates the pair.
When the primary is itself a container interface, create the pair in the
host namespace before the container starts; CNI host-device then moves
each end into its container.  Teardown is deferred to the container
removal script so the pair does not linger and block re-creation.

Drop the now-obsolete limitation notes from the documentation and YANG,
and add a regression test connecting two containers over a veth pair.

Fixes: #941

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-06-20 19:26:22 +02:00
Joachim Wibergandtroglobit 3966f8ed0e Document VETH pair limitation with containers
Add documentation noting that at least one side of a VETH pair must
remain in the host namespace. Both ends cannot be assigned to different
containers.

Updates:
- container.md: Added IMPORTANT note in Container Host Interface section
- infix-if-veth.yang: Added note in module description
- infix-if-container.yang: Added note in host identity description

Fixes: #947
Related: #941

Co-authored-by: troglobit <183517+troglobit@users.noreply.github.com>
2026-02-06 15:56:51 +01:00
Joachim Wiberg b031f5216a doc: update remaining guides to new example format
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-25 11:16:57 +01:00
Joachim Wiberg 84b1f1ad12 doc: update, new resource limits section for containers
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-02 20:09:33 +01:00
Joachim Wiberg d89283a14e doc: fix intra-document links
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-17 11:27:36 +01:00
Joachim Wiberg ef73ec6ce8 doc: explain docker image tags and rewrite upgrade section
Much of the content was made obsolete by recent changes, we now optimize
the experience for users, avoiding recreate at boot unless checksums for
configuration or base image have changed.

This was also a good time to explain the difference between mutable and
immutable tags, which sometimes is a cause for great confusion.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-23 15:24:00 +02:00
Joachim Wiberg ff175c02f7 doc: add section on container volume management
Since there is no safe way (unique hash/id) to identify unused named
volumes, we cannot automate removal of them.  Since volume data, when
compared to a container image, is quite small, it was decided that we
document this instead.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-23 15:24:00 +02:00
Joachim Wiberg b0adf85f12 doc: minor, adjust image syntax and headings
- Consistent formatting of image formatting
 - Make container examples easier to see

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-07-30 14:58:09 +02:00
Joachim Wiberg a491f2a88b doc: minor syntax changes/cleanup, rephrase + use admonitions
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-07-30 14:58:01 +02:00
Joachim Wiberg c28ea1db19 doc: refresh container documentation
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-02-24 22:31:19 +01:00
Joachim Wiberg 3bbe9a9a9d doc: update container doucmentation
- No more default writable layer
 - Don't mention read-only (deprecated, and always on now)
 - Use ghfm note highlights

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-11-20 09:19:53 +01:00
Joachim Wiberg 0d0e2b168a doc: update container notes
- Expand on Docker Hello World
 - Add more pictures to help break up the content a bit

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-10-16 07:31:41 +02:00
Jon-Olov Vatn e11008c7d2 Doc: minor fixes to container doc
[skip ci]
2024-10-15 09:24:35 +02:00
Joachim Wiberg 24b93074c5 doc: update container documentation a bit, more images
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-10-14 19:18:34 +02:00
Joachim Wiberg a14fada0ee confd: add support for container hostname format specifiers
This patch makes it possible to use format specifiers to "uniqiefy" a
container's hostname in the same way as with ietf-system hostname.

The following specifiers are currently supported:

 - %h default hostname from /etc/os-release
 - %i value of ID from /etc/os-release
 - %m last three octets of base MAC, e.g., c0-ff-ee

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-10-14 18:00:00 +02:00
Joachim Wiberg 7346f122fd confd: allow all container networks to set interface name
Unlock setting a custom interface name inside the container.  This aids
se-cases where this is needed and provide a better user experience, for
example when upgrading containers.  Not having to reboot the host just
to activate an upgrated container.

Fixes #708

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-10-14 18:00:00 +02:00
Joachim Wiberg 025c3ab7f6 doc: new setting on general interface settings
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-10-11 16:41:21 +02:00
Joachim Wiberg 0f6cbe9d30 doc: minor update, missing period + grammar
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-13 16:31:39 +02:00
Joachim WibergandTobias Waldekranz abd8621e92 doc: split container host interface, add w/ phys-address example
The container host interface text was a bit hard to understand.  This
patch splits it up in two parts, basic routed setup and an advanced
with two interfaces.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-05-18 09:58:19 +02:00
Joachim Wiberg f47da7c249 doc: spice up breaking-out-of container security warning
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-04-03 16:08:37 +02:00
Joachim Wiberg 3611d881ff doc: untabify OCI example and add missing newline to output
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-04-03 16:08:37 +02:00
Joachim Wiberg fad75575e4 confd: add limited support for container capabilities
This change adds limited support for container capabilities.  It allows
a more fine-grained control than priviliged mode does.

Fixes #365

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-04-03 16:08:37 +02:00
Joachim Wiberg da56c95930 doc: add advanced section to container document
Fixes #361

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-04-03 16:08:37 +02:00
Joachim Wiberg ea956026da doc: use same prompt 'admin@example:/>' as other documentation
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-04-03 16:08:37 +02:00
Joachim Wiberg 74dd8d3644 doc: add section on Container Images and update container upgrade
OCI archives are a bit special.  Mention how to load, reference, and
upgrade system using such images.

Fixes #368

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-04-03 16:08:37 +02:00
Joachim Wiberg 431805c1cd doc: add default route example for static container interfaces
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-04-03 16:08:37 +02:00
Tobias WaldekranzandJoachim Wiberg 29158ed2ef doc/container: Fix dead links in table of contents
[skip ci]
2024-03-22 08:20:12 +01:00
Joachim Wiberg 11c862bbd5 doc: nftables container fixes
- Must run in privileged mode
 - Fix copy-paste container name: system -> nftables
 - Point out the important settings

[skip ci]

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-03-12 11:34:11 +01:00
Joachim Wiberg 88ca959a61 doc: update container documentation, set -> text-editor
[skip ci]

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-03-12 11:21:10 +01:00
Joachim Wiberg 8437a17353 doc: refactor container documentation slightly
Drop all mention of "CNI" and update text to not use, e.g., `cni-bridge`
when this was changed in the model before the merge to main.

[skip ci]

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-03-10 11:58:23 +01:00
Joachim Wiberg 360d3b322d confd: use podman stop/start to prevent container corruption
Sending SIGTERM to conmon is not a safe shutdown of a podman container.
To handle gracefully handle shutdown, restarting and provide an orderly
start of dependencies, we use the Finit sysv trick via container script
wrapper to call 'podman stop foo'.

However, since podman does not support syslog as output for containers
we employ an old FIFO trick with another program, k8s-logger, to allow
logs to reach syslog.  Please note that k8s-logger must have properly
started before we call `podman start` -- this makes us fully dependent
on the 'container' wrapper script.  Hence the documentation update.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-02-25 19:49:27 +01:00
Joachim Wiberg 34b06fa448 confd: update container documentation and YANG models
Due to the deprecation of CNI i Podman[1], and its upcoming removal in
Podman v5.0, we decided to cut our losses and modify all documentation
and models to become backend neutral.  We will continue to use CNI as
long as possible -- it gives us host interfaces, for instance, that is
not part of netawark yet, it seems.

Also, sync mount and volume documentation with YANG model changes.

[1]: https://blog.podman.io/2023/11/cni-deprecation-and-removal-from-podman-5-0/

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-02-25 19:49:27 +01:00
Joachim Wiberg 81d8643a6f confd: rename container 'file' to 'mount', add more mount types
After discussions in the development team, and an external demo, we
decided to rename file mounts to just mounts and adopt established
nomenclature.

With this change we now allow mounting any type of file or directory
from the host to the container, for regular files/directories a bind
mount is used.  We also introduce 'source' and 'type', to support
mounting of host files and directories, the destination path has been
renamed to 'target'.  The mount cousin, 'volume', which basically is a
specialized mount, has also been updated to use 'target'.

The 'source' and 'content' are now hidden behind a YANG choice to ensure
users can only use them the intended way (either/or not both).

Initial models had 'destination' (path) as mandatory, with this change
we can reintroduce that to ensure this proper configurations.

The documentation in both YANG model and markdown has been updated,
significantly, to provide lots of examples.

Please note, glob style mounts have not been tested, at all.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-02-25 19:49:27 +01:00
Joachim Wiberg 61cba2615f confd: make container privileged mode configurable
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-02-25 19:49:27 +01:00
Joachim Wiberg ed86a29bfc doc: initial container documentation
Brief overview of configuration support.  Need to add admin-exec level
commands, but since operational and actions still are missing, we keep
it out until after the code review.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-02-25 19:49:27 +01:00
Joachim Wiberg 3807d0bcbc doc: How to Customize Services in Hybrid Mode
[skip ci]

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-11-08 17:21:00 +01:00
Joachim Wiberg c927578731 doc: fix nested HERE document for easy copy-paste to terminal
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-11-05 23:57:26 +01:00
Jon-Olov VatnandJoachim Wiberg d34908a0e5 Fixing broken urls in document docs 2023-08-22 13:41:09 +02:00
Joachim WibergandTobias Waldekranz bc048f6313 Drop Hybrid Mode from default builds, update documentation
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-08-22 10:38:02 +02:00
Joachim Wiberg 6d536e1b3f Further clarify how to use containers in Infix
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-06-28 08:57:42 +02:00
Joachim Wiberg 15843f4325 doc/container.md: add Real Example and update Hybrid Mode
Add a real example where we create a writable layer for container based
on a simple image.

To be able to properly start/stop and monitor containers using Finit, we
need to add the options `--systemd=false` and `--conmon-pidfile=...`.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-06-27 11:55:40 +02:00
Joachim Wiberg a8f14b949c doc/container.md: use correct interface in cni host interface
We usually put the vethNb interfaces in the bridge and the vethNa end in
the appliance/container.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-06-25 22:47:06 +02:00
Joachim Wiberg 01455a08f8 doc/container.md: use unused host port 222 for container port 22
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-06-25 13:05:54 +02:00
Joachim Wiberg cc1845d62b doc/container.md: add section on debugging
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-06-25 12:53:37 +02:00
Joachim Wiberg 43c68de6f1 doc/container.md: update Multiple Networks and Hybrid Mode example
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-06-25 12:06:45 +02:00
Joachim Wiberg 593a0626d1 doc: always lead with an example, put caveats last
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-06-24 18:42:42 +02:00
Joachim WibergandTobias Waldekranz d8b24e16de doc: new document, Containers in Infix (with podman & CNI)
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-05-21 20:39:12 +02:00