[pve-devel] [PATCH manager 2/2] ceph: mon list: show only running when the monitor appears in quorum map

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


Am 7/15/19 um 10:20 AM schrieb Dominik Csapak:
> nautilus puts non running monitors also in the monmap, so
> only show as running when it has no quorum

s/no qurorum/quorum/ ??

> 
> this is also not 100% correct, but the only 'correct' alternative
> is to try and get/parse the systemd status of the units and broadcast
> it to the pmxcfs
> 
> Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
> ---
> we can of course parse systemd output via 'systemctl show <service>',
> but i am not sure if we want that only for 'running/stopped/failed' etc
> 
>  PVE/API2/Ceph/MON.pm | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/PVE/API2/Ceph/MON.pm b/PVE/API2/Ceph/MON.pm
> index b59d2e59..c3ec9f8f 100644
> --- a/PVE/API2/Ceph/MON.pm
> +++ b/PVE/API2/Ceph/MON.pm
> @@ -137,9 +137,9 @@ __PACKAGE__->register_method ({
>  		next if !defined($d->{name});
>  		$monhash->{$d->{name}}->{rank} = $d->{rank};
>  		$monhash->{$d->{name}}->{addr} = $d->{addr};
> -		$monhash->{$d->{name}}->{state} = 'running';
>  		if (grep { $_ eq $d->{rank} } @{$monstat->{quorum}}) {
>  		    $monhash->{$d->{name}}->{quorum} = 1;
> +		    $monhash->{$d->{name}}->{state} = 'running';
>  		}
>  	    }
>  
> 





More information about the pve-devel mailing list