public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Christian Ebner <c.ebner@proxmox.com>
To: Friedrich Weber <f.weber@proxmox.com>,
	Gabriel Goller <g.goller@proxmox.com>,
	pbs-devel@lists.proxmox.com
Subject: Re: [pbs-devel] [PATCH proxmox-backup v2] client: mount: flush output before exiting
Date: Tue, 18 Jun 2024 14:42:06 +0200	[thread overview]
Message-ID: <f9f52173-005e-443c-a054-e54c1b9d142e@proxmox.com> (raw)
In-Reply-To: <cf2b2e74-7546-4a46-9f31-becf2c856c85@proxmox.com>

On 6/18/24 14:32, Friedrich Weber wrote:
> Hi Chris,
> 
> On 18/06/2024 13:41, Christian Ebner wrote:
>> On 6/18/24 13:20, Friedrich Weber wrote:
>>> Thanks for tackling this! I ran into this issue (sometimes missing error
>>> output) when I was running `sudo proxmox-backup-client mount [...]` and
>>> forgot that PBS_REPOSITORY was not passed through by sudo. It looks like
>>> in this case, the patch doesn't completely fix this issue -- seems like
>>> I'm still missing the error output sometimes:
>>>
>>> $ sudo ./proxmox-backup-client mount \
>>>           "$SNAPSHOT" $FILE $PATH \
>>>           --keyfile $KEYFILE --ns $NS
>>> $ sudo ./proxmox-backup-client mount \
>>>           "$SNAPSHOT" $FILE $PATH \
>>>           --keyfile $KEYFILE --ns $NS
>>> $ sudo ./proxmox-backup-client mount \
>>>           "$SNAPSHOT" $FILE $PATH \
>>>           --keyfile $KEYFILE --ns $NS
>>> Error: unable to get (default) repository
>>
>> Hi Friedrich,
>> I just double checked by invoking the command in a for loop 10 times,
>> for all of which I do get the error message as output.
>>
>> ```bash
>> for i in $(seq 0 9)
>> do
>>      sudo proxmox-backup-client mount ct/100/2024-06-13T10:38:54Z
>> root.pxar /mnt
>> done
>> ```
>>
>> Interestingly, I do also get the output without the patch applied, so
>> therefore I did not notice (and obviously forgot to do the negative test
>> during review).
>>
>> Maybe some difference in setup?
> 
> Thanks for double-checking! That's quite weird. Could it be related to
> sudo's `use_pty` setting?

Indeed, I did not have this in my `/etc/sudoers`. Adding it and running 
the for loop again gave me no output at all!

> 
> With `Defaults use_pty` in /etc/sudoers (the default for me) ...
> 
> $ for i in $(seq 10); do sudo ./proxmox-backup-client mount foo bar baz;
> done
> 
> ... gives me only 2-5 lines of output.
> 
> If I comment out the `Defaults use_pty` line in /etc/sudoers, I get 10 > lines of output consistently.

Cheers,
Chris



_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel

  reply	other threads:[~2024-06-18 12:42 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-14  9:39 Gabriel Goller
2024-06-14  9:54 ` Christian Ebner
2024-06-18 11:20 ` Friedrich Weber
2024-06-18 11:41   ` Christian Ebner
2024-06-18 12:29     ` Gabriel Goller
2024-06-18 13:00       ` Christian Ebner
2024-06-18 13:10         ` Gabriel Goller
2024-06-18 12:32     ` Friedrich Weber
2024-06-18 12:42       ` Christian Ebner [this message]
2024-06-18 12:53       ` Gabriel Goller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f9f52173-005e-443c-a054-e54c1b9d142e@proxmox.com \
    --to=c.ebner@proxmox.com \
    --cc=f.weber@proxmox.com \
    --cc=g.goller@proxmox.com \
    --cc=pbs-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal