[pve-devel] [PATCH manager] fix #2200: do not forcestop cts during reboot

Oguz Bektas o.bektas at proxmox.com
Tue May 7 17:58:09 CEST 2019


we set forceStop parameter to 0 by default, to avoid containers being
abruptly stopped during a host system reboot/poweroff.

Signed-off-by: Oguz Bektas <o.bektas at proxmox.com>
---
 PVE/API2/Nodes.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PVE/API2/Nodes.pm b/PVE/API2/Nodes.pm
index df47be1f..6dc9e26a 100644
--- a/PVE/API2/Nodes.pm
+++ b/PVE/API2/Nodes.pm
@@ -1678,7 +1678,7 @@ my $create_stop_worker = sub {
 	my $timeout =  defined($down_timeout) ? int($down_timeout) : 60;
 	print STDERR "Stopping CT $vmid (timeout = $timeout seconds)\n";
 	$upid = PVE::API2::LXC::Status->vm_shutdown({node => $nodename, vmid => $vmid,
-					     timeout => $timeout, forceStop => 1 });
+					     timeout => $timeout, forceStop => 0 });
     } elsif ($type eq 'qemu') {
 	return if !PVE::QemuServer::check_running($vmid, 1);
 	my $timeout =  defined($down_timeout) ? int($down_timeout) : 60*3;
-- 
2.11.0





More information about the pve-devel mailing list