netns: fix error when stopping netns
A short time after `netns delete` finishes, the peer link in the main netns is automatically removed. When `link del` is run before that, it fails with `Cannot find device "nb-veth-br-*"` and the netns service enters a failed state.
This commit is contained in:
parent
4ff88efc50
commit
67068afd6b
@ -175,7 +175,6 @@ in {
|
||||
'') v.availableNetns;
|
||||
preStop = ''
|
||||
${ip} netns delete ${netnsName}
|
||||
${ip} link del ${peer}
|
||||
'';
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
|
Loading…
Reference in New Issue
Block a user