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

Adding ip/route to a container network does not take effect until after reboot #375

Closed
troglobit opened this issue Apr 2, 2024 · 1 comment · Fixed by #371
Closed

Adding ip/route to a container network does not take effect until after reboot #375

troglobit opened this issue Apr 2, 2024 · 1 comment · Fixed by #371
Assignees
Labels
bug Something isn't working
Milestone

Comments

@troglobit
Copy link
Contributor

troglobit commented Apr 2, 2024

Related to issue #366, adding address and/or route to a container network does not take effect after reboot, or manual stop/start of the container.

To reproduce:

  1. Create container
  2. Create a VETH pair with one end, e.g. veth1a, as a container-network
  3. Add network interface veth1a to container

Leave and save configuration. The container now runs with renamed veth1a interface inside the container.

  1. Edit container interface veth1a
  2. Add a static IP address, e.g., 192.168.1.100/24
  3. Add a static route to container-network, e.g., 0.0.0.0 via 192.168.1.1

Leave and save configuration. The container still has no IP address or route set.

@troglobit troglobit added this to the Infix v24.03 milestone Apr 2, 2024
@troglobit troglobit self-assigned this Apr 2, 2024
@troglobit troglobit added the bug Something isn't working label Apr 2, 2024
@troglobit troglobit moved this to In progress in Infix & C:o Apr 2, 2024
@troglobit
Copy link
Contributor Author

Turns out to have been caused by multiple cooperating bugs:

  1. Infix's confd did not "touch" the container (template) matching the modified container network
  2. Finit's initctl touch does not support template services troglobit/finit#403
  3. When restarting the container service, the k8s-logger first failed to restart, and thus blocking the container restart. With that fixed using poll(), it was then busy-looping in poll() on a stale fifo, fixes in https://github.com/kernelkit/k8s-logger/releases/tag/v1.3

@troglobit troglobit linked a pull request Apr 3, 2024 that will close this issue
13 tasks
troglobit added a commit that referenced this issue Apr 3, 2024
Patches in queue for upcoming v4.8 release of Finit fixes:

 - initctl touch does not respect -n flag, returning error
 - initctl touch does not support template services

Related to issue #375

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
troglobit added a commit that referenced this issue Apr 3, 2024
Fixes issues with logger not exiting gracefully on signals (at all)
and busy-looping on stale FIFO.

Related to issue #375

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
troglobit added a commit that referenced this issue Apr 3, 2024
On any change to a container network interface we should schedule a
restart of the container to activate the changes.  This code triggers
also at boot, when applying the whole startup-config, which initctl
handles by queuing any create/touch events for services.

This patch depends on the two previous commtis backporing fixes to
Finit's initctl tool and an upgrade of the k8s-logger.

Fixes #375

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
troglobit added a commit that referenced this issue Apr 3, 2024
On any change to a container network interface we should schedule a
restart of the container to activate the changes.  This code triggers
also at boot, when applying the whole startup-config, which initctl
handles by queuing any create/touch events for services.

This patch depends on the two previous commtis backporing fixes to
Finit's initctl tool and an upgrade of the k8s-logger.

Fixes #375

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
troglobit added a commit that referenced this issue Apr 3, 2024
Patches in queue for upcoming v4.8 release of Finit fixes:

 - initctl touch does not respect -n flag, returning error
 - initctl touch does not support template services

Related to issue #375

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
troglobit added a commit that referenced this issue Apr 3, 2024
Fixes issues with logger not exiting gracefully on signals (at all)
and busy-looping on stale FIFO.

Related to issue #375

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
@github-project-automation github-project-automation bot moved this from In progress to Done in Infix & C:o Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant