Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.bugs.dist > #1069466
| From | Pierre-Elliott Bécue <peb@debian.org> |
|---|---|
| Newsgroups | linux.debian.bugs.dist |
| Subject | Bug#993391: [pkg-lxc-devel] Bug#993391: lxc: Unprivileged lxc example from README.Debian.gz gives AppArmor error "Failed to mount proc" |
| Date | 2021-09-02 21:30 +0200 |
| Message-ID | <CT0zn-2ZK-3@gated-at.bofh.it> (permalink) |
| References | <CSf7r-68G-5@gated-at.bofh.it> <CSOeR-3x9-5@gated-at.bofh.it> <CSf7r-68G-5@gated-at.bofh.it> <CSOeR-3x9-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
[Multipart message — attachments visible in raw view] - view raw
Hi, pk <pkoroau@gmail.com> writes: > Hello, > > I copy-pasted configuration and commands from > /usr/share/doc/lxc/README.Debian.gz under "Unprivileged containers". > Are you talking about another file? > https://salsa.debian.org/lxc-team/lxc/-/blob/7d692c266c63fced9417042ae904cc2a280b96d8/debian/README.Debian The configuration in that file is lxc.include = /etc/lxc/default.conf lxc.idmap = u 0 100000 65536 lxc.idmap = g 0 100000 65536 lxc.mount.auto = proc:mixed sys:ro cgroup:mixed lxc.apparmor.profile = unconfined and goes to ~/.config/lxc/default.conf You removed at least the lxc.include statement, and actually tried something of your own, in particular not creating a default config for your user and a container afterwards. > lxc.rootfs defaults to the system root / per lxc.container.conf(5). Which is not acceptable for an *unprivileged* container, which is the case you brought here. The reason why Apparmor intervenes instead of letting either init crash upon startup (because not being able to manipulate the filesystem) or things explode is because lxc.apparmor.profile doesn't apply to lxc-start call, but to only to the lxc child process. > Creation is unnecessary, it is just a convenience to avoid -f and does > not affect the container runtime. My (still privileged) lxc setup > works perfectly with -f without ever creating any containers. Creation is necessary as you need a valid rootfs to work, and a valid rootfs for an unprivileged container has to fit the usernamespace which will be created upon startup of the container. "/" is not a valid rootfs for an unprivileged container as the uid mappings are totally out of line. You therefore need to at least create one container using lxc-create or manually create a rootfs using mmdebstrap or whatever fits best. > I pasted full logs above. You pasted truncated logs, and actually did not follow the README. > Please try to be respectful and helpful, do not reproduce on a > configured machine, and leave bug triaging to the lxc experts. Being one of the LXC maintainers, I'm totally entitled to triage your bug report, especially since what you claim being a bug does not look like one. I won't reply to your assumption about my expertise. Please follow the README properly and if that fails please come back with full logs. With best regards, -- PEB
Back to linux.debian.bugs.dist | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Bug#993391: lxc: Unprivileged lxc example from README.Debian.gz gives AppArmor error "Failed to mount proc" pk1 <pkoroau+bts@gmail.com> - 2021-08-31 18:50 +0200
Bug#993391: lxc: Unprivileged lxc example from README.Debian.gz gives AppArmor error "Failed to mount proc" Pierre-Elliott Bécue <peb@debian.org> - 2021-09-01 12:30 +0200
Bug#993391: lxc: Unprivileged lxc example from README.Debian.gz gives AppArmor error "Failed to mount proc" pk <pkoroau@gmail.com> - 2021-09-01 17:30 +0200
Bug#993391: [pkg-lxc-devel] Bug#993391: lxc: Unprivileged lxc example from README.Debian.gz gives AppArmor error "Failed to mount proc" Pierre-Elliott Bécue <peb@debian.org> - 2021-09-02 00:30 +0200
Bug#993391: lxc: Unprivileged lxc example from README.Debian.gz gives AppArmor error "Failed to mount proc" pk <pkoroau@gmail.com> - 2021-09-02 08:20 +0200
Bug#993391: [pkg-lxc-devel] Bug#993391: lxc: Unprivileged lxc example from README.Debian.gz gives AppArmor error "Failed to mount proc" Pierre-Elliott Bécue <peb@debian.org> - 2021-09-02 21:30 +0200
Bug#993391: [pkg-lxc-devel] Bug#993391: lxc: Unprivileged lxc example from README.Debian.gz gives AppArmor error "Failed to mount proc" pk <pkoroau@gmail.com> - 2021-09-02 12:10 +0200
Bug#993391: [pkg-lxc-devel] Bug#993391: Bug#993391: lxc: Unprivileged lxc example from README.Debian.gz gives AppArmor error "Failed to mount proc" Pierre-Elliott Bécue <peb@pimeys.fr> - 2021-09-02 21:30 +0200
Bug#993391: [pkg-lxc-devel] Bug#993391: lxc: Unprivileged lxc example from README.Debian.gz gives AppArmor error "Failed to mount proc" pk <pkoroau@gmail.com> - 2021-09-04 10:20 +0200
csiph-web