From: Christoph Heiss <c.heiss@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH container/manager 0/2] fix #3413: Add `Disconnect` option for LXC networks
Date: Mon, 13 Feb 2023 14:56:58 +0100 [thread overview]
Message-ID: <20230213135700.502195-1-c.heiss@proxmox.com> (raw)
This adds a `Disconnect` option for network interfaces on LXC
containers, much like it already exists for VMs. This has been requested
in #3413 [0] and seems useful, esp. considering we already support the
same thing for VMs.
One thing to note is that LXC does not seem to support the notion of
setting an interface down. The `flags` property would suggest that this
possible [1], but AFAICS it does not work. I tried setting the value as
empty and to something else than "up" (since that is really the only
supported option [2][3]), which both had absolutely no effect.
The solution was to force the host-side link of the container network
down, thus effectively becoming "physically" disconnected.
[0] https://bugzilla.proxmox.com/show_bug.cgi?id=3413
[1] https://linuxcontainers.org/lxc/manpages/man5/lxc.container.conf.5.html#lbAO
[2] https://github.com/lxc/lxc/blob/08f0e769/src/lxc/confile.c#L453-L467
[3] https://github.com/lxc/lxc/blob/08f0e769/src/lxc/confile.c#L5933-L5952
pve-container:
Christoph Heiss (1):
net: Add `link_down` config to allow setting interfaces as disconnected
src/PVE/LXC.pm | 20 +++++++++++++-------
src/PVE/LXC/Config.pm | 5 +++++
src/lxcnetaddbr | 3 ++-
3 files changed, 20 insertions(+), 8 deletions(-)
pve-manager:
Christoph Heiss (1):
lxc: Add `Disconnect` option for network interfaces
www/manager6/Parser.js | 3 +++
www/manager6/lxc/Network.js | 13 +++++++++++++
2 files changed, 16 insertions(+)
--
2.39.1
next reply other threads:[~2023-02-13 13:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-13 13:56 Christoph Heiss [this message]
2023-02-13 13:56 ` [pve-devel] [PATCH container 1/2] net: Add `link_down` config to allow setting interfaces as disconnected Christoph Heiss
2023-02-13 14:31 ` Wolfgang Bumiller
2023-02-14 9:29 ` Christoph Heiss
2023-02-14 9:52 ` Thomas Lamprecht
2023-02-14 10:10 ` Christoph Heiss
2023-02-14 10:20 ` Thomas Lamprecht
2023-02-13 13:57 ` [pve-devel] [PATCH manager 2/2] lxc: Add `Disconnect` option for network interfaces Christoph Heiss
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=20230213135700.502195-1-c.heiss@proxmox.com \
--to=c.heiss@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