-
-
Notifications
You must be signed in to change notification settings - Fork 757
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
remote repository exceptions give classic (not modern) result codes #8631
Comments
Please show an example of exporting variables. |
@infectormp Thanks for your answer.
And here is the complete manual test. First local and then with repositories located at hetzner, borgbase and rsync.net
As you can see, as soon as I use an empty uninitialized folder on a remote location I'll get rc 2. In contrast on the local path I'll get rc 15, which is what I would expect. |
It's happens because variables were set for local environment. To get modern rc codes from remotely executed borg you need to set variables on remote location. |
Then why do I get rc 13 for the remote repository?
|
@infectormp To double check this, I've created a virtual machine as borg server. First with
and then with
In both cases the behavior is exactly the same:
|
@infectormp As I'm not familiar with Python, I might be wrong, but I think I've found the code which causes this behavior. What I understand is that certain remote errors have an exemption from the error handler on the server side. Those errors are passed to the client and the modern error code is than reconstructed on the client side. There the modern error code is than used. Line 253 in 8b7cce3
I think the if call has to look like this, to bring up the correct error code on the client:
What do you think? |
We'd better ask @ThomasWaldmann |
Guess it is a problem with the RPC layer, how it transports exceptions from remote to local. |
Have you checked borgbackup docs, FAQ, and open GitHub issues?
Yes
Is this a BUG / ISSUE report or a QUESTION?
ISSUE
System information. For client/server mode post info for both machines.
Your borg version (borg -V).
1.4.0 on server and client
Operating system (distribution) and version.
Client:
Distributor ID: Debian
Description: Debian GNU/Linux 12 (bookworm)
Release: 12
Codename: bookworm
Server: borgbase
Full borg commandline that lead to the problem (leave away excludes and passwords)
Describe the problem you're observing.
I'm writing some wrapper scripts for borg. I want to rely on the return codes of borg with the modern BORG_EXIT_CODES, to trigger the init of repo, if it doesn't exist.
I've exported the BORG_EXIT_CODES=modern variable.
But when I try to execute above command line, I'll get rc 2 instead of rc 15
Can you reproduce the problem? If so, describe how. If not, describe troubleshooting steps you took before opening the issue.
If I do the same with a local existing path without repository, I'll get rc 15
I've did the same test with a remote server at Hetzner.
I'll get rc 2, too.
When I try to create the repo on a directory which doesn't exist I'll get rc 13 on the remote Hetzner box. Which I would expect.
My assumption is, that the handling for invalid repository error code some how differs between local and remote repos
The text was updated successfully, but these errors were encountered: