Merge pull request #53033 from netixx/openvswitch-improved-systemd
openvswitch: better integration with systemd
This commit is contained in:
@@ -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}'';
|
||||
|
||||
|
||||
@@ -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 ];
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user