public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: passt-dev@passt.top
Subject: Re: [PATCH] podman, slirp4netns.sh: Use --netns option on pasta's command line
Date: Tue, 30 Aug 2022 11:22:55 +1000	[thread overview]
Message-ID: <Yw1mb1jZtNhvA2fi@yekko> (raw)
In-Reply-To: <20220829191643.3656079-1-sbrivio@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 2368 bytes --]

On Mon, Aug 29, 2022 at 09:16:43PM +0200, Stefano Brivio wrote:
> ...instead of PATH. This seems to be the only change needed in
> existing pasta integrations after patch:
> 
>   Use explicit --netns option rather than multiplexing with PID
> 
> Signed-off-by: Stefano Brivio <sbrivio(a)redhat.com>

Reviewed-by: David Gibson <david(a)gibson.dropbear.id.au>

> ---
>  contrib/podman/0001-libpod-Add-pasta-networking-mode.patch | 6 +++---
>  slirp4netns.sh                                             | 2 +-
>  2 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/contrib/podman/0001-libpod-Add-pasta-networking-mode.patch b/contrib/podman/0001-libpod-Add-pasta-networking-mode.patch
> index 884ebf7..bf608f1 100644
> --- a/contrib/podman/0001-libpod-Add-pasta-networking-mode.patch
> +++ b/contrib/podman/0001-libpod-Add-pasta-networking-mode.patch
> @@ -1,4 +1,4 @@
> -From 9f61d4107f7cce5fb4157e18c67fad9c135d7b9f Mon Sep 17 00:00:00 2001
> +From 321b58cf7e9eadb6073c286ed6709747770f5964 Mon Sep 17 00:00:00 2001
>  From: Stefano Brivio <sbrivio(a)redhat.com>
>  Date: Mon, 2 May 2022 16:12:07 +0200
>  Subject: [PATCH] libpod: Add pasta networking mode
> @@ -354,7 +354,7 @@ index c10c3c0b2..0f0c1213c 100644
>   	}
>  diff --git a/libpod/networking_pasta.go b/libpod/networking_pasta.go
>  new file mode 100644
> -index 000000000..66f81cbfc
> +index 000000000..f179c803a
>  --- /dev/null
>  +++ b/libpod/networking_pasta.go
>  @@ -0,0 +1,107 @@
> @@ -452,7 +452,7 @@ index 000000000..66f81cbfc
>  +		cmdArgs = append(cmdArgs, "-U", "none")
>  +	}
>  +
> -+	cmdArgs = append(cmdArgs, netns.Path())
> ++	cmdArgs = append(cmdArgs, "--netns", netns.Path())
>  +
>  +	logrus.Debugf("pasta arguments: %s", strings.Join(cmdArgs, " "))
>  +
> diff --git a/slirp4netns.sh b/slirp4netns.sh
> index ff12a52..1d089b7 100755
> --- a/slirp4netns.sh
> +++ b/slirp4netns.sh
> @@ -121,7 +121,7 @@ opt() {
>  
>  # start() - Start pasta
>  start() {
> -	${PASTA} ${PASTA_OPTS} ${PORT_ARGS} ${ns_spec}
> +	${PASTA} ${PASTA_OPTS} ${PORT_ARGS} --netns ${ns_spec}
>  	[ ${RFD} -ne 0 ] && echo "1" >&${RFD} || :
>  }
>  

-- 
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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      reply	other threads:[~2022-08-30  1:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-29 19:16 [PATCH] podman, slirp4netns.sh: Use --netns option on pasta's command line Stefano Brivio
2022-08-30  1:22 ` David Gibson [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=Yw1mb1jZtNhvA2fi@yekko \
    --to=david@gibson.dropbear.id.au \
    --cc=passt-dev@passt.top \
    /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).