p4d_N.service.t #3

  • //
  • guest/
  • perforce_software/
  • sdp/
  • dev/
  • Server/
  • Unix/
  • p4/
  • common/
  • etc/
  • systemd/
  • system/
  • p4d_N.service.t
  • View
  • Commits
  • Open Download .zip Download (487 B)
[Unit]
Description=Helix Core Server Instance __INSTANCE__.
Documentation=https://swarm.workshop.perforce.com/projects/perforce-software-sdp/view/main/doc/SDP_Guide.Unix.pdf
Requires=network.target
After=network.target

[Service]
Type=simple
AmbientCapabilities=CAP_SYS_RESOURCE
ExecStart=/p4/__INSTANCE__/bin/p4d___INSTANCE___init start
ExecStop=/p4/__INSTANCE__/bin/p4d___INSTANCE___init stop
Environment=OS_INIT_MECHANISM=systemd
User=__OSUSER__

[Install]
WantedBy=multi-user.target
# Change User Description Committed
#3 30586 C. Thomas Tyler Added AmbientCapabilities=CAP_SYS_RESOURCE to p4d's systemd unit file.

Per: SDP-1142 (Bug): Enable CAP_SYS_RESOURCE capability using systemd rather than setcap.

#review-30587
#2 27201 C. Thomas Tyler Removed PIDFile= directory in systemd, as it actually introduces an
issue. We randomly get an error like:

p4d_1.service: Supervising process 16545 which is not our child. We'll most likely not notice when it exits.

The PIDFile directive was added for informational purposes, and is
not needed for processing. Even without it, the Main PID is accurate.
#1 27148 C. Thomas Tyler Added templates for systemd unit files.