mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-07-27 09:25:58 +00:00
vzdump: generate notes: initialize potentially undef values
For VMs, $task->{hostname} might be undef and when running on a stand-alone node, there is no cluster name. Reported-by: Marco Gabriel <mgabriel@inett.de> Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
This commit is contained in:
parent
facf65a6e0
commit
2078e35988
@ -97,8 +97,8 @@ my $generate_notes = sub {
|
||||
$verify_notes_template->($notes_template);
|
||||
|
||||
my $info = {
|
||||
cluster => PVE::Cluster::get_clinfo()->{cluster}->{name},
|
||||
guestname => $task->{hostname},
|
||||
cluster => PVE::Cluster::get_clinfo()->{cluster}->{name} // 'standalone node',
|
||||
guestname => $task->{hostname} // "VM $task->{vmid}", # is always set for CTs
|
||||
node => PVE::INotify::nodename(),
|
||||
vmid => $task->{vmid},
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user