wrong ssh_command used for multiple configurations #323
Labels
No Label
bug
data loss
design finalized
good first issue
new feature area
question / support
security
waiting for response
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: borgmatic-collective/borgmatic#323
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What I'm trying to do and why
I have multiple configuration files inside /etc/borgmatic.d/ with different ssh_command configs for internal and external networks
Steps to reproduce (if a bug)
Create multiple config files with different ssh_command configs.
Actual behavior (if a bug)
Now it seems, that for some of my internal configs, which don't have any special ssh_command config, the wrong config us used. And then it fails cause on the used port is no ssh connection possible. This is not the case for every "internal" config. Perhaps it depends on the order the config are processed. So after the external config, which specifies the ssh_command with a different port, this ssh_comand will be used for every subsequent config file, even if there is no special ssh_command configured.
Include (sanitized)
--verbosity 2
output if applicable.Expected behavior (if a bug)
Use the standard ssh_command (ssh) if there is no special ssh_command configured. Even for multiple configuration files with different configurations.
Other notes / implementation ideas
If I specify the "default" ssh command also explicitly in the internal configuration, I didn't get the error any more.
Environment
borgmatic version: [1.5.5]
borgmatic installation method: [sudo pip3 install --user --upgrade borgmatic]
Borg version: [borg 1.1.11]
Python version: [Python 3.5.3]
operating system and version: [Debian 9]
Thank you so much for the detailed ticket and bug description. I think I know exactly what's going on here: The
ssh_command
option is passed to Borg via an environment variable. And while that environment variable is set separately based on the value in each configuration file, it isn't ever removed if thessh_command
option isn't present in a configuration file. And so the environment variable from the previous configuration file is still in effect.So the fix is to make sure environment variables get reset between borgmatic configuration files / Borg invocation.
Okay, this is fixed! It'll be released soon, and I'll note here when that happens.
Okay, this is released in borgmatic 1.5.6. Please let me know if you have any other issues!
Hi, thanks for the very fast fix.