Warn when a Volume::available fails instead of terminating#121
Open
bbx0 wants to merge 3 commits intoewxrjk:masterfrom
Open
Warn when a Volume::available fails instead of terminating#121bbx0 wants to merge 3 commits intoewxrjk:masterfrom
Volume::available fails instead of terminating#121bbx0 wants to merge 3 commits intoewxrjk:masterfrom
Conversation
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.
This is an attempt to fix #119
If I read the code correctly, all callers to
Host::invokecheck the returnedstatusbut do not catch an exception. With this PR no exception is raised, but a warning gets emitted when the status is not0and output is captured. WhenHost::invokeis called without capturingstdoutno exception was raised already, which makes both cases consistent.In consequence
/usr/bin/rsbackup --backupnow exits with0instead of139(SIGSEGV), when aVolume::availablecheck fails due to network or host issues (after theHost::availablewas initially successful). I believe this is consistent with the other warnings returning0.This may change behavior of rsbackup.cron as it now continues with the next host when there is an error instead of terminating. Since the result is mapped to
trueanyway, I think this is the correct way.Please let me know if anything missing, or you would like to receive the PR in a different format.