[pve-devel] applied: [PATCH manager] api: ceph: automatically create manager after the first monitor

Thomas Lamprecht t.lamprecht at proxmox.com
Wed Jul 3 15:35:35 CEST 2019


On 7/3/19 2:40 PM, Tim Marx wrote:
> Signed-off-by: Tim Marx <t.marx at proxmox.com>
> ---
>  PVE/API2/Ceph/MON.pm | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/PVE/API2/Ceph/MON.pm b/PVE/API2/Ceph/MON.pm
> index e8963264..4090612d 100644
> --- a/PVE/API2/Ceph/MON.pm
> +++ b/PVE/API2/Ceph/MON.pm
> @@ -16,6 +16,7 @@ use PVE::RESTHandler;
>  use PVE::RPCEnvironment;
>  use PVE::Tools qw(run_command file_set_contents);
>  use PVE::CephConfig;
> +use PVE::API2::Ceph::MGR;
>  
>  use base qw(PVE::RESTHandler);
>  
> @@ -282,6 +283,14 @@ __PACKAGE__->register_method ({
>  		PVE::Ceph::Services::broadcast_ceph_services();
>  	    });
>  	    die $@ if $@;
> +	    # automatically create manager after the first monitor is created
> +	    if (scalar(keys %$monhash) eq 0) {
> +
> +		PVE::API2::Ceph::MGR->createmgr({
> +		    node => $param->{node},
> +		    id => $param->{node}
> +		})
> +	    }
>  	};
>  
>  	return $rpcenv->fork_worker('cephcreatemon', $monsection, $authuser, $worker);
> 

applied, thanks!




More information about the pve-devel mailing list