From: "Fabian Grünbichler" <f.gruenbichler@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Subject: Re: [pve-devel] [PATCH container v2 2/4] seccomp config: adapt to new lxc-syscalld runtime directory
Date: Wed, 30 Jul 2025 14:50:07 +0200 [thread overview]
Message-ID: <1753879761.f5lt7m7owq.astroid@yuna.none> (raw)
In-Reply-To: <20250723144131.170616-3-f.ebner@proxmox.com>
On July 23, 2025 4:40 pm, Fiona Ebner wrote:
> The lxc-syscalld now uses a different runtime directory. Its old
> runtime directory was /run/pve, which was also used for other things,
> e.g. storage tunnel and mtunnel sockets and container stderr logs as
> well as pull metrics. The fact that it would be recreated on service
> restart is problematic, so the runtime directory was changed.
>
> Note that this configuration is only used for containers with the
> experimental 'mknod' feature enabled.
>
> For already running containers, a symbolic link is put into place by
> the new version of pve-lxc-syscalld, but newly started ones should
> always use the new socket path as soon as it is available. Only use
> the old socket path if the old version of pve-lxc-syscalld is still
> used. The heuristic to check this is:
> 1. the new socket path doesn't exist
> 2. the old socket path exists
> 3. the old socket path is not a symbolic link
couldn't this be solved by adding a versioned depends, instead of
breaking the other direction which is not actually required because of
the compat symlink?
>
> Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
> ---
>
> Changes in v2:
> * adapt to shortened socket path
>
> src/PVE/LXC.pm | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm
> index 741bb33..a236b5a 100644
> --- a/src/PVE/LXC.pm
> +++ b/src/PVE/LXC.pm
> @@ -534,7 +534,15 @@ sub make_seccomp_config {
> die "'mknod' feature requested, but kernel too old (found $kernel, required >= 5.3)\n";
> }
>
> - $raw_conf .= "lxc.seccomp.notify.proxy = unix:/run/pve/lxc-syscalld.sock\n";
> + # TODO PVE 10 - always use new socket path
> + my $old_socket_path = '/run/pve/lxc-syscalld.sock';
> + my $new_socket_path = '/run/pve-lxc-syscalld/socket';
> +
> + if (!-e $new_socket_path && -e $old_socket_path && !-l $old_socket_path) {
> + $raw_conf .= "lxc.seccomp.notify.proxy = unix:$old_socket_path\n";
> + } else {
> + $raw_conf .= "lxc.seccomp.notify.proxy = unix:$new_socket_path\n";
> + }
> $raw_conf .= "lxc.seccomp.notify.cookie = $vmid\n";
>
> $rules->{mknod} = [
> --
> 2.47.2
>
>
>
> _______________________________________________
> pve-devel mailing list
> pve-devel@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
>
>
>
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
next prev parent reply other threads:[~2025-07-30 12:48 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-23 14:40 [pve-devel] [PATCH-SERIES manager/container/lxc-syscalld v2 0/4] avoid using generic runtime directory name for pve-lxc-syscalld Fiona Ebner
2025-07-23 14:40 ` [pve-devel] [PATCH manager v2 1/4] debian: add tpmfiles.d config to create /run/pve directory Fiona Ebner
2025-07-30 23:21 ` [pve-devel] applied: " Thomas Lamprecht
2025-07-23 14:40 ` [pve-devel] [PATCH container v2 2/4] seccomp config: adapt to new lxc-syscalld runtime directory Fiona Ebner
2025-07-30 12:50 ` Fabian Grünbichler [this message]
2025-07-30 13:00 ` Thomas Lamprecht
2025-07-30 13:04 ` Fabian Grünbichler
2025-07-30 13:18 ` [pve-devel] applied: " Thomas Lamprecht
2025-07-23 14:40 ` [pve-devel] [PATCH pve-lxc-syscalld v2 3/4] service: avoid using generic runtime directory name Fiona Ebner
2025-07-30 23:33 ` [pve-devel] applied: " Thomas Lamprecht
2025-07-23 14:40 ` [pve-devel] [PATCH pve-lxc-syscalld v2 4/4] d/postinst: create link to new socket location on upgrade Fiona Ebner
2025-07-30 23:33 ` [pve-devel] applied: " Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1753879761.f5lt7m7owq.astroid@yuna.none \
--to=f.gruenbichler@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox