netns: fail when netns already exists

Under normal circumstances, service-specific netns should never exist
before the netns setup service starts.
An existing netns is a genuine error that should not be silently ignored.
This commit is contained in:
Erik Arvstedt 2020-11-03 21:54:13 +01:00
parent dbad828851
commit 63a464431b
No known key found for this signature in database
GPG Key ID: 33312B944DD97846
1 changed files with 0 additions and 1 deletions

View File

@ -152,7 +152,6 @@ in {
requiredBy = bindsTo; requiredBy = bindsTo;
before = bindsTo; before = bindsTo;
script = '' script = ''
${ip} netns delete ${netnsName} 2> /dev/null || true
${ip} netns add ${netnsName} ${ip} netns add ${netnsName}
${ipNetns} link set lo up ${ipNetns} link set lo up
${ip} link add ${veth} type veth peer name ${peer} ${ip} link add ${veth} type veth peer name ${peer}