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 4E5745A026F for ; Wed, 2 Aug 2023 05:15:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=201602; t=1690946145; bh=plqcnRczM8F0L6K4eVtJAqMEif4Seqd6NX3vHxUYF5I=; h=From:To:Cc:Subject:Date:From; b=SwPqVm91Z1Q9OtWds+XjvO3teuLqTlECnKFFTf0O4ht3yiu4/oBsqC3cNvbx6krKQ P7hEh9ry9S0Nu48M1VIrAqxxddNrFChAcw5SOKS54jgyDlwOGjA81MurtukqfQatFR bYwoapL39iTxlhqonH+4KfqiW5DY07O/xGwHNUvE= Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4RFxv53NV5z4yLX; Wed, 2 Aug 2023 13:15:45 +1000 (AEST) From: David Gibson To: passt-dev@passt.top, Stefano Brivio Subject: [PATCH 0/3] Better report errors failing to open namespace tap device Date: Wed, 2 Aug 2023 13:15:39 +1000 Message-ID: <20230802031542.2726758-1-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.41.0 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: HUPWF7TAMONP67BCOKSYQUOR737UX5G5 X-Message-ID-Hash: HUPWF7TAMONP67BCOKSYQUOR737UX5G5 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: Paul Holzinger , 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: In https://github.com/containers/podman/issues/19428, pasta is failing to open the namespace tap device. Paul Holzinger correctly noted that pasta isn't very helpful in this case, with no information beyond "it failed". He suggested a patch for that, however it wasn't quite sufficient: errno may not be propagated back from the ephemeral thread which enters the namespace, and even if it does the errno alone won't tell us which of the possible failure points actually failed. 2/3 here is a more robust change to address the problem. The other patches are minor cleanups I noticed along the way. Link: https://bugs.passt.top/show_bug.cgi?id=69 David Gibson (3): util: Make ns_enter() a void function and report setns() errors tap: More detailed error reporting in tap_ns_tun() tap: Remove unnecessary global tun_ns_fd conf.c | 3 ++- tap.c | 33 ++++++++++++++++++--------------- udp.c | 6 ++---- util.c | 8 +++----- util.h | 2 +- 5 files changed, 26 insertions(+), 26 deletions(-) -- 2.41.0