From: Stefano Brivio <sbrivio@redhat.com>
To: Paul Holzinger <pholzing@redhat.com>
Cc: passt-dev@passt.top, David Gibson <david@gibson.dropbear.id.au>
Subject: Re: [PATCH v3] conf: Accept duplicate and conflicting options, the last one wins
Date: Fri, 21 Jun 2024 11:55:57 +0200 [thread overview]
Message-ID: <20240621115557.77bc013f@elisabeth> (raw)
In-Reply-To: <7fb9bd35-9249-4a32-b3d2-bba5f3da475d@redhat.com>
On Fri, 21 Jun 2024 11:52:40 +0200
Paul Holzinger <pholzing@redhat.com> wrote:
> On 20/06/2024 19:19, Stefano Brivio wrote:
> > In multiple occasions, especially when passt(1) and pasta(1) are used
> > in integrations such as the one with Podman, the ability to override
> > earlier options on the command line with later one would have been
> > convenient.
> >
> > Recently, to debug a number of issues happening with Podman, I would
> > have liked to ask users to share a debug log by passing --debug as
> > additional option, but pasta refuses --quiet (always passed by Podman)
> > and --debug at the same time.
> >
> > On top of this, Podman lets users specify other pasta options in its
> > containers.conf(5) file, as well as on the command line.
> >
> > The options from the configuration files are appended together with
> > the ones from the command line, which makes it impossible for users to
> > override options from the configuration file, if duplicated options
> > are refused, unless Podman takes care of sorting them, which is
> > clearly not sustainable.
> >
> > For --debug and --trace, somebody took care of this on Podman side at:
> > https://github.com/containers/common/pull/2052
> >
> > but this doesn't fix the issue with other options, and we'll have
> > anyway older versions of Podman around, too.
> >
> > I think there's some value in telling users about duplicated or
> > conflicting options, because that might reveal issues in integrations
> > or accidental misconfigurations, but by now I'm fairly convinced that
> > the downsides outweigh this.
> >
> > Drop checks about duplicate options and mutually exclusive ones. In
> > some cases, we need to also undo a couple of initialisations caused
> > by earlier options, but this looks like a simplification, overall.
> >
> > Notable exception: --stderr still conflicts with --log-file, because
> > users might have the expectation that they don't actually conflict.
> > But they do conflict in the existing implementation, so it's safer
> > to make sure that the users notice that.
> >
> > Suggested-by: Paul Holzinger <pholzing@redhat.com>
> > Suggested-by: David Gibson <david@gibson.dropbear.id.au>
> > Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
>
> Tested-by: Paul Holzinger <pholzing@redhat.com>
Thanks!
> > ---
> > v3:
> > - override --gateway and --dns-forward with the last given option
> > for a given address family, too
> assuming you mean --address here as --gateway already worked
...right, no idea why I wrote 'gateway'. :)
--
Stefano
prev parent reply other threads:[~2024-06-21 9:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-20 17:19 [PATCH v3] conf: Accept duplicate and conflicting options, the last one wins Stefano Brivio
2024-06-21 0:53 ` David Gibson
2024-06-21 9:52 ` Paul Holzinger
2024-06-21 9:55 ` Stefano Brivio [this message]
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=20240621115557.77bc013f@elisabeth \
--to=sbrivio@redhat.com \
--cc=david@gibson.dropbear.id.au \
--cc=passt-dev@passt.top \
--cc=pholzing@redhat.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.
Code repositories for project(s) associated with this public inbox
https://passt.top/passt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).