SDP-446

amo (Adam Morriss)
Adam Morriss created this job , modified by C. Thomas Tyler
Closed
wrong variables used in recreate_offline_db_files

When calling 'recreate_offline_db_files' as part of the daily backup for an Edge Server on Linux, the wrong variables are used. The function contains the following:

   if [[ "$SERVERID" == "$P4MASTER_ID" ]]; then

      if [[ -z "$(find "${CHECKPOINTS}/" -maxdepth 1 -type f -name "${P4SERVER}.ckp.*.gz" -printf 1 -quit)" ]]; then

         ckp_complete

         die "No checkpoints found in $CHECKPOINTS.  Consider running 'live_checkpoint.sh $SDP_INSTANCE'."

      fi

   fi

The "@{CHECKPOINTS} should be replaced with "${CheckpointsDir}" and "${P4SERVER}" with "${FilePrefix}". On an edge server, the checkpoint directory is different to that for a commit server. The value of CheckpointDir and FilePrefix are set based on if it’s an edge server or not just prior to the problematic code noted above. The 'mkdirs' configuration file determines the setting of 'MASTER_ID', setting it to the server.id of an edge server.

Reporting on behalf of a customer.
26454Patch to fix issue with refresh_P4ROOT_from_offline_db.sh behavior
on replicas.

Adjusted behavior for other scripts to ensure proper behaivor when run on
replicas vs. edge servers vs. the master server.
26336Update logic in backup_functions.sh to take into account checkpoint directory paths for various types of Helix servers.


Currently the daily_checkpoint.sh script fails to run on the edge servers because it looks in the wrong folder for checkpoints. It's looking in the ${CHECKPOINTS} folder instead of ${CheckpointsDir}. Also update the file prefix var for the checkpoint file name.

#review
26456Patch to fix issue with refresh_P4ROOT_from_offline_db.sh behavior
on replicas.

Adjusted behavior for other scripts to ensure proper behaivor when run on
replicas vs. edge servers vs. the master server.

Approving patch for testing.
26440Patch to fix issue with refresh_P4ROOT_from_offline_db.sh behavior
on replicas.

Adjusted behavior for other scripts to ensure proper behaivor when run on
replicas vs. edge servers vs. the master server.

#review-26454
  • Details
  • Comments -
Status
Closed
Project
perforce-software-sdp
Severity
A
Reported By
Adam Morriss
Reported Date
Modified By
C. Thomas Tyler
Modified Date
Owned By
amo
Component
core-unix
Type
Bug