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

[BUG] Change container "on-restart" action #1399

Closed
ipspace opened this issue Oct 19, 2024 · 2 comments · Fixed by #1438
Closed

[BUG] Change container "on-restart" action #1399

ipspace opened this issue Oct 19, 2024 · 2 comments · Fixed by #1438
Labels
backburner bug Something isn't working

Comments

@ipspace
Copy link
Owner

ipspace commented Oct 19, 2024

Recent containerlab versions start Linux containers with on-failure restart policy. Docker understands that as "restart after a server crash", restarting FRRouting (or IOSv) containers with no usable connectivity (because containerlab uses handcrafted vEth pairs).

The only sane way to fix this is to change the on-failure restart policy. The next containerlab version will include a configurable option (see srl-labs/containerlab#2238) but I don't want to force everyone to upgrade containerlab together with netlab (although we are testing containerlab version during virtualization provider probes, so we could enforce that).

Another option would be to execute docker commands to change the policy in the clab post_start_lab hook, making this fix containerlab-version independent.

Any thoughts @hellt @jbemmel @DanPartelly @ssasso?

@ipspace ipspace added the bug Something isn't working label Oct 19, 2024
@hellt
Copy link
Collaborator

hellt commented Oct 19, 2024

We are changing the per-stage exec in #2241, so the workaround with post_start_lab hook won't last long.

I would enforce an upgrade, given that it is easy to upgrade containerlab

@ipspace
Copy link
Owner Author

ipspace commented Oct 20, 2024

Waiting for a new containerlab release

ipspace added a commit that referenced this issue Oct 26, 2024
Containerlab sets the Docker restart policy of Linux-based containers
to 'on-failure' which restarts all lab nodes with kind=linux (FRR, IOSv)
after a server reboot without the necessary connectivity (veth pairs)

The containerlab 0.59.0 release added 'restart-policy' keyword. That
keyword is now part of configurable 'clab' parameters and is set by
default to 'no' on Linux containers.

Template fixes include indentation cleanup; documentation fixes
include URLs to various clab parameters

Fixes #1399
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backburner bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants