Comment 2 for bug 1699919

Revision history for this message
PshemK (pshem-k) wrote :

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?