aboutgitcodebugslistschat
path: root/tap.c
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2024-06-18 18:04:49 +0200
committerStefano Brivio <sbrivio@redhat.com>2024-06-21 15:31:46 +0200
commit65923ba79877c412870c37f6d55d6bb6d1d941e8 (patch)
tree34fd84e841430f825235631761944029e9f352f3 /tap.c
parent62de6140d949795ff2595f0652b9c37929a3ce2f (diff)
downloadpasst-65923ba79877c412870c37f6d55d6bb6d1d941e8.tar
passt-65923ba79877c412870c37f6d55d6bb6d1d941e8.tar.gz
passt-65923ba79877c412870c37f6d55d6bb6d1d941e8.tar.bz2
passt-65923ba79877c412870c37f6d55d6bb6d1d941e8.tar.lz
passt-65923ba79877c412870c37f6d55d6bb6d1d941e8.tar.xz
passt-65923ba79877c412870c37f6d55d6bb6d1d941e8.tar.zst
passt-65923ba79877c412870c37f6d55d6bb6d1d941e8.zip
conf: Accept duplicate and conflicting options, the last one wins
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> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Tested-by: Paul Holzinger <pholzing@redhat.com>
Diffstat (limited to 'tap.c')
0 files changed, 0 insertions, 0 deletions