[pve-devel] [PATCH manager] fix #1828: check if targetnode exists before starting mass migration
Dominik Csapak
d.csapak at proxmox.com
Fri Aug 10 11:18:25 CEST 2018
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
PVE/API2/Nodes.pm | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/PVE/API2/Nodes.pm b/PVE/API2/Nodes.pm
index 5ba1002d..836dccaf 100644
--- a/PVE/API2/Nodes.pm
+++ b/PVE/API2/Nodes.pm
@@ -1765,7 +1765,12 @@ __PACKAGE__->register_method ({
my $nodename = $param->{node};
$nodename = PVE::INotify::nodename() if $nodename eq 'localhost';
- my $target = $param->{target};
+ my $target = $param->{target};
+ raise_param_exc({ target => "target is local node."}) if $target eq $nodename;
+
+ PVE::Cluster::check_cfs_quorum();
+
+ PVE::Cluster::check_node_exists($target);
my $datacenterconfig = cfs_read_file('datacenter.cfg');
# prefer parameter over datacenter cfg settings
--
2.11.0
More information about the pve-devel
mailing list