all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH qemu-server] fix #3792: cloudinit: use of uninitialized value
@ 2021-12-20 14:03 Mira Limbeck
  2021-12-21 14:46 ` [pve-devel] applied: " Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Mira Limbeck @ 2021-12-20 14:03 UTC (permalink / raw)
  To: pve-devel

With the patch adding vendor-data support to cloud-init, a use of
uninitialized value was introduced. This can be fixed by setting it to
an empty string if no vendor-data is defined.

vendor-data can only be set via --cicustom and is optional.

Signed-off-by: Mira Limbeck <m.limbeck@proxmox.com>
---
 PVE/QemuServer/Cloudinit.pm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/PVE/QemuServer/Cloudinit.pm b/PVE/QemuServer/Cloudinit.pm
index cc8970c..b7daa2a 100644
--- a/PVE/QemuServer/Cloudinit.pm
+++ b/PVE/QemuServer/Cloudinit.pm
@@ -230,6 +230,7 @@ sub generate_configdrive2 {
     my ($user_data, $network_data, $meta_data, $vendor_data) = get_custom_cloudinit_files($conf);
     $user_data = cloudinit_userdata($conf, $vmid) if !defined($user_data);
     $network_data = configdrive2_network($conf) if !defined($network_data);
+    $vendor_data = '' if !defined($vendor_data);
 
     if (!defined($meta_data)) {
 	$meta_data = configdrive2_gen_metadata($user_data, $network_data);
@@ -486,6 +487,7 @@ sub generate_nocloud {
     my ($user_data, $network_data, $meta_data, $vendor_data) = get_custom_cloudinit_files($conf);
     $user_data = cloudinit_userdata($conf, $vmid) if !defined($user_data);
     $network_data = nocloud_network($conf) if !defined($network_data);
+    $vendor_data = '' if !defined($vendor_data);
 
     if (!defined($meta_data)) {
 	$meta_data = nocloud_gen_metadata($user_data, $network_data);
-- 
2.30.2





^ permalink raw reply	[flat|nested] 2+ messages in thread

* [pve-devel] applied: Re: [PATCH qemu-server] fix #3792: cloudinit: use of uninitialized value
  2021-12-20 14:03 [pve-devel] [PATCH qemu-server] fix #3792: cloudinit: use of uninitialized value Mira Limbeck
@ 2021-12-21 14:46 ` Thomas Lamprecht
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2021-12-21 14:46 UTC (permalink / raw)
  To: Proxmox VE development discussion, Mira Limbeck

On 20/12/2021 15:03, Mira Limbeck wrote:
> With the patch adding vendor-data support to cloud-init, a use of
> uninitialized value was introduced. This can be fixed by setting it to
> an empty string if no vendor-data is defined.
> 
> vendor-data can only be set via --cicustom and is optional.
> 
> Signed-off-by: Mira Limbeck <m.limbeck@proxmox.com>
> ---
>  PVE/QemuServer/Cloudinit.pm | 2 ++
>  1 file changed, 2 insertions(+)
> 
>

applied, thanks!




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-12-21 14:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-20 14:03 [pve-devel] [PATCH qemu-server] fix #3792: cloudinit: use of uninitialized value Mira Limbeck
2021-12-21 14:46 ` [pve-devel] applied: " Thomas Lamprecht

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.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal