[pve-devel] applied: [PATCH qemu-server] Ignore version checks when using QEMU -rc releases

Thomas Lamprecht t.lamprecht at proxmox.com
Wed Apr 8 18:21:01 CEST 2020


On 4/8/20 5:11 PM, Stefan Reiter wrote:
> Upstream marks these as having a micro-version of >=90, unfortunately the
> machine versions are bumped earlier so testing them is made unnecessarily
> difficult, since the version checking code would abort on migrations etc...
> 
> Signed-off-by: Stefan Reiter <s.reiter at proxmox.com>
> ---
>  PVE/QemuServer.pm | 17 +++++++++++------
>  1 file changed, 11 insertions(+), 6 deletions(-)
> 
> diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
> index e9eb421..4d05db3 100644
> --- a/PVE/QemuServer.pm
> +++ b/PVE/QemuServer.pm
> @@ -2973,13 +2973,18 @@ sub config_to_command {
>  
>      $machine_version =~ m/(\d+)\.(\d+)/;
>      my ($machine_major, $machine_minor) = ($1, $2);
> -    die "Installed QEMU version '$kvmver' is too old to run machine type '$machine_type', please upgrade node '$nodename'\n"
> -	if !PVE::QemuServer::min_version($kvmver, $machine_major, $machine_minor);
>  
> -    if (!PVE::QemuServer::Machine::can_run_pve_machine_version($machine_version, $kvmver)) {
> -	my $max_pve_version = PVE::QemuServer::Machine::get_pve_version($machine_version);
> -	die "Installed qemu-server (max feature level for $machine_major.$machine_minor is pve$max_pve_version)"
> -	  . " is too old to run machine type '$machine_type', please upgrade node '$nodename'\n";
> +    if ($kvmver =~ m/^\d+\.\d+\.(\d+)/ && $1 >= 90) {
> +	warn "warning: Installed QEMU version ($kvmver) is a release candidate, ignoring version checks\n";
> +    } else {
> +	die "Installed QEMU version '$kvmver' is too old to run machine type '$machine_type', please upgrade node '$nodename'\n"
> +	    if !PVE::QemuServer::min_version($kvmver, $machine_major, $machine_minor);
> +
> +	if (!PVE::QemuServer::Machine::can_run_pve_machine_version($machine_version, $kvmver)) {
> +	    my $max_pve_version = PVE::QemuServer::Machine::get_pve_version($machine_version);
> +	    die "Installed qemu-server (max feature level for $machine_major.$machine_minor is pve$max_pve_version)"
> +	    . " is too old to run machine type '$machine_type', please upgrade node '$nodename'\n";
> +	}
>      }
>  
>      # if a specific +pve version is required for a feature, use $version_guard
> 

applied, but moved to a more linear 

if () {

} elseif () {

} elseif () {

}

structure. This block could be in it's own method, config_to_command is to
much spaghetti - and not the good Italian one ;-) anyway: thanks!




More information about the pve-devel mailing list