Puppet Class: manila::share
- Defined in:
- manifests/share.pp
Overview
Class: manila::share
Parameters
- package_ensure
-
(Optional) Ensure State for package Defaults to ‘present’.
- enabled
-
(Optional) Should the service be enabled Defaults to true.
- manage_service
-
(Optional) Whether the service should be managed by Puppet Defaults to true.
- delete_share_server_with_last_share
-
(Optional) Wheather share servers will be deleted on deletion of the last share. Defaults to $facts.
- unmanage_remove_access_rules
-
(Optional) Deny access and remove all access rules on share unmanage. Defaults to $facts.
- automatic_share_server_cleanup
-
(Optional) Delete all share servers which were unused more than specified time. Defaults to $facts.
- unused_share_server_cleanup_interval
-
(Optional) Unallocated share servers reclamation time interval (minutes). Defaults to $facts.
- replica_state_update_interval
-
(Optional) Interval to poll for the health of each replica instance. Defaults to $facts.
- migration_driver_continue_update_interval
-
(Optional) Interval to poll the driver to perform the next step of migration in the storage backend, for a migration share. Defaults to $facts.
- server_migration_driver_continue_update_interval
-
(Optional) Interval to poll the driver to perform the next step of migration in the storage backend, for a migration share server. Defaults to $facts.
- share_usage_size_update_interval
-
(Optional) Interval to poll the driver to update the share usage size in the storage backend. Defaults to $facts.
- enable_gathering_share_usage_size
-
(Optional) Poll share usage size. Usage data can be consumed by telemetry integration. Defaults to $facts.
- share_service_inithost_offload
-
(Optional) Offload pending share ensure during share service startup. Defaults to $facts.
- check_for_expired_shares_in_recycle_bin_interval
-
(Optional) Interval to check for expired shares and delete them from the Recycle bin. Defaults to $facts.
- check_for_expired_transfers
-
(Optional) Interval to check for expired transfers and destroy them and roll back share state. Defaults to $facts.
- driver_backup_continue_update_interval
-
(Optional) Interval to poll to perform the next steps of backup. Defaults to $facts.
- driver_restore_continue_update_interval
-
(Optional) Interval to poll to perform the next steps of restore. Defaults to $facts.
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 |
# File 'manifests/share.pp', line 81
class manila::share (
$package_ensure = 'present',
Boolean $enabled = true,
Boolean $manage_service = true,
$delete_share_server_with_last_share = $facts['os_service_default'],
$unmanage_remove_access_rules = $facts['os_service_default'],
$automatic_share_server_cleanup = $facts['os_service_default'],
$unused_share_server_cleanup_interval = $facts['os_service_default'],
$replica_state_update_interval = $facts['os_service_default'],
$migration_driver_continue_update_interval = $facts['os_service_default'],
$server_migration_driver_continue_update_interval = $facts['os_service_default'],
$share_usage_size_update_interval = $facts['os_service_default'],
$enable_gathering_share_usage_size = $facts['os_service_default'],
$share_service_inithost_offload = $facts['os_service_default'],
$check_for_expired_shares_in_recycle_bin_interval = $facts['os_service_default'],
$check_for_expired_transfers = $facts['os_service_default'],
$driver_backup_continue_update_interval = $facts['os_service_default'],
$driver_restore_continue_update_interval = $facts['os_service_default'],
) {
include manila::deps
include manila::params
if $::manila::params::share_package {
package { 'manila-share':
ensure => $package_ensure,
name => $::manila::params::share_package,
tag => ['openstack', 'manila-package'],
}
}
manila_config {
'DEFAULT/delete_share_server_with_last_share': value => $delete_share_server_with_last_share;
'DEFAULT/unmanage_remove_access_rules': value => $unmanage_remove_access_rules;
'DEFAULT/automatic_share_server_cleanup': value => $automatic_share_server_cleanup;
'DEFAULT/unused_share_server_cleanup_interval': value => $unused_share_server_cleanup_interval;
'DEFAULT/replica_state_update_interval': value => $replica_state_update_interval;
'DEFAULT/migration_driver_continue_update_interval': value => $migration_driver_continue_update_interval;
'DEFAULT/server_migration_driver_continue_update_interval': value => $server_migration_driver_continue_update_interval;
'DEFAULT/share_usage_size_update_interval': value => $share_usage_size_update_interval;
'DEFAULT/enable_gathering_share_usage_size': value => $enable_gathering_share_usage_size;
'DEFAULT/share_service_inithost_offload': value => $share_service_inithost_offload;
'DEFAULT/check_for_expired_shares_in_recycle_bin_interval': value => $check_for_expired_shares_in_recycle_bin_interval;
'DEFAULT/check_for_expired_transfers': value => $check_for_expired_transfers;
'DEFAULT/driver_backup_continue_update_interval': value => $driver_backup_continue_update_interval;
'DEFAULT/driver_restore_continue_update_interval': value => $driver_restore_continue_update_interval;
}
if $manage_service {
if $enabled {
$ensure = 'running'
} else {
$ensure = 'stopped'
}
service { 'manila-share':
ensure => $ensure,
name => $::manila::params::share_service,
enable => $enabled,
hasstatus => true,
tag => 'manila-service',
}
}
}
|