diff options
Diffstat (limited to 'manifests/profile/pacemaker/manila.pp')
-rw-r--r-- | manifests/profile/pacemaker/manila.pp | 145 |
1 files changed, 101 insertions, 44 deletions
diff --git a/manifests/profile/pacemaker/manila.pp b/manifests/profile/pacemaker/manila.pp index 37cab9f..a7f91fc 100644 --- a/manifests/profile/pacemaker/manila.pp +++ b/manifests/profile/pacemaker/manila.pp @@ -22,86 +22,120 @@ # (Optional) The hostname of the node responsible for bootstrapping tasks # Defaults to hiera('bootstrap_nodeid') # -# [*step*] -# (Optional) The current step in deployment. See tripleo-heat-templates -# for more details. -# Defaults to hiera('step') +# [*cinder_volume_type*] +# (Optional) +# Defaults to hiera('manila::backend::generic::cinder_volume_type', '') +# +# [*driver_handles_share_servers*] +# (Optional) +# Defaults to hiera('manila::backend::generic::driver_handles_share_servers') # # [*manila_generic_enable*] # (Optional) Enable the generic backend. # Defaults to hiera('manila_generic_enable_backend', 'false') # -# [*driver_handles_share_servers*] +# [*max_time_to_attach*] # (Optional) -# Defaults to hiera('manila::backend::generic::driver_handles_share_servers') +# Defaults to hiera('manila::backend::generic::max_time_to_attach') +# +# [*max_time_to_create_volume*] +# (Optional) +# Defaults to hiera('manila::backend::generic::max_time_to_create_volume') +# +# [*service_instance_flavor_id*] +# (Optional) +# Defaults to hiera('manila::service_instance::service_instance_flavor_id') +# +# [*service_instance_password*] +# (Optional) +# Defaults to hiera('manila::service_instance::service_instance_password') +# +# [*service_instance_smb_config_path*] +# (Optional) +# Defaults to downcase(hiera('manila::backend::generic::service_instance_smb_config_path')) +# +# [*service_instance_user*] +# (Optional) +# Defaults to hiera('manila::service_instance::service_instance_user') +# +# [*share_mount_path*] +# (Optional) +# Defaults to hiera('manila::backend::generic::share_mount_path') +# +# [*share_volume_fstype*] +# (Optional) +# Defaults to hiera('manila::backend::generic::share_volume_fstype') # # [*smb_template_config_path*] # (Optional) # Defaults to hiera('manila::backend::generic::smb_template_config_path') # +# [*step*] +# (Optional) The current step in deployment. See tripleo-heat-templates +# for more details. +# Defaults to hiera('step') +# # [*volume_name_template*] # (Optional) # Defaults to hiera('manila::backend::generic::volume_name_template') - +# # [*volume_snapshot_name_template*] # (Optional) # Defaults to hiera('manila::backend::generic::volume_snapshot_name_template') # -# [*share_mount_path*] -# (Optional) -# Defaults to hiera('manila::backend::generic::share_mount_path') +# [*manila_cephfsnative_enable*] +# (Optional) Enable the CephFS Native backend. +# Defaults to hiera('manila_cephfsnative_enable_backend', 'false') # -# [*max_time_to_create_volume*] +# [*cephfs_handles_share_servers*] # (Optional) -# Defaults to hiera('manila::backend::generic::max_time_to_create_volume') +# Defaults to hiera('manila::backend::cephfsnative::driver_handles_share_servers', false) # -# [*max_time_to_attach*] +# [*cephfs_backend_name*] # (Optional) -# Defaults to hiera('manila::backend::generic::max_time_to_attach') +# Defaults to hiera('manila::backend::cephfsnative::cephfs_backend_name') # -# [*service_instance_smb_config_path*] +# [*cephfs_conf_path*] # (Optional) -# Defaults to downcase(hiera('manila::backend::generic::service_instance_smb_config_path')) +# Defaults to hiera('manila::backend::cephfsnative::cephfs_conf_path') # -# [*share_volume_fstype*] +# [*cephfs_auth_id*] # (Optional) -# Defaults to hiera('manila::backend::generic::share_volume_fstype') +# Defaults to hiera('manila::backend::cephfsnative::cephfs_auth_id') # -# [*cinder_volume_type*] +# [*cephfs_cluster_name*] # (Optional) -# Defaults to hiera('manila::backend::generic::cinder_volume_type', '') +# Defaults to hiera('manila::backend::cephfsnative::cephfs_cluster_name') # -# [*service_instance_user*] +# [*cephfs_enable_snapshots*] # (Optional) -# Defaults to hiera('manila::service_instance::service_instance_user') - -# [*service_instance_password*] -# (Optional) -# Defaults to hiera('manila::service_instance::service_instance_password') - -# [*service_instance_flavor_id*] -# (Optional) -# Defaults to hiera('manila::service_instance::service_instance_flavor_id') +# Defaults to hiera('manila::backend::cephfsnative::cephfs_enable_snapshots') # class tripleo::profile::pacemaker::manila ( $bootstrap_node = hiera('bootstrap_nodeid'), - $step = hiera('step'), - $manila_generic_enable = hiera('manila_generic_enable_backend', false), + $cinder_volume_type = hiera('manila::backend::generic::cinder_volume_type', ''), $driver_handles_share_servers = hiera('manila::backend::generic::driver_handles_share_servers'), - $smb_template_config_path = hiera('manila::backend::generic::smb_template_config_path'), - $volume_name_template = hiera('manila::backend::generic::volume_name_template'), - $volume_snapshot_name_template = hiera('manila::backend::generic::volume_snapshot_name_template'), - $share_mount_path = hiera('manila::backend::generic::share_mount_path'), - $max_time_to_create_volume = hiera('manila::backend::generic::max_time_to_create_volume'), + $manila_generic_enable = hiera('manila_generic_enable_backend', false), $max_time_to_attach = hiera('manila::backend::generic::max_time_to_attach'), + $max_time_to_create_volume = hiera('manila::backend::generic::max_time_to_create_volume'), + $service_instance_flavor_id = hiera('manila::service_instance::service_instance_flavor_id'), + $service_instance_password = hiera('manila::service_instance::service_instance_password'), $service_instance_smb_config_path = hiera('manila::backend::generic::service_instance_smb_config_path'), - $share_volume_fstype = hiera('manila::backend::generic::share_volume_fstype'), - $cinder_volume_type = hiera('manila::backend::generic::cinder_volume_type', ''), $service_instance_user = hiera('manila::service_instance::service_instance_user'), - $service_instance_password = hiera('manila::service_instance::service_instance_password'), - $service_instance_flavor_id = hiera('manila::service_instance::service_instance_flavor_id'), + $share_mount_path = hiera('manila::backend::generic::share_mount_path'), + $share_volume_fstype = hiera('manila::backend::generic::share_volume_fstype'), + $smb_template_config_path = hiera('manila::backend::generic::smb_template_config_path'), + $step = hiera('step'), + $volume_name_template = hiera('manila::backend::generic::volume_name_template'), + $volume_snapshot_name_template = hiera('manila::backend::generic::volume_snapshot_name_template'), + $manila_cephfsnative_enable = hiera('manila::backend::cephfsnative::enable_backend', false), + $cephfs_handles_share_servers = hiera('manila::backend::cephfsnative::driver_handles_share_servers'), + $cephfs_backend_name = hiera('manila::backend::cephfsnative::cephfs_backend_name'), + $cephfs_conf_path = hiera('manila::backend::cephfsnative::cephfs_conf_path'), + $cephfs_auth_id = hiera('manila::backend::cephfsnative::cephfs_auth_id'), + $cephfs_cluster_name = hiera('manila::backend::cephfsnative::cephfs_cluster_name'), + $cephfs_enable_snapshots = hiera('manila::backend::cephfsnative::cephfs_enable_snapshots'), ) { - if $::hostname == downcase($bootstrap_node) { $pacemaker_master = true } else { @@ -122,7 +156,6 @@ class tripleo::profile::pacemaker::manila ( include ::tripleo::profile::base::manila::scheduler include ::tripleo::profile::base::manila::share - $manila_generic_enable = hiera('manila_generic_enable_backend', false) if $manila_generic_enable { $manila_generic_backend = hiera('manila::backend::generic::title') manila::backend::generic { $manila_generic_backend : @@ -147,10 +180,34 @@ class tripleo::profile::pacemaker::manila ( include ::manila::volume::cinder } - $manila_enabled_backends = delete_undef_values([$manila_generic_backend]) + # manila cephfsnative: + if $manila_cephfsnative_enable { + $manila_cephfsnative_backend = hiera('manila::backend::cephfsnative::title') + manila::backend::cephfsnative { $manila_cephfsnative_backend : + driver_handles_share_servers => $cephfs_handles_share_servers, + cephfs_backend_name => $cephfs_backend_name, + cephfs_conf_path => $cephfs_conf_path, + cephfs_auth_id => $cephfs_auth_id, + cephfs_cluster_name => $cephfs_cluster_name, + cephfs_enable_snapshots => $cephfs_enable_snapshots, + } + } + + $manila_enabled_backends = delete_undef_values( + [ + $manila_generic_backend, + $manila_cephfsnative_backend + ] + ) class { '::manila::backends' : enabled_share_backends => $manila_enabled_backends, } + + if $pacemaker_master and hiera('stack_action') == 'UPDATE' { + Manila_api_paste_ini<||> ~> Tripleo::Pacemaker::Resource_restart_flag["${::manila::params::share_service}"] + Manila_config<||> ~> Tripleo::Pacemaker::Resource_restart_flag["${::manila::params::share_service}"] + tripleo::pacemaker::resource_restart_flag { "${::manila::params::share_service}": } + } } if $step >= 5 and $pacemaker_master { |