mirror of
https://git.proxmox.com/git/qemu-server
synced 2026-01-27 01:12:06 +00:00
fix #2578: check if $target is provided in clone
regression introduced with commit a85ff91b
previously we set $target to undef if it's localnode or localhost, then
we check if node exists.
with regression commit, behaviour changes as we do the node check in
else, but $target may be undef. this causes an error:
no such cluster node ''
Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
improved readability
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
parent
2513b862e6
commit
d069275fc9
@ -2749,12 +2749,12 @@ __PACKAGE__->register_method({
|
||||
|
||||
my $localnode = PVE::INotify::nodename();
|
||||
|
||||
if ($target && ($target eq $localnode || $target eq 'localhost')) {
|
||||
if ($target eq $localnode || $target eq 'localhost') {
|
||||
undef $target;
|
||||
} else {
|
||||
PVE::Cluster::check_node_exists($target);
|
||||
}
|
||||
|
||||
PVE::Cluster::check_node_exists($target) if $target;
|
||||
|
||||
my $storecfg = PVE::Storage::config();
|
||||
|
||||
if ($storage) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user