From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gandalf.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id 429905A026A for ; Fri, 17 Feb 2023 01:43:42 +0100 (CET) Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4PHtN84cYlz4x89; Fri, 17 Feb 2023 11:43:36 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=201602; t=1676594616; bh=Zr+WTqzbxUixpBl6KmVJ3KDtmHMClXNF+fwtRfdkQX0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=io3ZFoYKLoQnSytQjpAKFGA2mIc9UxseQw7uJpuBxYkmvw6NOE6FwAABtEI7PQd/J vr3GcLE/f2tE2r30vvBKHPtfXLFztfY0lZDLbsDeMaaLK1QzHYH5FhfI2NghweWwAH Slo+cKVDitcVZi5MntrPnd/tmnmNRvfa2LwM8h5w= Date: Fri, 17 Feb 2023 09:48:39 +1100 From: David Gibson To: Michal =?iso-8859-1?B?UHLtdm96bu1r?= Subject: Re: [PATCH v2 3/5] qemu_passt: Make passt report errors to stderr whenever possible Message-ID: References: <38d52208-9198-af2f-f841-9602a04c36d8@redhat.com> <0ef8cb80-4f87-d657-9cd1-f0cc2c000fc4@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="bvDqVttCr6EXjRjj" Content-Disposition: inline In-Reply-To: <0ef8cb80-4f87-d657-9cd1-f0cc2c000fc4@redhat.com> Message-ID-Hash: NXMJD6OT2NYOYJMIEPUCDHF65O2XR3FO X-Message-ID-Hash: NXMJD6OT2NYOYJMIEPUCDHF65O2XR3FO X-MailFrom: dgibson@gandalf.ozlabs.org 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: Jonathon Jongsma , libvir-list@redhat.com, sbrivio@redhat.com, passt-dev@passt.top X-Mailman-Version: 3.3.3 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: --bvDqVttCr6EXjRjj Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Feb 16, 2023 at 05:21:48PM +0100, Michal Pr=EDvozn=EDk wrote: > On 2/16/23 16:42, Jonathon Jongsma wrote: > > On 2/16/23 7:32 AM, Michal Privoznik wrote: > >> Passt has '--stderr' argument which makes it report error onto > >> stderr rather to system log. Unfortunately, it's currently > >> impossible to use both '--log-file' and '--stderr', so pass the > >> latter only if the former isn't passed. Then, use the stderr to > >> produce more user friendly error message on failed start. > >> > >> Signed-off-by: Michal Privoznik > >> --- > >> =A0 src/qemu/qemu_passt.c | 22 +++++++++++++++++++--- > >> =A0 1 file changed, 19 insertions(+), 3 deletions(-) > >> > >> diff --git a/src/qemu/qemu_passt.c b/src/qemu/qemu_passt.c > >> index c082c149cd..881205449b 100644 > >> --- a/src/qemu/qemu_passt.c > >> +++ b/src/qemu/qemu_passt.c > >> @@ -171,8 +171,13 @@ qemuPasstStart(virDomainObj *vm, > >> =A0=A0=A0=A0=A0 if (net->sourceDev) > >> =A0=A0=A0=A0=A0=A0=A0=A0=A0 virCommandAddArgList(cmd, "--interface", n= et->sourceDev, NULL); > >> =A0 -=A0=A0=A0 if (net->backend.logFile) > >> +=A0=A0=A0 if (net->backend.logFile) { > >> =A0=A0=A0=A0=A0=A0=A0=A0=A0 virCommandAddArgList(cmd, "--log-file", > >> net->backend.logFile, NULL); > >> +=A0=A0=A0 } else { > >> +=A0=A0=A0=A0=A0=A0=A0 /* By default, passt logs into system logger. B= ut we are > >> interested > >> +=A0=A0=A0=A0=A0=A0=A0=A0 * into errors too. Make it print errors onto= stderr. */ > >=20 > > s/into/in the/ ? >=20 > Honestly, I have no idea. I'm not a native speaker. I am, and "in the" definitely seems more correct here. > Maybe it's 'print > onto paper' but 'print into a stream'? Fwiw, s/onto/to/ also reads slightly better. >=20 > Anyway, fixed locally. Thanks. >=20 > Michal >=20 --=20 David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson --bvDqVttCr6EXjRjj Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmPusrIACgkQzQJF27ox 2GcTbQ/+J7WP2zyGfDbpi2G51zKCHwDcg8dDz18DcKXUBRllGjTyvMJKkpdFFTdK ZL9Eia2wLwAEbbQqEKdmAHPHnhgTgF4diN92KSCwJCQDy8GRkrq20FgbSrTbWT7D egwn9kw13oVCaJWLtYGnxeYJzlYCPaahVvFMjdIwUYwLRO1rUdPPvX6pCBvoq+qX 4JxjbHSQGxmyQZl0g6YNJga7FD8Xn95oDhiZIFOZe3C1s7tBbiSAswVK8WumSPLU /VBn5Nzh0KxoB7ncmPkJ+MgOZL74ICZCtk1tK0AV5u4P5VupuTrJLEPBoXGqZSXY u+35DaxZXgtv/eTT2mTPYciNpTIk5tbYLtYFX2AljZC7wm/i1Tj+xnR8cbNSKAia eQ00Yd4uSwTgB1u3ArvcsGEp7YJpVJ+7AyxLcAmT5GaW6lS9SrGwgZiUoDVOIEda ckKf0s7s6GFkfahs637KG4wbaO5axjsHCu/4EA86kTX5CGmE9TRYhC5PhTcZpRl7 jyYLxxZga3Nla4Gq3lWN6fai6DVWpkbRMz4/nTCP9e63iXdXf/vtuuWzo+i6kkJh sVGu7dVD9PHPskKtGffaH91jeK6UtSRXZZj0o86KazdZLzj71GyTCzR0FM2ZM1U0 XARa0p+CN7WWjXKtuZYI6fGhKBVj8YkxW1CzAzhzxLp/sMFFt1A= =Rjmx -----END PGP SIGNATURE----- --bvDqVttCr6EXjRjj--