netns-isolation: fix routing issues due to netns restarting
Previously, restarting a service implied restarting its netns. For unknown reasons, this sometimes caused the netns-local address to not be routable from the root netns for up to 20 s. I.e., the service was sometimes unreachable after restarting. Now the netns is no longer stopped when the service is stopped.
This commit is contained in:
parent
7f77147b60
commit
cb6e5ef702
|
@ -164,9 +164,8 @@ in {
|
|||
"netns-${n}" = rec {
|
||||
requires = [ "nb-netns-bridge.service" ];
|
||||
after = [ "nb-netns-bridge.service" ];
|
||||
bindsTo = [ "${n}.service" ];
|
||||
requiredBy = bindsTo;
|
||||
before = bindsTo;
|
||||
requiredBy = [ "${n}.service" ];
|
||||
before = requiredBy;
|
||||
script = ''
|
||||
${ip} netns add ${netnsName}
|
||||
${ipNetns} link set lo up
|
||||
|
|
Loading…
Reference in New Issue
Block a user