GNU bug report logs - #50916
Experimental `guix container PID program args` not working as expected

Previous Next

Package: guix;

Reported by: Bonface Munyoki K. <me <at> bonfacemunyoki.com>

Date: Thu, 30 Sep 2021 14:24:01 UTC

Severity: normal

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Bonface Munyoki K. <me <at> bonfacemunyoki.com>
To: bug-guix <at> gnu.org
Subject: Experimental `guix container PID program args` not working as expected
Date: Thu, 30 Sep 2021 17:23:35 +0300
[Message part 1 (text/plain, inline)]
Hi Guix!

I've tried running a redis server in a container,
and interact with it from outside the container as
such:

--8<---------------cut here---------------start------------->8---
guix environment --ad-hoc --container redis coreutils
--8<---------------cut here---------------end--------------->8---

Thereby, when I get the PID of the above running
process, I expect that:

--8<---------------cut here---------------start------------->8---
guix container PID redis-server --version
--8<---------------cut here---------------end--------------->8---

to be the redis version from the container which
is *6.2.4*. However, the command gets the
underlying redis-server from the host-- an old
Debian distribution-- which is at *3.2.6*.

In a bid to troubleshoot this, I have tried
running:

--8<---------------cut here---------------start------------->8---
guix container PID /bin/sh
--8<---------------cut here---------------end--------------->8---

which returns a shell from /outside/ the
container. Also, I have tried:

--8<---------------cut here---------------start------------->8---
guix environment --ad-hoc --container --link-profile
--8<---------------cut here---------------end--------------->8---

outside the $HOME directory, and then later:

--8<---------------cut here---------------start------------->8---
guix container PID echo $GUIX_ENVIRONMENT
--8<---------------cut here---------------end--------------->8---

with the expectation that $GUIX_ENVIRONMENT will
output some path from the store. However, I get
nothing. Finally, I tried:

--8<---------------cut here---------------start------------->8---
guix container exec PID ps aux
--8<---------------cut here---------------end--------------->8---

to gain perspective of whether I see the processes
from the host's or container's perspective. That
command, at least on my end, clearly shows that I
am seeing things from the host's perspective. This
demonstrates that *guix container* as described in
https://guix.gnu.org/manual/en/html_node/Invoking-guix-container.html
doesn't not execute from the container; and as
such is a bug.

-- 
Bonface M. K.
D4F09EB110177E03C28E2FE1F5BBAE1E0392253F (hkp://keys.gnupg.net)
Free Software Activist
Humble GNU Emacs User | Bearer of scheme-y parens
Curator: <https://upbookclub.com> | Twitter: @BonfaceKilz
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 2 years and 315 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.