]> git.proxmox.com Git - pve-container.git/commitdiff
Use crm-command stop to allow shutdown with timeout and hard stop for HA
authorFabian Ebner <f.ebner@proxmox.com>
Thu, 14 Nov 2019 11:23:57 +0000 (12:23 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 14 Nov 2019 13:35:15 +0000 (14:35 +0100)
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
src/PVE/API2/LXC/Status.pm

index 1b7a71db70ba228c6495a98cc0e6aba148db9e28..166c731b131354f93247530ba6fad5e8b3183f59 100644 (file)
@@ -243,7 +243,7 @@ __PACKAGE__->register_method({
 
                print "Requesting HA stop for CT $vmid\n";
 
-               my $cmd = ['ha-manager', 'set',  "ct:$vmid", '--state', 'stopped'];
+               my $cmd = ['ha-manager', 'crm-command', 'stop', "ct:$vmid", '0'];
                PVE::Tools::run_command($cmd);
            };
 
@@ -325,7 +325,7 @@ __PACKAGE__->register_method({
 
                print "Requesting HA stop for CT $vmid\n";
 
-               my $cmd = ['ha-manager', 'set',  "ct:$vmid", '--state', 'stopped'];
+               my $cmd = ['ha-manager', 'crm-command', 'stop',  "ct:$vmid", "$timeout"];
                PVE::Tools::run_command($cmd);
            };