From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
Friedrich Weber <f.weber@proxmox.com>
Subject: [pve-devel] applied: [PATCH qemu-server] cloudinit: allow non-root users to set ciupgrade option
Date: Tue, 25 Jul 2023 11:54:34 +0200 [thread overview]
Message-ID: <bfba592b-6993-46b0-a4c0-3478638b900d@proxmox.com> (raw)
In-Reply-To: <20230724113348.120113-1-f.weber@proxmox.com>
On 24/07/2023 13:33, Friedrich Weber wrote:
> The new ciupgrade option was missing in $cloudinitoptions in
> PVE::API2::Qemu, so $check_vm_modify_config_perm defaulted to
> requiring root@pam for modifying the option. To fix this, add
> ciupgrade to $cloudinitoptions. This also fixes an issue where
> ciupgrade was missing in the output of `qm cloudinit pending`,
> as it also relies on $cloudinitoptions.
>
> This issue was originally reported in the forum [0].
>
> Also add a comment to avoid similar issues when adding new options in
> the future.
>
> [0]: https://forum.proxmox.com/threads/131043/
>
> Signed-off-by: Friedrich Weber <f.weber@proxmox.com>
> ---
>
> Notes:
> Not sure if this is the proper fix. Instead of maintaining two lists
> of cloudinit options, we could generate $cloudinitoptions from
> $confdesc_cloudinit?
It's not making anything worse and is a good stop-gap, but yeah those
list is a bit too distant from the schema definition.
How about a get_vm_user_cloudinit_options helper located directly
below the format definition, filtering out those keys that do not
make sense, or are off limits, and use that?
Maybe with some wider clean-up for the others? But this is also a
bit thankless work and would definitively need some test harness
to ensure no regression gets in.
>
> PVE/API2/Qemu.pm | 1 +
> PVE/QemuServer.pm | 1 +
> 2 files changed, 2 insertions(+)
>
>
applied, thanks!
next prev parent reply other threads:[~2023-07-25 9:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-24 11:33 [pve-devel] " Friedrich Weber
2023-07-25 9:54 ` Thomas Lamprecht [this message]
2023-07-25 13:55 ` [pve-devel] applied: " Friedrich Weber
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=bfba592b-6993-46b0-a4c0-3478638b900d@proxmox.com \
--to=t.lamprecht@proxmox.com \
--cc=f.weber@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.