[lxc-users] problems or only warning (!?) with lxc-clone

Serge Hallyn serge.hallyn at ubuntu.com
Tue May 12 01:45:29 UTC 2015


Quoting Yonsy Solis (yonsy.s.p at gmail.com):
> 
> 
> On Fri, May 8, 2015 at 10:52 AM, Yonsy Solis <yonsy.s.p at gmail.com>
> wrote:
> >
> >
> >On Fri, May 8, 2015 at 10:32 AM, Serge Hallyn
> ><serge.hallyn at ubuntu.com> wrote:
> >
> >>what does 'ls -l /usr/bin/newuidmap /usr/bin/newgidmap' show?
> >
> >mode :: ~ » ls -l /usr/bin/newuidmap /usr/bin/newgidmap
> >1 ↵
> >-rwsr-xr-x 1 root root 33688 Feb 16  2014 /usr/bin/newgidmap
> >-rwsr-xr-x 1 root root 33688 Feb 16  2014 /usr/bin/newuidmap
> 
> this problem need more details from me.
> 
> 1. I use btrfs for filesystem. every new container will get a
> subvolume generated (and in /etc/fstab i have user_subvol_rm_allowed
> in my filesystem to avoid problem when i remove the containers with
> lxc-destroy)
> 
> 2. the warning/error (!?) only happens when i do "lxc-clone -s base
> clone" (snapshots) but not when i do "lxc-clone base clone" (normal
> clones). in both cases the uid==100000 and gid==100000.
> 
> 3. if according to
> https://help.ubuntu.com/14.04/serverguide/lxc.html in "User
> namespaces", i set:
> 
> 	sudo usermod -v 100000-200000 -w 100000-200000 lazarus
> 
> then i can clone snapshots without warning/error message, with the
> rootfs uid=100000 and gid=200000, but i can't remove (lxc-destroy)

What do you mean here by 'gid=200000'?

You said in an earlier email that your lxc.conf only has
0:100000:65536 for both uid and gid mappings.  But your first
email's error msg clearly showed mapping gid 200000.  If you
weren't doing that on purpose with another lxc.id_map entry,
then there is something wonky going on inside lxc itself.

(also it might be worth reproducing this on a non-btrfs filesystem
using 'lxc-clone -s' using overlayfs)

> the cloned containers now, i need to do a btrfs subvol delete to
> remove the rootfs for this new cloned containers. In the previous
> settings i can lxc-clone snapshots and lxc-destroy the containers
> without problems (remember i have user_subvol_rm_allowed in my
> system), I need edit my /etcsubuid and /etc/subgid files to recover
> my previous state.
> 
> so, with this new conditions that i have, this is a "normal" warning
> or any error in process ?
> 
> 
> Yonsy Solis
> 
> _______________________________________________
> lxc-users mailing list
> lxc-users at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users


More information about the lxc-users mailing list