[pve-devel] [PATCH] if rootdir is used as content type on Ceph then automatic use krbd mode.

Dietmar Maurer dietmar at proxmox.com
Wed Sep 9 07:28:39 CEST 2015


I do really not want to change to krbd mode automatically...

On 09/08/2015 12:24 PM, Wolfgang Link wrote:
> We only activate krbd automatically, but do not deactivate it,
> if rootdir will removed from Ceph storage config.
>
> This must be done manually, to prevent if qemu should use krbd.
> ---
>   PVE/Storage/RBDPlugin.pm | 10 ++++++++++
>   1 file changed, 10 insertions(+)
>
> diff --git a/PVE/Storage/RBDPlugin.pm b/PVE/Storage/RBDPlugin.pm
> index e600ec1..329fd23 100644
> --- a/PVE/Storage/RBDPlugin.pm
> +++ b/PVE/Storage/RBDPlugin.pm
> @@ -597,4 +597,14 @@ sub volume_has_feature {
>       return undef;
>   }
>   
> +sub check_config {
> +    my ($class, $sectionId, $config, $create, $skipSchemaCheck) = @_;
> +
> +    my $settings = $class->SUPER::check_config($sectionId, $config, $create, $skipSchemaCheck);
> +
> +    $settings->{krbd} = 1 if $settings->{content}->{rootdir};
> +
> +    return $settings;
> +}
> +
>   1;





More information about the pve-devel mailing list