Search code examples
apptainer

Two shells on same apptainer instance?


I'm trying to learn to have two shells on the same container with the same overlay. Some googling suggests I want to start an "instance" and then shell into it twice. I've built my image and my overlay with --fakeroot. I'm sharing this server so I'd like to be as unobtrusive to other users as possible.

$ apptainer instance start --fakeroot --overlay my_overlay.img my_image.sif my_new_instance_name
INFO:    User not listed in /etc/subuid, trying root-mapped namespace
INFO:    Using fakeroot command combined with root-mapped namespace
INFO:    Terminating fuse-overlayfs after timeout
INFO:    Timeouts can be caused by a running background process
INFO:    Cleanup error: while stopping driver for /var/lib/apptainer/mnt/session/final: fuse-overlayfs exited: fuse: failed to unmount /var/lib/apptainer/mnt/session/final: Invalid argument
ERROR:   container cleanup failed: no instance found with name my_new_instance_name
FATAL:   container creation failed: while applying cgroups config: unable to start unit "apptainer-2317013.scope" (properties [{Name:Description Value:"libcontainer container 2317013"} {Name:Slice Value:"system.slice"} {Name:Delegate Value:true} {Name:PIDs Value:@au [2317013]} {Name:MemoryAccounting Value:true} {Name:CPUAccounting Value:true} {Name:IOAccounting Value:true} {Name:TasksAccounting Value:true} {Name:DefaultDependencies Value:false}]): Interactive authentication required.

FATAL:   while executing starter: failed to start instance: while running /usr/libexec/apptainer/bin/starter: exit status 255

Not really sure what to make of this error.


Solution

  • It's a bug in Apptainer. https://github.com/apptainer/apptainer/issues/2189.

    ==================