verbosity flag producing remote ssh output even at -1 level #552

Closed
opened 2022-06-26 20:01:11 +00:00 by xrisk · 2 comments
root@xxx:~# borgmatic --verbosity -1
Remote: Warning: Permanently added 'xxx,xxx' (ECDSA) to the list of known hosts.
Remote: Warning: Permanently added 'xxx,xxx' (ECDSA) to the list of known hosts.
Remote: /etc/profile.d/lang.sh: line 19: warning: setlocale: LC_CTYPE: cannot change locale (C.UTF-8)

Expected: remote warnings should not appear.

borg version: 1.2.1
borgmatic version: 1.6.4

FWIW: on a different host running borgmatic 1.5.22, I do not see these remote warnings. I assume this is a regression.

``` root@xxx:~# borgmatic --verbosity -1 Remote: Warning: Permanently added 'xxx,xxx' (ECDSA) to the list of known hosts. Remote: Warning: Permanently added 'xxx,xxx' (ECDSA) to the list of known hosts. Remote: /etc/profile.d/lang.sh: line 19: warning: setlocale: LC_CTYPE: cannot change locale (C.UTF-8) ``` Expected: remote warnings should not appear. borg version: 1.2.1 borgmatic version: 1.6.4 FWIW: on a different host running borgmatic 1.5.22, I do not see these remote warnings. I assume this is a regression.
Owner

Thanks for filing this! It's something that sounds totally plausible as a bug, because currently borgmatic does nothing to alter ssh's verbosity. I could imagine adding -o LogLevel=error to ssh_command whenever borgmatic's verbosity is -1 as a way to solve this.

However.. I can't seem to reproduce the problem locally! I'm using the same version of borgmatic as you with Borg 1.2.0, and when I set the following so as not to get an interactive prompt for an unknown host ...

storage:
    ssh_command: ssh -o StrictHostKeyChecking=no

... I do get the Remote: Warning: Permanently added ... message from ssh, but only at the borgmatic verbosity levels 1 and higher. At verbosity levels 0 and -1, the ssh warning is completely suppressed.

So can you tell me a little more about your setup? Do you have the ssh_command option or the BORG_RSH environment variable set? How are you running borgmatic when this behavior occurs? Interactively at the command-line or with cron/systemd? Any other configuration that might be relevant?

Thanks!

Thanks for filing this! It's something that sounds totally plausible as a bug, because currently borgmatic does nothing to alter ssh's verbosity. I could imagine adding `-o LogLevel=error` to `ssh_command` whenever borgmatic's verbosity is `-1` as a way to solve this. However.. I can't seem to reproduce the problem locally! I'm using the same version of borgmatic as you with Borg 1.2.0, and when I set the following so as not to get an interactive prompt for an unknown host ... ``` storage: ssh_command: ssh -o StrictHostKeyChecking=no ``` ... I *do* get the `Remote: Warning: Permanently added ...` message from ssh, but only at the borgmatic verbosity levels `1` and higher. At verbosity levels `0` and `-1`, the ssh warning is completely suppressed. So can you tell me a little more about your setup? Do you have the `ssh_command` option or the `BORG_RSH` environment variable set? How are you running borgmatic when this behavior occurs? Interactively at the command-line or with cron/systemd? Any other configuration that might be relevant? Thanks!
Owner

Closing now due to inactivity / lack of repro, but I'd be happy to reopen if you've got more details. Thanks!

Closing now due to inactivity / lack of repro, but I'd be happy to reopen if you've got more details. Thanks!
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: borgmatic-collective/borgmatic#552
No description provided.