Skip to content

Warn when a Volume::available fails instead of terminating#121

Open
bbx0 wants to merge 3 commits intoewxrjk:masterfrom
bbx0:fix-119
Open

Warn when a Volume::available fails instead of terminating#121
bbx0 wants to merge 3 commits intoewxrjk:masterfrom
bbx0:fix-119

Conversation

@bbx0
Copy link
Copy Markdown

@bbx0 bbx0 commented Apr 22, 2025

This is an attempt to fix #119

If I read the code correctly, all callers to Host::invoke check the returned status but do not catch an exception. With this PR no exception is raised, but a warning gets emitted when the status is not 0 and output is captured. When Host::invoke is called without capturing stdout no exception was raised already, which makes both cases consistent.

In consequence /usr/bin/rsbackup --backup now exits with 0 instead of 139 (SIGSEGV), when a Volume::available check fails due to network or host issues (after the Host::available was initially successful). I believe this is consistent with the other warnings returning 0.

WARNING: 'uname' failed on other.host.invalid - ssh: Could not resolve hostname other.host.invalid: Name or service not known

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 true anyway, 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

terminate called after throwing an instance of 'SubprocessFailed'

1 participant