From: "Thompson, David" <dthompson2@worcester.edu>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guix-devel <guix-devel@gnu.org>
Subject: Re: [PATCH] environment: container: Do not remount network files as read-only.
Date: Sun, 27 Mar 2016 20:32:00 -0400 [thread overview]
Message-ID: <CAJ=RwfbyE2LQifnvLGfOagLqfV1x8iBoi5OcTwEwk04hNnsbJA@mail.gmail.com> (raw)
In-Reply-To: <87poufyfyd.fsf@gnu.org>
On Sun, Mar 27, 2016 at 1:43 PM, Ludovic Courtès <ludo@gnu.org> wrote:
> I cannot reproduce the problem with this minimum test case (the two
> ‘mount’ call succeed):
>
> --8<---------------cut here---------------start------------->8---
> (use-modules (guix build syscalls)
> (gnu build linux-container))
>
> (chdir "/tmp")
> (false-if-exception (delete-file "foo"))
> (false-if-exception (umount "bar"))
> (false-if-exception (delete-file "bar"))
>
> (symlink "/etc/resolv.conf" "foo")
> (close-port (open-output-file "bar"))
> (mount "/tmp/foo" "/tmp/bar" "none" (logior MS_BIND MS_RDONLY))
> (mount "/tmp/foo" "/tmp/bar" "none" (logior MS_BIND MS_RDONLY MS_REMOUNT))
> --8<---------------cut here---------------end--------------->8---
>
> Maybe we should try to throw in ‘call-with-container’ somewhere in there
> to be closer to the actual problem, dunno.
>
> It’s a bit frustrating that we don’t understand the situation. If you
> wish, I think it’s fine to commit this patch, but please make sure to
> mention that the problem occurs when /etc/resolv.conf is a symlink, and
> add a link to this discussion.
I found the culprit! This problem occurs with *any* file remounted
read-only from a tmpfs. In Ubuntu, /etc/resolv.conf is a symlink to
/run/resolvconf/resolv.conf, and /run is a tmpfs. I did this to
confirm the issue with another file on GuixSD:
echo foobar > /run/user/foo
guix environment --container --expose=/run/user/foo --ad-hoc coreutils
Where /run/user is a tmpfs. It should fail with an exit status of 1.
I don't know why tmpfs is an issue, nor do I know how work around it.
I've been searching around for answers but haven't found any leads
yet. Any thoughts?
> (FWIW I’m planning to push have the release ready on Monday night.)
Maybe we'll have to punt on this for the release, but I really hope it
can be fixed in time! This is the last thing I need to make networked
containers "just work" on Ubuntu-based distros.
- Dave
prev parent reply other threads:[~2016-03-28 0:32 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-17 18:32 [PATCH] environment: container: Do not remount network files as read-only Thompson, David
2016-03-18 20:51 ` Ludovic Courtès
2016-03-26 14:06 ` Thompson, David
2016-03-26 16:29 ` Drew C
2016-03-26 16:49 ` Thompson, David
2016-03-26 16:59 ` Drew C
2016-03-26 18:43 ` Ludovic Courtès
2016-03-26 18:54 ` Drew C
2016-03-26 19:23 ` Thompson, David
2016-03-27 17:43 ` Ludovic Courtès
2016-03-28 0:32 ` Thompson, David [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='CAJ=RwfbyE2LQifnvLGfOagLqfV1x8iBoi5OcTwEwk04hNnsbJA@mail.gmail.com' \
--to=dthompson2@worcester.edu \
--cc=guix-devel@gnu.org \
--cc=ludo@gnu.org \
/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 external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.