SDP-431

tom_tyler (C. Thomas Tyler)
C. Thomas Tyler created this job , modified by C. Thomas Tyler
Closed
Make p4d startup resistant to timing issues for reboots & fast
restarts.

On some systems, when called during the boot process, the p4d init
script will fail due to lack of certain resources being available,
e.g. the /hxdepots volume, where they might be a few seconds later.

Other times, a quick restart will fail because the numeric port is not
yet available immediately after a stop.

This job endeavors to address the all such startup issues where the
failure is not due to anything critical, but just some kind of timing
issue.

This might be addressed with a simple 'sleep' on start, or perhaps by
getting more sophisticated with systemd features (per SDP-58).
26396Added delay on start, to workaround common issues where
a fast cycle of p4d process fails because the TCP port
(e.g. 1666) is still in use briefly after a clean shutdown,
a system resource isn't available immediately on boot, or
similar timing issue.

The delay on start is skipped if P4ROOT is empty (tested for
by checking for existence of db.comain).

Added optional new SDP_START_DELAY setting in the p4_vars file
(generated from p4_vars.template) to configure the delay.

Files in this changelist now pass shellcheck (v0.61) (driving
various minor non-functional edits).
26398Added delay on start, to workaround common issues where
a fast cycle of p4d process fails because the TCP port
(e.g. 1666) is still in use briefly after a clean shutdown,
a system resource isn't available immediately on boot, or
similar timing issue.

The delay on start is skipped if P4ROOT is empty (tested for
by checking for existence of db.comain).

Added optional new SDP_START_DELAY setting in the p4_vars file
(generated from p4_vars.template) to configure the delay.

Files in this changelist now pass shellcheck (v0.61) (driving
various minor non-functional edits).
  • Details
  • Comments -
Status
Closed
Project
perforce-software-sdp
Severity
C
Reported By
C. Thomas Tyler
Reported Date
Modified By
C. Thomas Tyler
Modified Date
Owned By
tom_tyler
Component
core-unix
Type
Feature