git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #48640 from gnidorah/kvmgt

kvmgt module: add restart on failure

commite37892744f4ee0b938400b691b7de671042fd391 authorJörg Thalheim <Mic92@users.noreply.github.com> dateFri 19 Oct 2018, 10:45 (8 years ago) parent4a36eeba6603fd
1 file changed+7−1
nixos/modules/virtualisation/kvmgt.nix+7−1
nixos/modules/virtualisation/kvmgt.nix+7−1
@@ -50,11 +50,17 @@ in {
5050 nameValuePair "kvmgt-${name}" {
5151 description = "KVMGT VGPU ${name}";
5252 serviceConfig = {
53− Type = "oneshot";
53+ Type = "forking";
5454 RemainAfterExit = true;
55+ Restart = "on-failure";
56+ RestartSec = 5;
5557 ExecStart = "${pkgs.runtimeShell} -c 'echo ${value.uuid} > /sys/bus/pci/devices/${cfg.device}/mdev_supported_types/${name}/create'";
5658 ExecStop = "${pkgs.runtimeShell} -c 'echo 1 > /sys/bus/pci/devices/${cfg.device}/${value.uuid}/remove'";
5759 };
60+ unitConfig = {
61+ StartLimitBurst = 5;
62+ StartLimitIntervalSec = 30;
63+ };
5864 wantedBy = [ "multi-user.target" ];
5965 }
6066 ) cfg.vgpus;