Repository navigation
Conversation
|
/tofarev review |
ToFaRev review — completedReviewed 3b57a5982af4 · Session log · Workflow run
Detailed findings:P3 - Netns symlink cleanup added to
|
Review — completedReviewed 3b57a5982af4 The fix is correct for the case it targets. Finding 1 is the only change I'd make before merge. Findings 2-6 were already there before this PR and can be handled as follow-ups.
Detailed findings:1. P3 - Netns symlink is removed even when the container delete failedLocation: core/destroy.go:725-730 Problem: When Trigger: Impact: The container may still be running, but its Suggested correction: if err := rt.DeleteContainer(ctx, name); err != nil {
log.Errorf("could not remove container %q: %v", name, err)
continue
}
_ = clabutils.DeleteNetnsSymlink(name)2. P2 - Parking namespaces leak on destroyLocation: nodes/default_node.go:1169 Problem: Trigger: Run Impact: The namespace and its interfaces outlive the lab. The name is deterministic, so a later lab with the same name reuses it through Suggested correction: Remove the parking namespace on both destroy paths. The Robot test could then add a 3. P2 - Failed container deletes are reported as successLocation: core/destroy.go:725-728 Problem: Trigger: Impact: The command can exit 0 and delete the lab directory of a container that is still running. That breaks the rule documented at core/destroy.go:80. Suggested correction: Return the delete errors from 4. P3 - Distributed SR-SIM logical symlink is left behindLocation: nodes/sros/netns.go:151 Problem: After a stop or start, a distributed node has a logical Trigger: Stop or start a distributed Impact: The component symlinks are removed, but Suggested correction: Also delete the symlink named by the 5. P3 - Tool containers keep their symlinksLocation: core/destroy.go:777 Problem: Trigger: Attach a tool to a lab, then run Impact: Stale symlinks remain in Suggested correction: The runtimes create the symlink in their post-start actions, so removing it in 6. P3 - Symlinks survive when no containers remainLocation: core/destroy.go:419 Problem: Symlink cleanup depends on a container still being listed, and destroy returns early when none are found. Trigger: The containers were removed with Impact: The dangling Suggested correction: Low priority. It would need cleanup that finds entries by lab name rather than by container. review conditionsSource inspection only; the PR code and tests were not executed.
|
9c5a158 to
0b29d0f
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3524 +/- ##
==========================================
+ Coverage 61.81% 62.19% +0.38%
==========================================
Files 299 315 +16
Lines 36726 40295 +3569
==========================================
+ Hits 22701 25063 +2362
- Misses 11727 12792 +1065
- Partials 2298 2440 +142
🚀 New features to boost your workflow:
|
|
/tofarev review |
ToFaRev review — completedReviewed 0b29d0fb597b · Session log · Workflow run
Detailed findings:P4 -
|
|
This is in "ugly hack" territory. I will get back with a better fix over the weekend. |
|
@torbbang I think you can ignore the p4 |
Destroying a lab whose topology file is gone (#3038) leaves its /run/netns symlinks behind. This PR enables them to be removed them along with the containers.