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:
Erik Arvstedt 2020-10-29 21:20:39 +01:00
parent 4ff88efc50
commit 67068afd6b
No known key found for this signature in database
GPG Key ID: 33312B944DD97846

View File

@ -175,7 +175,6 @@ in {
'') v.availableNetns;
preStop = ''
${ip} netns delete ${netnsName}
${ip} link del ${peer}
'';
serviceConfig = {
Type = "oneshot";