qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] tests/docker: Use --userns=keep-id for podman
@ 2019-09-04 23:24 John Snow
  2019-09-05 10:06 ` Alex Bennée
  0 siblings, 1 reply; 2+ messages in thread
From: John Snow @ 2019-09-04 23:24 UTC (permalink / raw)
  To: qemu-devel
  Cc: Fam Zheng, mlureau, John Snow, Alex Bennée,
	Philippe Mathieu-Daudé

The workaround that attempts to accomplish the same result as --userns=keep-id
does not appear to work well with UIDs much above 1000 (like mine, which is
above 20000.)

Since we have official support for this "trick" now, use the supported method.

Signed-off-by: John Snow <jsnow@redhat.com>
---
 tests/docker/docker.py | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/tests/docker/docker.py b/tests/docker/docker.py
index ac5baab4ca..fe17d5f709 100755
--- a/tests/docker/docker.py
+++ b/tests/docker/docker.py
@@ -368,9 +368,7 @@ class RunCommand(SubCommand):
             argv = [ "-u", str(uid) ] + argv
             docker = Docker()
             if docker._command[0] == "podman":
-                argv = [ "--uidmap", "%d:0:1" % uid,
-                         "--uidmap", "0:1:%d" % uid,
-                         "--uidmap", "%d:%d:64536" % (uid + 1, uid + 1)] + argv
+                argv.insert(0, '--userns=keep-id')
         return Docker().run(argv, args.keep, quiet=args.quiet)
 
 
-- 
2.21.0



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

* Re: [Qemu-devel] [PATCH] tests/docker: Use --userns=keep-id for podman
  2019-09-04 23:24 [Qemu-devel] [PATCH] tests/docker: Use --userns=keep-id for podman John Snow
@ 2019-09-05 10:06 ` Alex Bennée
  0 siblings, 0 replies; 2+ messages in thread
From: Alex Bennée @ 2019-09-05 10:06 UTC (permalink / raw)
  To: John Snow; +Cc: Fam Zheng, Philippe Mathieu-Daudé, mlureau, qemu-devel


John Snow <jsnow@redhat.com> writes:

> The workaround that attempts to accomplish the same result as --userns=keep-id
> does not appear to work well with UIDs much above 1000 (like mine, which is
> above 20000.)
>
> Since we have official support for this "trick" now, use the supported method.
>
> Signed-off-by: John Snow <jsnow@redhat.com>

Queued to testing/next, thanks.

> ---
>  tests/docker/docker.py | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/tests/docker/docker.py b/tests/docker/docker.py
> index ac5baab4ca..fe17d5f709 100755
> --- a/tests/docker/docker.py
> +++ b/tests/docker/docker.py
> @@ -368,9 +368,7 @@ class RunCommand(SubCommand):
>              argv = [ "-u", str(uid) ] + argv
>              docker = Docker()
>              if docker._command[0] == "podman":
> -                argv = [ "--uidmap", "%d:0:1" % uid,
> -                         "--uidmap", "0:1:%d" % uid,
> -                         "--uidmap", "%d:%d:64536" % (uid + 1, uid + 1)] + argv
> +                argv.insert(0, '--userns=keep-id')
>          return Docker().run(argv, args.keep, quiet=args.quiet)


--
Alex Bennée


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

end of thread, other threads:[~2019-09-05 10:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-04 23:24 [Qemu-devel] [PATCH] tests/docker: Use --userns=keep-id for podman John Snow
2019-09-05 10:06 ` Alex Bennée

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 NNTP newsgroup(s).