fix: service no longer stalling
CPUShares and MemoryLimit are depricated Sep 05 20:30:42 marvin systemd[1]: /etc/systemd/system/splunk.service:9: Unit uses CPUShares=; please use CPUWeight= instead. Support for CPUShares= will be removed soon. Sep 05 20:30:42 marvin systemd[1]: /etc/systemd/system/splunk.service:18: Unit uses MemoryLimit=; please use MemoryMax= instead. Support for MemoryLimit= will be removed soon.
This commit is contained in:
parent
b742a09c43
commit
f47e95c61d
1 changed files with 22 additions and 12 deletions
|
@ -45,7 +45,7 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
# might not be required
|
# might not be required
|
||||||
# networking.firewall.allowedTCPPorts = [8089];
|
networking.firewall.allowedTCPPorts = [8089];
|
||||||
|
|
||||||
# set up the core files
|
# set up the core files
|
||||||
systemd.services."${name}_prestart" = {
|
systemd.services."${name}_prestart" = {
|
||||||
|
@ -137,21 +137,31 @@ in {
|
||||||
];
|
];
|
||||||
path = with pkgs; [util-linux toybox];
|
path = with pkgs; [util-linux toybox];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "oneshot";
|
Type = "simple";
|
||||||
User = cfg.user.user;
|
Restart="always";
|
||||||
Group = cfg.user.group;
|
|
||||||
TimeoutSec = "infinity";
|
|
||||||
Restart = "on-failure";
|
|
||||||
# WorkingDirectory = "${cfg.package}/share/gitlab";
|
|
||||||
# Slice = "system-gitlab.slice";
|
|
||||||
RemainAfterExit = true;
|
|
||||||
|
|
||||||
Environment = "SPLUNK_HOME=${cfg.user.home}";
|
Environment = "SPLUNK_HOME=${cfg.user.home}";
|
||||||
ExecStart = "${package}/bin/splunk _internal_launch_under_systemd";
|
ExecStart = "${package}/bin/splunk _internal_launch_under_systemd";
|
||||||
|
KillMode="mixed";
|
||||||
# no so sure about these
|
KillSignal="SIGINT";
|
||||||
|
TimeoutStopSec=360;
|
||||||
|
LimitNOFILE=65536;
|
||||||
|
LimitRTPRIO=99;
|
||||||
|
SuccessExitStatus="51 52";
|
||||||
|
RestartPreventExitStatus=51;
|
||||||
|
RestartForceExitStatus=52;
|
||||||
|
User = cfg.user.user;
|
||||||
|
Group = cfg.user.group;
|
||||||
NoNewPrivileges = "yes";
|
NoNewPrivileges = "yes";
|
||||||
AmbientCapabilities = "CAP_DAC_READ_SEARCH";
|
AmbientCapabilities = "CAP_DAC_READ_SEARCH";
|
||||||
|
|
||||||
|
# ExecStartPre=-/bin/bash -c "chown -R splunk:splunk /opt/splunkforwarder"
|
||||||
|
Delegate="true";
|
||||||
|
# CPUShares=1024;
|
||||||
|
# MemoryLimit=3973632000;
|
||||||
|
PermissionsStartOnly="true";
|
||||||
|
# ExecStartPost=-/bin/bash -c "chown -R splunk:splunk /sys/fs/cgroup/cpu/system.slice/%n"
|
||||||
|
# ExecStartPost=-/bin/bash -c "chown -R splunk:splunk /sys/fs/cgroup/memory/system.slice/%n"
|
||||||
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue