Closed gene-vigelis closed 2 years ago
@gene-vigelis do you get the same behavior without shift=true
?
Can you please get us the trace log for the container?
lxc config set NAME raw.lxc=lxc.log.level=trace
, then attempt to start the broken container and finally post lxc info NAME --show-log
@stgraber It's been a while since I tried without the shift but I believe it did start that way but my ownership's were all wrong.
Command history:
lxc config set docker raw.lxc=lxc.log.level=trace
lxc config show docker -e > show-container-e.out
lxc start docker > lxc-start-err.out 2>&1
lxc info --show-log docker > show-log-with-submounts-on-start.out 2>&1
lxc profile remove docker docker-disks
lxc start docker
lxc profile add docker docker-disks
lxc info --show-log docker > show-log-with-submounts-added-after-start.out 2>&1
Files: lxc-start-with-submounts.log show-container-e.log show-log-with-submounts-added-after-start.log show-log-with-submounts-on-start.log
So LXC
is unhappy because:
lxc docker 20220914124111.394 ERROR conf - ../src/src/lxc/conf.c:__lxc_idmapped_mounts_child:3050 - Invalid cross-device link - Failed to open target mountpoint 19/var/lib/docker/volumes/pgadmin1_config for detached idmapped mount 22:19/var/snap/lxd/common/lxd/devices/docker/disk.pgadmin1_config.var-lib-docker-volumes-pgadmin1_config
lxc docker 20220914124111.394 ERROR conf - ../src/src/lxc/conf.c:lxc_idmapped_mounts_child:3096 - Invalid cross-device link - Failed to setup idmapped mount entries
lxc docker 20220914124111.394 ERROR conf - ../src/src/lxc/conf.c:lxc_setup:4383 - Invalid cross-device link - Failed to attached detached idmapped mounts
It seems that /var/lib/docker/volumes/pgadmin1_config
crosses a mount which LXC currently blocks when setting up idmapped mounts.
@brauner, I have lxd installed via snap. What do I need to do to get his patch?
Needs to be merged into LXC and then backported to LXC 5.0 and then cherry-picked into the snap or wait for the next 5.0.x release of liblxc to have it be picked up automatically
I've install snap LXD so my lxc --version shows 5.5. How will i know that this has been back-ported? I have a workaround as shown above so would like to know when I can stop my workaround and have the container start properly with all disks.
Thank you so very much for such prompt response to my error!!!
Hi @stgraber,
My lxc driver is still at 5.0.1, is there any timeline for when liblxc will be patched/backported to lxd in the snap store?
Gene
Required information
Distributor ID: Ubuntu Description: Ubuntu 22.04.1 LTS Release: 22.04 Codename: jammy
config: core.https_address: '[::]:8443' core.trust_password: true api_extensions:
Issue description
If I bind mount a directory under an already bind mounted directory in the config the container will not start with id_map errors. If I bind mount only the higher level directory in the config and start the container I can lxc device add ... the other lower level bind mounts (but the container must be running) and everything works as expected. I can define the extra mounts in a profile and add that profile only after the container starts as well.
Steps to reproduce
Information to attach
dmesg
)lxc info NAME --show-log
)lxc config show NAME --expanded
)lxc monitor
while reproducing the issue)