[lxc-devel] possible lxc-attach problem

Stéphane Graber stgraber at ubuntu.com
Sat Mar 1 00:35:35 UTC 2014


On Fri, Feb 28, 2014 at 06:21:35PM -0600, Serge Hallyn wrote:
> Quoting Stéphane Graber (stgraber at ubuntu.com):
> > On Fri, Feb 28, 2014 at 06:11:25PM -0600, Serge Hallyn wrote:
> > > Quoting S.Çağlar Onur (caglar at 10ur.org):
> > > > On Fri, Feb 28, 2014 at 12:20 PM, Serge Hallyn <serge.hallyn at ubuntu.com> wrote:
> > > > > Quoting Serge Hallyn (serge.hallyn at ubuntu.com):
> > > > >> It seems to me these are the right things to do, but they'll take
> > > > >> some experimentation with the many possible hosts:
> > > > >>
> > > > >> 1. If / is not shared, do nothing
> > > > >> 2. if / is shared, and is not the ramfs, then remount MS_SLAVE|MS_REC
> > > > >> 3. if / is ramfs, then do the chroot_into_slave
> > > > >
> > > > > The following patch seems to work for me on arch.  It should
> > > > > also work on ubuntu as it makes no changes in the !shared
> > > > > path.  In order to fill in the ramfs root detection, could
> > > > > someone (Stéphane?) send the output of /proc/self/mountinfo
> > > > > on an android system?
> > > > 
> > > > Yep, it looks much better on Fedora 20 as well
> > > > (http://paste.ubuntu.com/7013380/)
> > > 
> > > Does lxc-attach also work with this patch on f20?
> > 
> > Given Caglar's example is under lxc-attach, I'd think so :)
> 
> Oh, yeah :)
> 
> Stéphane, can you send the /proc/self/mountinfo output
> for an android device?

1 1 0:1 / / ro,relatime shared:1 - rootfs rootfs ro,seclabel
11 1 0:11 / /dev rw,nosuid,relatime shared:2 - tmpfs tmpfs rw,seclabel,mode=755
12 11 0:9 / /dev/pts rw,relatime shared:3 - devpts devpts rw,seclabel,mode=600
13 1 0:3 / /proc rw,relatime shared:5 - proc proc rw
14 1 0:12 / /sys rw,relatime shared:6 - sysfs sysfs rw,seclabel
15 14 0:10 / /sys/fs/selinux rw,relatime shared:7 - selinuxfs selinuxfs rw
16 14 0:5 / /sys/kernel/debug rw,relatime shared:8 - debugfs /sys/kernel/debug rw
17 1 0:13 / /acct rw,relatime shared:10 - cgroup none rw,cpuacct
18 14 0:14 / /sys/fs/cgroup rw,relatime shared:9 - tmpfs none rw,seclabel,mode=750,gid=1000
19 1 0:15 / /mnt/asec rw,relatime shared:11 - tmpfs tmpfs rw,seclabel,mode=755,gid=1000
20 1 0:16 / /mnt/obb rw,relatime shared:12 - tmpfs tmpfs rw,seclabel,mode=755,gid=1000
21 1 0:17 / /mnt/fuse rw,relatime shared:13 - tmpfs tmpfs rw,seclabel,mode=775,gid=1000
22 11 0:18 / /dev/cpuctl rw,relatime shared:4 - cgroup none rw,cpu
23 1 179:35 / /system ro,noatime shared:14 - ext4 /dev/block/mmcblk0p35 ro,seclabel,nobarrier,data=ordered
24 1 179:36 / /cache rw,nosuid,nodev,noatime shared:15 - ext4 /dev/block/mmcblk0p36 rw,seclabel,nobarrier,data=ordered
26 1 179:31 / /firmware/mdm ro,relatime shared:17 - vfat /dev/block/mmcblk0p31 ro,fmask=0000,dmask=0000,allow_utime=0022,codepage=cp437,iocharset=iso8859-1,shortname=lower,errors=remount-ro
27 1 179:16 / /firmware/q6 ro,relatime shared:18 - vfat /dev/block/mmcblk0p16 ro,fmask=0000,dmask=0000,allow_utime=0022,codepage=cp437,iocharset=iso8859-1,shortname=lower,errors=remount-ro
28 1 0:20 / /mnt/qcks rw,relatime shared:19 - tmpfs tmpfs rw,seclabel,size=20480k,mode=750,gid=1000
29 1 0:21 / /mnt/efs rw,relatime shared:20 - tmpfs tmpfs rw,seclabel,size=20480k,mode=750,gid=1000
30 1 0:22 / /mnt/secdata rw,relatime shared:21 - tmpfs tmpfs rw,seclabel,mode=755,gid=1000
25 1 254:0 / /data rw,nosuid,nodev,noatime shared:16 - ext4 /dev/block/dm-0 rw,seclabel,nobarrier,noauto_da_alloc,data=ordered
31 1 0:19 / /mnt/shell/emulated rw,nosuid,nodev,relatime shared:22 - fuse /dev/fuse rw,user_id=1023,group_id=1023,default_permissions,allow_other

-- 
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20140228/7726b8a2/attachment.pgp>


More information about the lxc-devel mailing list