Hello,
I'd like to setup unprivileged containers with glusterfs mount in it. The idea is to have 1 ansible controller in each datacenter, so, in case we lost a datacenter connectivity, we still be able to run playbooks from the other datacenter.
So, my lxc.idmap does the job for the bind mount (glusterfs on the host shared to the container with mp0 setting).
But my problem is when the mapping is set, all users homedirs in the containers are set to nobody (65534). That's problematic because we connect to that container using SSH keys.
Here is my /etc/pve/lxc/101.conf :
and /etc/subuid :
How can I fix permissions inside /home/ of my container?
I'd like to setup unprivileged containers with glusterfs mount in it. The idea is to have 1 ansible controller in each datacenter, so, in case we lost a datacenter connectivity, we still be able to run playbooks from the other datacenter.
So, my lxc.idmap does the job for the bind mount (glusterfs on the host shared to the container with mp0 setting).
But my problem is when the mapping is set, all users homedirs in the containers are set to nobody (65534). That's problematic because we connect to that container using SSH keys.
Here is my /etc/pve/lxc/101.conf :
INI:
mp0: /net/glusterfs/192.168.170.5+192.168.160.5:ansible/ansible,mp=/mnt/ansible/ansible
# the UIDs range I need on the glusterfs mount:
lxc.idmap = u 0 100000 1000
# the GID of ansible group on the mount:
lxc.idmap = g 0 100000 200
# map 10 UIDs:
lxc.idmap = u 1000 1000 10
# map 1 GID:
lxc.idmap = g 200 200 1
# the rest:
lxc.idmap = u 1010 101009 64526
lxc.idmap = g 201 100200 65335
and /etc/subuid :
Code:
root:100000:65536
foo:165536:65536
bar:231072:65536
baz:296608:65536
prometheus:362144:65536
root:500:1
root:1000:10
How can I fix permissions inside /home/ of my container?
Last edited: