From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by passt.top (Postfix) with ESMTP id B5A2D5A004E for ; Wed, 19 Jun 2024 11:06:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1718788002; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4/4TaTAqykGgcP63blzk24Ky41IgntamK31mn+bgZxY=; b=Oswcw5IRGWqhvXdvtCRrHR/4Ta6cKYePSSPXcVJL1DFjo0PNjXoNRSEqoHx9by3tJEzyDx zzUBEOkcQhO7jJygKuT5vLrN6TEaPpi7CFK9W0JIITGMMv1rayScei6n/i/6ZyTLi9N85k L5rkV28N6yJh3W1CZDP9ZUI3tgvjB7o= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-298-AQG9Bm9kNOGCVla2rS2iLQ-1; Wed, 19 Jun 2024 05:06:41 -0400 X-MC-Unique: AQG9Bm9kNOGCVla2rS2iLQ-1 Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-35f271c5b17so2881283f8f.0 for ; Wed, 19 Jun 2024 02:06:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718788000; x=1719392800; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=4/4TaTAqykGgcP63blzk24Ky41IgntamK31mn+bgZxY=; b=RTZhqFoVeRegaxu+NprwRu2sCmYXnK0qIfoKNs0JXriL29JQhUy0lj14D+JyWCiHaK 1ijGMjm3Wvsq6qmqpxABn86FY9tJB62ijE7qrn33kAMkIrRFHwFgub4e1Oj3q6wkrf1F x8cpzIRZbNF+ROcOSN2mYvR05gKAJitBm6GHSjkPAuQWbNg4/mSjIhqRlf3D/T0ZknQH tpb+auMdLXjT+0o2DT6YXG16NprDUT/GstFP5/9XocSz+A+PwMvWjTSp1cNKHsCRR/Ym Wc26pfJJf/KBVuCxMl/qsuXoaKJWFAaWUkuw7TEg5xA67Le54Vjv6nE+jYpZnkgSavaG zCtw== X-Forwarded-Encrypted: i=1; AJvYcCUdkNUJ0fk7cumt2N3wGG+NLivYrcOvWmCrB/3A/bRJs0AapvTxq5PvN176ONguasFer+pUkdMf/URZgPldjumAB9W1 X-Gm-Message-State: AOJu0YwLOuccdKPZS1hgNL+fdDrPnWvn3gu0bniDfZgq+83dEG6YSaD3 knEkOGoiTZAdsmkR6TGdysXv5n9K+Jw3JgaWlGROidXjA5SaMlco3WUdmOXP7uVvfUl7yS00kPq /BOA8AP9iyD8IrlJOYjqslPLte5G1YdZc6ry+uzgqW//cJMkgkw== X-Received: by 2002:a05:6000:1e93:b0:35f:275c:fb63 with SMTP id ffacd0b85a97d-363177a21fbmr1325125f8f.25.1718788000114; Wed, 19 Jun 2024 02:06:40 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGy1zs6iJE9GpNZa9QGK7a0voinroV0urqVehwv4PtHkMFz5zvnzN6c0uHVN32+a1x30lJHxg== X-Received: by 2002:a05:6000:1e93:b0:35f:275c:fb63 with SMTP id ffacd0b85a97d-363177a21fbmr1325115f8f.25.1718787999743; Wed, 19 Jun 2024 02:06:39 -0700 (PDT) Received: from [192.168.188.25] ([80.243.52.134]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3641788cf4fsm45857f8f.90.2024.06.19.02.06.39 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 19 Jun 2024 02:06:39 -0700 (PDT) Message-ID: <75fa1c89-3580-4b3f-a7e5-34bb7e20d403@redhat.com> Date: Wed, 19 Jun 2024 11:06:37 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] conf: Accept duplicate and conflicting options, the last one wins To: Stefano Brivio , passt-dev@passt.top References: <20240618161723.1896519-1-sbrivio@redhat.com> From: Paul Holzinger In-Reply-To: <20240618161723.1896519-1-sbrivio@redhat.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Message-ID-Hash: T2BCICY3O4YRAFUWCW2SICNZYIW2I6EB X-Message-ID-Hash: T2BCICY3O4YRAFUWCW2SICNZYIW2I6EB X-MailFrom: pholzing@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: David Gibson X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On 18/06/2024 18:17, 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. To give more context: Podman allows to specify pasta options in the containers.conf file and on the cli. In podman we just append config file + cli and pass all options to pasta. As such it would be very difficult for users to overwrite a single option from the config file as pasta errors without this patch. The alternative is for Podman to parse the cli args and fix them before handing them to pasta but this is clearly not maintainable on our end. > > 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. > > Finally, somebody took care of this on Podman side at: > https://github.com/containers/common/pull/2052 > > but still, we'll probably have similar cases, or older versions of > Podman around, etc. > > 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. > > Suggested-by: Paul Holzinger > Suggested-by: David Gibson > Signed-off-by: Stefano Brivio PS: The patch doesn't apply to current HEAD on https://passt.top/passt/ (should I use another tree?) and git doesn't offer any merge conflict resolution for applying patches either??? So I cannot test this locally. -- Paul Holzinger