[pve-devel] applied: [PATCH qemu-server] cloudinit: fix 'pending' api endpoint

Thomas Lamprecht t.lamprecht at proxmox.com
Wed Jun 7 18:36:58 CEST 2023


Am 11/05/2023 um 10:03 schrieb Leo Nunner:
> This patch partially reverts commit 1b5706cd168fedc5e494e24300069ee4ff25761f,
> by reintroducing the old format for return values (key, value, pending,
> delete), but drops the "force-delete" return value. Right now, this
> endpoint does not conform to its own format, because the return values
> are as follows:
> 
> {
>     key => {
> 	old => 'foo',
> 	new => 'bar',
>     },
>     […]
> }
> 
> While the format specified is
> 
> [
>     {
> 	key => 'baz',
> 	old => 'foo',
> 	new => 'bar',
>     },
>     […]
> ]
> 
> This leads to the endpoint being broken when used through 'qm' and
> 'pvesh'. Using the API works fine, because the format doesn't get
> verified there. Reverting this change brings the advantage that we can
> also use PVE::GuestHelpers::format_pending when calling the endpoint
> through qm again.
> 
> Signed-off-by: Leo Nunner <l.nunner at proxmox.com>
> ---
> I'm not sure whether or not this constitutes a breaking change. We are
> returning to the old format for this endpoint, and up until now it was
> broken anyway (well, for the CLI that is).
> 
>  PVE/API2/Qemu.pm | 48 ++++++++++++++++++++++++++++++++++--------------
>  1 file changed, 34 insertions(+), 14 deletions(-)
> 
>

applied, thanks! BUT, mainly @Wolfgang, I thought we figured that out ok back then,
can you re-check this please, I'd really like to stop this from coming back haunting
us 👻





More information about the pve-devel mailing list