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

lxc-attach prints warning: Invalid argument - Unsupported config key "lxc.seccomp" #4444

Open
gideonda1 opened this issue May 14, 2024 · 1 comment
Labels
Bug Confirmed to be a bug
Milestone

Comments

@gideonda1
Copy link

gideonda1 commented May 14, 2024

Summary:

Every time we run lxc-attach -n 0 on our system (0 is the name of the container), we get:
... Unsupported config key "lxc.seccomp".

Required information

  • Distribution: Debian
  • Distribution version: Bookworm
  • Lxc version: lxc_5.0.2-1+deb12u2

Issue description

Every time we run "lxc-attach -n 0" on our system (0 is the name of the container), we get the warning message:

lxc-attach: 0: ../../src/lxc/confile.c: set_config_unsupported_key: 164 Invalid argument - Unsupported config key "lxc.seccomp".

Container '0' has a config file created from a template. That template doesn't have any 'seccomp' related options in it, and we don't compile it with seccomp support.

But it seems like it doesn't matter to the src/lxc/attach.c code, because it seems to check regardless of whether seccomp is supported/compiled in:

if (!fetch_seccomp(ctx->container, options))
	WARN("Failed to get seccomp policy");

This code is always called near the beginning of the function int lxc_attach(). Should this warning be masked if the user does not intend on using seccomp and/or doesn't have it compiled in?

@gideonda1
Copy link
Author

PS: I managed to suppress the warning message with an ifdef wrapper.
I'm not sure if this is the correct way to do it.

#if HAVE_SECCOMP
if (!fetch_seccomp(ctx->container, options))
	WARN("Failed to get seccomp policy");
#endif

@stgraber stgraber added the Bug Confirmed to be a bug label May 15, 2024
@stgraber stgraber added this to the lxc-6.1 milestone May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Confirmed to be a bug
Development

No branches or pull requests

2 participants