SVCPLAN-8877: Add logic to return codes in case of backup failures#16
Open
SVCPLAN-8877: Add logic to return codes in case of backup failures#16
Conversation
…ted logfile format
billglick
reviewed
Mar 4, 2026
Member
billglick
left a comment
There was a problem hiding this comment.
While your changes fix the issue with incorrect return codes, I still think we need to also figure out why the return codes are failing.
Author
|
I've been digging into it and unfortunately can't find a common factor across clusters yet. cc-adm01 is a bit odd since it sometimes works sometimes doesn't. I wonder if it is related to the recent instability issues. |
billglick
approved these changes
Mar 5, 2026
Member
billglick
left a comment
There was a problem hiding this comment.
This looks good.
I also could not figure out why it was sometimes failing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In cases where backup jobs terminate before completion (runtime error/timeout etc), the resultant files (/var/log/backup_last_run and /var/log/backup_check_last_run) do not report a job status code, which then lead to empty fields in $backup_return_code, $prune_return_code, and $return_code.
This change checks to see if the variables are empty (which implies a failed job run) and if they are, has it report an error code 1.
Consideration: maybe it should return a different error code to signal that the backup job script itself failed?
Script tested locally on cc-adm01.