From: "Serge E. Hallyn" <serge@hallyn.com>
To: Tejun Heo <tj@kernel.org>, lkml <linux-kernel@vger.kernel.org>
Subject: cgroup namespaces - mount root
Date: Fri, 11 Mar 2016 15:50:10 -0600 [thread overview]
Message-ID: <20160311215010.GA5844@mail.hallyn.com> (raw)
Hi Tejun,
One practical problem I've found with cgroup namespaces is that there
is no way to disambiguate between a cgroupfs mount which was done in
a cgroup namespace, and a bind mount of a cgroupfs directory. So
whether I do
unshare --cgroup -- bash -c "mount -t cgroup -o freezer f /mnt; cat /proc/self/mountinfo"
or whether I just
mount --bind /sys/fs/cgroup/freezer/$(awk -F: '/freezer/ { print $3 }' /proc/self/cgroup) /mnt
'mount root' field (field 3) in /proc/self/mountinfo will show the
same thing, the result of awk -F: '/freezer/ { print $3 }' /proc/self/cgroup.
I keep waffling between thinking this is a problem that needs to be
solved, and thinking "don't do that". But docker at least seems to
have a problem with it right now, because it uses that field as part
of its calculation of paths to write to.
So, do you think it would be worth adding a 'nsroot=' entry in the
optional fields (next shared:) ? I would've just sent a patch, but
it actually isn't quite as simple as it would seem to find a way to
get the absolute path during mountinfo_read(), so I thought I'd ask
before spending more time on it.
thanks,
-serge
next reply other threads:[~2016-03-11 21:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-11 21:50 Serge E. Hallyn [this message]
2016-03-16 21:46 ` Tejun Heo
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=20160311215010.GA5844@mail.hallyn.com \
--to=serge@hallyn.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tj@kernel.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®