[pve-devel] [PATCH manager 1/2] pve5to6: check for ceph-volume osds

Thomas Lamprecht t.lamprecht at proxmox.com
Mon Jul 15 10:48:10 CEST 2019


Am 7/15/19 um 10:20 AM schrieb Dominik Csapak:
> do not warn in case there exist nautilus osds
> since the upgrade has to be done by the time a user should add new
> osds, it does not make sense to warn in that case
> 
> Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
> ---
>  PVE/CLI/pve5to6.pm | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/PVE/CLI/pve5to6.pm b/PVE/CLI/pve5to6.pm
> index 2724e33d..d3c8e2db 100644
> --- a/PVE/CLI/pve5to6.pm
> +++ b/PVE/CLI/pve5to6.pm
> @@ -561,8 +561,9 @@ sub check_ceph {
>      my $local_ceph_ver = PVE::Ceph::Tools::get_local_version(1);
>      if (defined($local_ceph_ver)) {
>  	if ($local_ceph_ver == 14) {
> +	    my $ceph_volume_osds = PVE::Ceph::Tools::ceph_volume_list();
>  	    my $scanned_osds = PVE::Tools::dir_glob_regex('/etc/ceph/osd', '^.*\.json$');
> -	    if (-e '/var/lib/ceph/osd/' && !defined($scanned_osds)) {
> +	    if (-e '/var/lib/ceph/osd/' && !defined($scanned_osds) && !(keys %$ceph_volume_osds)) {
>  		log_warn("local Ceph version is Nautilus, local OSDs detected, but no conversion from ceph-disk to ceph-volume done (yet).");
>  	    }
>  	}
> 

and the case where some OSDs did not got yet "upgraded" to ceph-volume/nautilus
but a new one was created cannot happen?

Wouldn't it be simpler do, instead of all above, just do a dir_glob_foreach
on "/var/lib/ceph/osd/*" and read require_osd_release (not sure if that's
enough as heuristic, but could be) and print this out per OSD (so the user
actually knows _which_ OSD(s) is the culprit)?




More information about the pve-devel mailing list