From: "Michael Köppl" <m.koeppl@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [RFC PATCH] ui: lxc: set nesting to false for privileged container during creation
Date: Tue, 18 Mar 2025 17:14:37 +0100 [thread overview]
Message-ID: <20250318161437.175820-1-m.koeppl@proxmox.com> (raw)
The current implementation is slightly misleading. When creating a
privileged container, the nesting checkbox is disabled but keeps its
current state. However, nesting is not enabled for privileged containers
even if the checkbox was set to true. Enabling nesting is still possible
through the Options menu.
Signed-off-by: Michael Köppl <m.koeppl@proxmox.com>
---
As an alternative to this, since we already discourage
the use of privileged containers [0], removing the checkbox for creating privileged
containers in the web UI might make sense. For the rare cases where they
are required, they can still be created using pct (although the question
remains whether privileged should be the default for pct create).
[0] https://forum.proxmox.com/threads/debian-12-lxc-template-systemd-failures.151630/post-686850
www/manager6/lxc/CreateWizard.js | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/www/manager6/lxc/CreateWizard.js b/www/manager6/lxc/CreateWizard.js
index 62cda27a..c7ee56f7 100644
--- a/www/manager6/lxc/CreateWizard.js
+++ b/www/manager6/lxc/CreateWizard.js
@@ -7,6 +7,7 @@ Ext.define('PVE.lxc.CreateWizard', {
nodename: '',
storage: '',
unprivileged: true,
+ nestingEnabled: true,
},
formulas: {
cgroupMode: function(get) {
@@ -69,14 +70,22 @@ Ext.define('PVE.lxc.CreateWizard', {
value: '{unprivileged}',
},
fieldLabel: gettext('Unprivileged container'),
+ listeners: {
+ change: function(checkbox, value) {
+ var viewModel = checkbox.lookupViewModel();
+ if (!value && viewModel) {
+ viewModel.set('nestingEnabled', false);
+ }
+ },
+ },
},
{
xtype: 'proxmoxcheckbox',
name: 'features',
inputValue: 'nesting=1',
- value: true,
bind: {
disabled: '{!unprivileged}',
+ value: '{nestingEnabled}',
},
fieldLabel: gettext('Nesting'),
},
--
2.39.5
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
next reply other threads:[~2025-03-18 16:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-18 16:14 Michael Köppl [this message]
2025-03-21 7:58 ` Thomas Lamprecht
2025-03-21 10:38 ` Michael Köppl
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=20250318161437.175820-1-m.koeppl@proxmox.com \
--to=m.koeppl@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
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal