The thing is - it didn't get remapped. Now I have two containers mapping
to the same range, both live:

pshemk@ii:~$ lxc list
+---------+---------+---------------------+------+------------+-----------+
|  NAME   |  STATE  |        IPV4         | IPV6 |    TYPE    | SNAPSHOTS |
+---------+---------+---------------------+------+------------+-----------+
| backend | RUNNING | 10.221.22.92 (eth0) |      | PERSISTENT | 0         |
+---------+---------+---------------------+------+------------+-----------+
| putils  | RUNNING | 10.221.22.91 (eth0) |      | PERSISTENT | 1         |
+---------+---------+---------------------+------+------------+-----------+

pshemk@ii:~$ lxc config show putils
architecture: x86_64
config:
  volatile.base_image: 
8fa08537ae51c880966626561987153e72d073cbe19dfe5abc062713d929254d
  volatile.eth0.hwaddr: 00:16:3e:e3:20:21
  volatile.idmap.base: "0"
  volatile.idmap.next: 
'[{"Isuid":true,"Isgid":false,"Hostid":100000,"Nsid":0,"Maprange":65536},{"Isuid":false,"Isgid":true,"Hostid":100000,"Nsid":0,"Maprange":65536}]'
  volatile.last_state.idmap: 
'[{"Isuid":true,"Isgid":false,"Hostid":100000,"Nsid":0,"Maprange":65536},{"Isuid":false,"Isgid":true,"Hostid":100000,"Nsid":0,"Maprange":65536}]'
  volatile.last_state.power: RUNNING
devices:
  root:
    path: /
    type: disk
ephemeral: false
profiles:
- default
stateful: false
pshemk@ii:~$ lxc config show backend
architecture: x86_64
config:
  volatile.base_image: 
7a7ff654cbd8f5f09bec03aa19d8d7d92649127d18659036a963b1ea63f90d25
  volatile.eth0.hwaddr: 00:16:3e:ec:03:84
  volatile.idmap.base: "0"
  volatile.idmap.next: 
'[{"Isuid":true,"Isgid":false,"Hostid":100000,"Nsid":0,"Maprange":65536},{"Isuid":false,"Isgid":true,"Hostid":100000,"Nsid":0,"Maprange":65536}]'
  volatile.last_state.idmap: 
'[{"Isuid":true,"Isgid":false,"Hostid":100000,"Nsid":0,"Maprange":65536},{"Isuid":false,"Isgid":true,"Hostid":100000,"Nsid":0,"Maprange":65536}]'
  volatile.last_state.power: RUNNING
devices:
  root:
    path: /
    type: disk
ephemeral: false
profiles:
- default
stateful: false

both have the same hostid, and get mapped to the same range.

Should the files on the file system belong to the same uid:gid for 2
different containers?

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to lxc in Ubuntu.
https://bugs.launchpad.net/bugs/1699919

Title:
  lxc copy between hosts preserves original uid/gid

Status in lxc package in Ubuntu:
  New

Bug description:
  I tried to copy an lxc container between two hosts. All worked as
  expected, but when I looked at the underlying filesystem I realised
  that the container that has been copied onto the new machine retained
  its original uid/gid (running unprivileged):

  root@ii:/var/lib/lxd/containers# ls -al
  total 24
  drwx--x--x  1 root   root     58 Jun 23 12:01 .
  drwxr-xr-x  1 root   root    182 Jun 23 12:04 ..
  drwxr-xr-x+ 1 100000 100000   56 Jun 23 10:38 backend
  -rw-r--r--  1 root   root   4446 Jun 23 12:04 lxc-monitord.log
  drwxr-xr-x+ 1 100000 100000   56 Jun 23 12:01 putils

  (putils has been copied from a different host).

  I'd expect a new uid/gid to be allocated for the copied host.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/1699919/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to