[pve-devel] [PATCH manager] fix #2200: do not forcestop cts during reboot
Thomas Lamprecht
t.lamprecht at proxmox.com
Tue May 7 18:32:06 CEST 2019
On 5/7/19 5:58 PM, Oguz Bektas wrote:
> 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 });
as an alternative you could also try to make pve-container behave the same
as qemu-server and allow a "force stop after a timeout" possibility, which
we'd actually like here, it would add some consistency too...
> } elsif ($type eq 'qemu') {
> return if !PVE::QemuServer::check_running($vmid, 1);
> my $timeout = defined($down_timeout) ? int($down_timeout) : 60*3;
>
More information about the pve-devel
mailing list