Signed-off-by: Dominik Csapak <d.csa...@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


_______________________________________________
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to