mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-05-02 20:59:46 +00:00
fix #3792: cloudinit: use of uninitialized value
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>
This commit is contained in:
parent
a644de298c
commit
ea18b60455
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user