public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
* [PATCH] podman, slirp4netns.sh: Use --netns option on pasta's command line
@ 2022-08-29 19:16 Stefano Brivio
  2022-08-30  1:22 ` David Gibson
  0 siblings, 1 reply; 2+ messages in thread
From: Stefano Brivio @ 2022-08-29 19:16 UTC (permalink / raw)
  To: passt-dev

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

...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>
---
 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} || :
 }
 
-- 
@@ -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} || :
 }
 
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] podman, slirp4netns.sh: Use --netns option on pasta's command line
  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
  0 siblings, 0 replies; 2+ messages in thread
From: David Gibson @ 2022-08-30  1:22 UTC (permalink / raw)
  To: passt-dev

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-08-30  1:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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

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