Commit 5968e2e
committed
smoke: allow external debugging of network namespaces
Since recently, the smoke tests are executed in a "grout" netns which is
reused across test runs.
Smoke tests do create additional namespaces to act as routers connected
to grout.
The issue is that creating "nested" network namespaces with iproute2 is
not possible. The file created in /run/netns has a reference which is
unusable outside of the process that has created it.
~# ip netns
Error: Peer netns reference is invalid.
Error: Peer netns reference is invalid.
grout
ns-a
ns-b
~# ip netns exec ns-b ip link show
setting the network namespace "ns-b" failed: Invalid argument
The only way to have namespaces which are visible/accessible from
everywhere is to create them from the base namespace (the netns of PID
1).
Fixes: 4853d4d ("smoke: make private netns work for single tests")
Fixes: 4d5fa1c ("main,smoke: run in private netns")
Signed-off-by: Robin Jarry <rjarry@redhat.com>
Reviewed-by: Maxime Leroy <maxime@leroys.fr>1 parent dbd902f commit 5968e2e
2 files changed
Lines changed: 6 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
115 | | - | |
| 115 | + | |
116 | 116 | | |
117 | | - | |
118 | | - | |
| 117 | + | |
| 118 | + | |
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
266 | 266 | | |
267 | 267 | | |
268 | 268 | | |
269 | | - | |
| 269 | + | |
270 | 270 | | |
271 | 271 | | |
272 | 272 | | |
273 | 273 | | |
274 | 274 | | |
275 | | - | |
276 | | - | |
| 275 | + | |
| 276 | + | |
277 | 277 | | |
278 | 278 | | |
279 | 279 | | |
| |||
0 commit comments