[pve-devel] [PATCH manager] pve5to6: Add warning for some Gluster versions

Thomas Lamprecht t.lamprecht at proxmox.com
Mon Aug 26 12:04:50 CEST 2019


On 01.08.19 11:21, Dominic Jäger wrote:
> Upgrading from PVE 5 to 6 works only with the Gluster packages from the
> Debian repository. At least Gluster versions 5.8 to 6.4-1 have conflicts
> with our packages.
> 
> Signed-off-by: Dominic Jäger <d.jaeger at proxmox.com>
> ---
> Tested on one VM with PVE 5.4 and upstream Gluster (6.4-1) and one
> with PVE 5.4 and the Debian Gluster packages (3.8). The upgrade gives
> the expected conflicts. The error message remains useful after the
> (erroneous) upgrade.
> 
>  PVE/CLI/pve5to6.pm | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
> 
> diff --git a/PVE/CLI/pve5to6.pm b/PVE/CLI/pve5to6.pm
> index 7b1050e3..7748b5e8 100644
> --- a/PVE/CLI/pve5to6.pm
> +++ b/PVE/CLI/pve5to6.pm
> @@ -220,6 +220,23 @@ sub get_vms_with_vmx {
>      return $res;
>  }
>  
> +# The upgrade works if Gluster 5.5-3 is installed . This is packaged in Debian.
> +# There are conflicts with more recent versions (from gluster.org) of Gluster.
> +# Consequently, warn if gluster is not installed from debian packages but
> +# from the gluster repos. See bug 2269.
> +sub check_gluster {
> +    log_info("Checking GlusterFS version.");
> +    my $stdout = `dpkg -s glusterfs-common`;
> +    # Patrick Matthäi is the maintainer of the Gluster Debian package
> +    # The package from the Gluster repo has 'Gluster Packager' as maintainer
> +    my $debian_maintainer = 'Maintainer: Patrick Matthäi';
> +    if (index($stdout, $debian_maintainer) == -1) {

Hmm, not fully happy with that check method. Would it be enough to know
what version the glusterfs-client package is? As that info would be already
available here, as it is included in our api APT versions call [0] which we
cache here.

[0]: https://git.proxmox.com/?p=pve-manager.git;a=blob;f=PVE/API2/APT.pm;h=fa76d0127c5d34d97cc9fb1d608ab15ad9864b61;hb=refs/heads/stable-5#l526

You could just do:
my $pkg_info = $get_pkg->('glusterfs-client');

and check "OldVersion" or maybe even the "ChangeLogUrl" hash entry, I did
not checked myself, but it would make sense if that points to either debian.org
or download.gluster.org depending on where this package comes from.

> +	log_warn('Your version of GlusterFS is not maintained by Debian. Beware that there is a problem with PVE 6 and Gluster packages that are from a different source. See https://bugzilla.proxmox.com/show_bug.cgi?id=2269.');

Instead of:
"Beware that there is a problem with PVE 6 and Gluster packages that are from a different source. See ..."
maybe:

"Such GlusterFS packages may not be usable with Proxmox VE 6. For details, see <https://bugzilla.proxmox.com/show_bug.cgi?id=2269>."



> +    } else {
> +	log_pass("Your GlusterFS version is supported.");
> +    }
> +}
> +
>  sub check_kvm_nested {
>      log_info("Checking KVM nesting support, which breaks live migration for VMs using it..");
>  
> @@ -664,6 +681,7 @@ sub check_misc {
>      }
>  
>      check_kvm_nested();
> +    check_gluster();
>  }
>  
>  __PACKAGE__->register_method ({
> 





More information about the pve-devel mailing list