SDP-903

Domenic (Domenic)
Domenic created this job , modified by swarm-user
Closed
Broken / changed behavior in p4verify log name rotation.

In https://swarm.workshop.perforce.com/files/guest/perforce_software/sdp/dev/Server/Unix/p4/common/bin/p4verify.sh?v=43 at line 589 the OldLogTimestamp is set to "$(ls -l --time-style +'%Y%m%d-%H%M%S' "$Log" | awk '{print $6}')". However, this does not work on (at least) Red Hat and Rocky 8.7 as the "print $6" output is the file size. Instead, $7 is needed.

In the same file at line 590 the OldLog is set to "$LOGS/p4verify.${OldLogTimestamp}.log" but prior to this change the old log file was "${LogToRotate}.${Datestamp}". As an example (after locally addressing the issue above), the new format naming results in p4verify.2023-05-09_09-40-05.log whereas the old name was p4verify.log.2023-05-09_09-28-17 so the files no longer sort the same. I *think* it was an intentional change to retain the .log extension on files but don't see it called out on https://swarm.workshop.perforce.com/projects/perforce-software-sdp/jobs/SDP-829 unless it fell under "general log file handling"?

Additionally, the previous time format was '%Y-%m-%d_%H-%M-%S' but is now '%Y%m%d-%H%M%S' so there aren't as many spacers for readability.
29579Fixed issue with log rotation login on some platforms.

#review @Domenic
29578Fixed issue with log rotation login on some platforms.

#review-29579 @Domenic
  • Details
  • Comments -
Status
Closed
Project
perforce-software-sdp
Severity
C
Reported By
Domenic
Reported Date
Modified By
swarm-user
Modified Date
Owned By
Domenic
Component
core-unix
Type
Bug