Skip to content

Fix veth removal regression#1548

Merged
mattiaswal merged 3 commits into
mainfrom
veth-regression
Jun 26, 2026
Merged

Fix veth removal regression#1548
mattiaswal merged 3 commits into
mainfrom
veth-regression

Conversation

@troglobit

Copy link
Copy Markdown
Contributor

Description

Fix regression in removing veth pairs introduced in this release cycle by PR #1544 which fixed #941.

Checklist

Tick relevant boxes, this PR is-a or has-a:

  • Bugfix
    • Regression tests
    • ChangeLog updates (for next release)
  • Feature
    • YANG model change => revision updated?
    • Regression tests added?
    • ChangeLog updates (for next release)
    • Documentation added?
  • Test changes
    • Checked in changed Readme.adoc (make test-spec)
    • Added new test to group Readme.adoc and yaml file
  • Code style update (formatting, renaming)
  • Refactoring (please detail in commit messages)
  • Build related changes
  • Documentation content changes
    • ChangeLog updated (for major changes)
  • Other (please describe):

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
When a veth pair has one end in a container and the other in the host
namespace, removing it failed: the container end's teardown deleted the
whole pair, so the host end's own delete then failed ("Cannot find
device") and aborted the teardown, leaving the interface behind.

The host-namespace delete added for the both-ends-in-container case was
emitted for every container veth end.  Restrict it to the primary end,
which for a host/container pair is the host end that already deletes the
pair itself.

Extend the container veth tests to remove the pair and verify it is gone,
covering both the single-end (regression) and both-ends teardown paths.

Fixes: #1546

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
@troglobit troglobit added the ci:main Build default defconfig, not minimal label Jun 26, 2026
@troglobit troglobit requested a review from mattiaswal June 26, 2026 14:11
@troglobit troglobit linked an issue Jun 26, 2026 that may be closed by this pull request
@mattiaswal mattiaswal merged commit 6d6064f into main Jun 26, 2026
15 of 16 checks passed
@mattiaswal mattiaswal deleted the veth-regression branch June 26, 2026 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:main Build default defconfig, not minimal

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Teardown VETH interfaces does not work when one end is in container Both sides of a VETH pair can not be assigned to containers

2 participants