[pve-devel] [PATCH qemu-server] api resume: drop nocheck parameter

Fabian Grünbichler f.gruenbichler at proxmox.com
Wed Aug 7 13:57:58 CEST 2019


On May 25, 2019 5:09 pm, Thomas Lamprecht wrote:
> Once, this was used when transferring the VM state finsihed on a
> migration to another node to resume the VM there again, it was called
> through SSH using the 'qm resume' command, which bases on this API
> call.
> 
> As we switched over to a mechanism re-using our "migration tunnel",
> which stays open during the whole connection, as command tunnel we
> resumed the VM directly from there, omitting an extra SSH connection.
> 
> As we _require_ people to upgrade to latest 5.4 before upgrading to
> 6.0 we can safely drop this now.

while going through my pve-devel backlog, I noticed that we didn't 
actually apply this in time for 6.x - do we still want to drop this 
(since it was basically added for one internal use case) or just mark it 
for removal in PVE 7.x (it is part of the public API :-/)

> 
> Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
> ---
>  PVE/API2/Qemu.pm | 8 ++------
>  1 file changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm
> index a628a20..3d3802b 100644
> --- a/PVE/API2/Qemu.pm
> +++ b/PVE/API2/Qemu.pm
> @@ -2463,8 +2463,6 @@ __PACKAGE__->register_method({
>  	    vmid => get_standard_option('pve-vmid',
>  					{ completion => \&PVE::QemuServer::complete_vmid_running }),
>  	    skiplock => get_standard_option('skiplock'),
> -	    nocheck => { type => 'boolean', optional => 1 },
> -
>  	},
>      },
>      returns => {
> @@ -2485,8 +2483,6 @@ __PACKAGE__->register_method({
>  	raise_param_exc({ skiplock => "Only root may use this option." })
>  	    if $skiplock && $authuser ne 'root at pam';
>  
> -	my $nocheck = extract_param($param, 'nocheck');
> -
>  	my $to_disk_suspended;
>  	eval {
>  	    PVE::QemuConfig->lock_config($vmid, sub {
> @@ -2496,7 +2492,7 @@ __PACKAGE__->register_method({
>  	};
>  
>  	die "VM $vmid not running\n"
> -	    if !$to_disk_suspended && !PVE::QemuServer::check_running($vmid, $nocheck);
> +	    if !$to_disk_suspended && !PVE::QemuServer::check_running($vmid);
>  
>  	my $realcmd = sub {
>  	    my $upid = shift;
> @@ -2504,7 +2500,7 @@ __PACKAGE__->register_method({
>  	    syslog('info', "resume VM $vmid: $upid\n");
>  
>  	    if (!$to_disk_suspended) {
> -		PVE::QemuServer::vm_resume($vmid, $skiplock, $nocheck);
> +		PVE::QemuServer::vm_resume($vmid, $skiplock);
>  	    } else {
>  		my $storecfg = PVE::Storage::config();
>  		PVE::QemuServer::vm_start($storecfg, $vmid, undef, $skiplock);
> -- 
> 2.20.1
> 
> 
> _______________________________________________
> pve-devel mailing list
> pve-devel at pve.proxmox.com
> https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
> 



More information about the pve-devel mailing list