SDP-574

roadkills_r_us
Closed
daily_checkpoint.sh hangs if journalPrefix is wrong.

Detail: The truncate_journal() in backup_functions.sh hangs if
journalPrefix is misconfigured.

There is a logic block in truncate_journal that is intended to wait
for a 'p4 -p $P4MASTERPORT admin journal' to fully complete processing
before the function returns. It does so by waiting for the numbered
journal file to appear in the checkpoints folder.  This works as
intended when the journalPrefix is correct.

However, if the journalPrefix is wrong, the wait loop still occurs,
causing a hang waiting forever for a journal file that is never going
to appear.
Status
Closed
Project
perforce-software-sdp
Severity
A
Reported By
roadkills_r_us
Reported Date
Modified By
swarm-user
Modified Date
Owned By
tom_tyler
Dev Notes
2021/01/12 ttyler:
Updated job title line and description based on a new understanding of
the problem.

2020/12/15 ttyler:
An obvious fix should be to make the 'wait' loop occur only if the
journal rotation returns a happy zero exit code.

Digging deeper: Research to confirm that we really need the wait loop
at all. Is the 'p4 admin journal' just to request a journal rotation
be started, or does the return of the command guarantee that the
rotated journal file has landed in the checkpoints folder.
Component
core-unix
Type
Bug