Hi,
just want to ask if these two behaviors of mapping UIDs and GIDs are by design.
-
Minimum subuid range for working isolated containers is:
65536 + (65536 * number of isolated containers) + 1
I understand that 65536 is minimum to get unisolated containers working because 65536 is minimum for container to be POSIX compliant and work correctly as described here in docs.
I would expect that 65536 is also minimum range for each isolated container. So for example for two isolated containers I would expect first range 65536 be taken by unisolated containers and next 2 * 65536 for two isolated. Total range would then be 3 * 65536 = 196608.
But if I setroot:100000:196608
in subuid and subgid Incus cant run the second isolated container. I need to setroot:100000:196609
for second container to work. Is this correct? I just dont understand where that +1 in range comes from. -
If I set
root:100000:196609
and run both unisolated and isolated containers then inside unisolated container config/run/incus/container/lxc.conf
I see settinglxc.idmap = u 0 1000000 196609
This seems to me like by default unisolated container can use the same UIDs as isolated ones and therefore can affect them. Is this by design?
I thought unisolated containers would be all set aslxc.idmap = u 0 1000000 65536
by default so they would be able to affect other unisolated containers but not isolated containers.
Thanks.