Merge pull request #53033 from netixx/openvswitch-improved-systemd

openvswitch: better integration with systemd
This commit is contained in:
Jörg Thalheim
2020-02-21 08:24:49 +00:00
committed by GitHub
6 changed files with 151 additions and 34 deletions
+1 -1
View File
@@ -219,7 +219,7 @@ in {
wantedBy = [ "multi-user.target" ];
requires = [ "libvirtd-config.service" ];
after = [ "systemd-udev-settle.service" "libvirtd-config.service" ]
++ optional vswitch.enable "vswitchd.service";
++ optional vswitch.enable "ovs-vswitchd.service";
environment.LIBVIRTD_ARGS = ''--config "${configFile}" ${concatStringsSep " " cfg.extraOptions}'';
+6 -1
View File
@@ -124,7 +124,7 @@ in {
'';
};
systemd.services.vswitchd = {
systemd.services.ovs-vswitchd = {
description = "Open_vSwitch Daemon";
wantedBy = [ "multi-user.target" ];
bindsTo = [ "ovsdb.service" ];
@@ -139,6 +139,8 @@ in {
PIDFile = "/run/openvswitch/ovs-vswitchd.pid";
# Use service type 'forking' to correctly determine when vswitchd is ready.
Type = "forking";
Restart = "always";
RestartSec = 3;
};
};
@@ -182,4 +184,7 @@ in {
'';
};
})]));
meta.maintainers = with maintainers; [ netixx ];
}