Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip rootfs pinning for read-only file system. #3844

Merged
merged 1 commit into from May 18, 2021
Merged

Skip rootfs pinning for read-only file system. #3844

merged 1 commit into from May 18, 2021

Conversation

weimzh
Copy link
Contributor

@weimzh weimzh commented May 18, 2021

Anbox mounts a squashfs image and uses it as the lxc container root. The squashfs image is mounted read-only, hence the rootfs pinning code in newer versions of lxc breaks anbox.

This fixes the issue.

Reference: bug report of anbox: anbox/anbox#1801

Signed-off-by: Wei Mingzhi <weimingzhi@baidu.com>
@lxc-jenkins
Copy link

This pull request didn't trigger Jenkins as its author isn't in the whitelist.

An organization member must perform one of the following:

  • To have this branch tested by Jenkins, use the "ok to test" command.
  • To have a one time test done, use the "test this please" command.

Those commands are simple Github comments of the format: "jenkins: COMMAND"

@brauner
Copy link
Member

brauner commented May 18, 2021

jenkins: test this please

@brauner brauner merged commit 966dad2 into lxc:master May 18, 2021
@brauner
Copy link
Member

brauner commented May 18, 2021

Thank you!

@gardotd426
Copy link

Unfortunately this doesn't fix the issue.

[ 2021-05-24 00:43:30] [client.cpp:48@start] Failed to start container: Failed to start container: Failed to set config item lxc.group.devices.deny
[ 2021-05-24 00:43:30] [session_manager.cpp:164@operator()] Lost connection to container manager, terminating.
[ 2021-05-24 00:43:30] [daemon.cpp:61@Run] Container is not running
[ 2021-05-24 00:43:30] [session_manager.cpp:164@operator()] Lost connection to container manager, terminating.

This is running the latest lxc master.

@brauner
Copy link
Member

brauner commented May 25, 2021

Unfortunately this doesn't fix the issue.

[ 2021-05-24 00:43:30] [client.cpp:48@start] Failed to start container: Failed to start container: Failed to set config item lxc.group.devices.deny
[ 2021-05-24 00:43:30] [session_manager.cpp:164@operator()] Lost connection to container manager, terminating.
[ 2021-05-24 00:43:30] [daemon.cpp:61@Run] Container is not running
[ 2021-05-24 00:43:30] [session_manager.cpp:164@operator()] Lost connection to container manager, terminating.

This is running the latest lxc master.

That's reporting that device cgroup values failed to apply though which is a bit odd. Any more details like a trace log or something that you could provide?

@weimzh
Copy link
Contributor Author

weimzh commented May 26, 2021

That's reporting that device cgroup values failed to apply though which is a bit odd. Any more details like a trace log or something that you could provide?

that's because name of some cgroup-related lxc config items seems to be changed. I asked them to apply this patch in the bug report of anbox and they have got it working:

-  set_config_item("lxc.group.devices.deny", "");
-  set_config_item("lxc.group.devices.allow", "");
+  set_config_item("lxc.cgroup2.devices.deny", "");
+  set_config_item("lxc.cgroup2.devices.allow", "");

ref: anbox/anbox#1801 (comment)

@brauner
Copy link
Member

brauner commented May 26, 2021

Hm, I thought I had changed LXC to ignore lxc.cgroup. directives on pure cgroup2 layouts.

samueldr added a commit to samueldr/nixpkgs that referenced this pull request Jun 8, 2021
herkhinah pushed a commit to herkhinah/nixpkgs that referenced this pull request Jun 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants