Ensure absolute path for file creation
This ensures the parameters used as file paths accept only absolute paths, so that more sensible errors are returned to users instead of the error from the file resource. Change-Id: If82751d8fc42e606593cf6c4a40651325e61872b
This commit is contained in:
parent
6bde164bd1
commit
3cb2b5472e
@ -170,28 +170,28 @@ define cinder::backend::netapp (
|
||||
$netapp_login,
|
||||
$netapp_password,
|
||||
$netapp_server_hostname,
|
||||
$volume_backend_name = $name,
|
||||
$backend_availability_zone = $facts['os_service_default'],
|
||||
$netapp_server_port = $facts['os_service_default'],
|
||||
$netapp_size_multiplier = $facts['os_service_default'],
|
||||
$netapp_storage_family = $facts['os_service_default'],
|
||||
$netapp_storage_protocol = 'nfs',
|
||||
$netapp_transport_type = $facts['os_service_default'],
|
||||
$netapp_vserver = $facts['os_service_default'],
|
||||
$expiry_thres_minutes = $facts['os_service_default'],
|
||||
$thres_avl_size_perc_start = $facts['os_service_default'],
|
||||
$thres_avl_size_perc_stop = $facts['os_service_default'],
|
||||
Optional[Array[String]] $nfs_shares = undef,
|
||||
$nfs_shares_config = '/etc/cinder/shares.conf',
|
||||
$nfs_mount_options = $facts['os_service_default'],
|
||||
$netapp_host_type = $facts['os_service_default'],
|
||||
Boolean $manage_volume_type = false,
|
||||
Hash $extra_options = {},
|
||||
$netapp_pool_name_search_pattern = $facts['os_service_default'],
|
||||
$nas_secure_file_operations = $facts['os_service_default'],
|
||||
$nas_secure_file_permissions = $facts['os_service_default'],
|
||||
$volume_backend_name = $name,
|
||||
$backend_availability_zone = $facts['os_service_default'],
|
||||
$netapp_server_port = $facts['os_service_default'],
|
||||
$netapp_size_multiplier = $facts['os_service_default'],
|
||||
$netapp_storage_family = $facts['os_service_default'],
|
||||
$netapp_storage_protocol = 'nfs',
|
||||
$netapp_transport_type = $facts['os_service_default'],
|
||||
$netapp_vserver = $facts['os_service_default'],
|
||||
$expiry_thres_minutes = $facts['os_service_default'],
|
||||
$thres_avl_size_perc_start = $facts['os_service_default'],
|
||||
$thres_avl_size_perc_stop = $facts['os_service_default'],
|
||||
Optional[Array[String]] $nfs_shares = undef,
|
||||
Stdlib::Absolutepath $nfs_shares_config = '/etc/cinder/shares.conf',
|
||||
$nfs_mount_options = $facts['os_service_default'],
|
||||
$netapp_host_type = $facts['os_service_default'],
|
||||
Boolean $manage_volume_type = false,
|
||||
Hash $extra_options = {},
|
||||
$netapp_pool_name_search_pattern = $facts['os_service_default'],
|
||||
$nas_secure_file_operations = $facts['os_service_default'],
|
||||
$nas_secure_file_permissions = $facts['os_service_default'],
|
||||
# DEPRECATED PARAMETERS
|
||||
$netapp_copyoffload_tool_path = undef,
|
||||
$netapp_copyoffload_tool_path = undef,
|
||||
) {
|
||||
|
||||
include cinder::deps
|
||||
|
@ -90,22 +90,22 @@
|
||||
# { 'nfs_backend/param1' => { 'value' => value1 } }
|
||||
#
|
||||
define cinder::backend::nfs (
|
||||
$volume_backend_name = $name,
|
||||
$backend_availability_zone = $facts['os_service_default'],
|
||||
Array[String] $nfs_servers = [],
|
||||
$nfs_mount_attempts = $facts['os_service_default'],
|
||||
$nfs_mount_options = $facts['os_service_default'],
|
||||
$nfs_sparsed_volumes = $facts['os_service_default'],
|
||||
$nfs_mount_point_base = $facts['os_service_default'],
|
||||
$nfs_shares_config = '/etc/cinder/shares.conf',
|
||||
$nfs_used_ratio = $facts['os_service_default'],
|
||||
$nfs_oversub_ratio = $facts['os_service_default'],
|
||||
$nas_secure_file_operations = $facts['os_service_default'],
|
||||
$nas_secure_file_permissions = $facts['os_service_default'],
|
||||
$nfs_snapshot_support = $facts['os_service_default'],
|
||||
$nfs_qcow2_volumes = $facts['os_service_default'],
|
||||
Boolean $manage_volume_type = false,
|
||||
Hash $extra_options = {},
|
||||
$volume_backend_name = $name,
|
||||
$backend_availability_zone = $facts['os_service_default'],
|
||||
Array[String] $nfs_servers = [],
|
||||
$nfs_mount_attempts = $facts['os_service_default'],
|
||||
$nfs_mount_options = $facts['os_service_default'],
|
||||
$nfs_sparsed_volumes = $facts['os_service_default'],
|
||||
$nfs_mount_point_base = $facts['os_service_default'],
|
||||
Stdlib::Absolutepath $nfs_shares_config = '/etc/cinder/shares.conf',
|
||||
$nfs_used_ratio = $facts['os_service_default'],
|
||||
$nfs_oversub_ratio = $facts['os_service_default'],
|
||||
$nas_secure_file_operations = $facts['os_service_default'],
|
||||
$nas_secure_file_permissions = $facts['os_service_default'],
|
||||
$nfs_snapshot_support = $facts['os_service_default'],
|
||||
$nfs_qcow2_volumes = $facts['os_service_default'],
|
||||
Boolean $manage_volume_type = false,
|
||||
Hash $extra_options = {},
|
||||
) {
|
||||
|
||||
include cinder::deps
|
||||
|
@ -65,18 +65,18 @@
|
||||
define cinder::backend::vstorage (
|
||||
$cluster_name,
|
||||
$cluster_password,
|
||||
$volume_backend_name = $name,
|
||||
$backend_availability_zone = $facts['os_service_default'],
|
||||
$shares_config_path = '/etc/cinder/vzstorage_shares',
|
||||
$use_sparsed_volumes = $facts['os_service_default'],
|
||||
$used_ratio = $facts['os_service_default'],
|
||||
$mount_point_base = $facts['os_service_default'],
|
||||
$default_volume_format = $facts['os_service_default'],
|
||||
Boolean $manage_volume_type = false,
|
||||
$mount_user = undef,
|
||||
$mount_group = 'root',
|
||||
$mount_permissions = '0770',
|
||||
Boolean $manage_package = true,
|
||||
$volume_backend_name = $name,
|
||||
$backend_availability_zone = $facts['os_service_default'],
|
||||
Stdlib::Absolutepath $shares_config_path = '/etc/cinder/vzstorage_shares',
|
||||
$use_sparsed_volumes = $facts['os_service_default'],
|
||||
$used_ratio = $facts['os_service_default'],
|
||||
$mount_point_base = $facts['os_service_default'],
|
||||
$default_volume_format = $facts['os_service_default'],
|
||||
Boolean $manage_volume_type = false,
|
||||
$mount_user = undef,
|
||||
$mount_group = 'root',
|
||||
$mount_permissions = '0770',
|
||||
Boolean $manage_package = true,
|
||||
) {
|
||||
|
||||
include cinder::deps
|
||||
|
@ -21,10 +21,10 @@
|
||||
# Defaults to '/var/lib/cinder'.
|
||||
#
|
||||
class cinder::setup_test_volume(
|
||||
$volume_name = 'cinder-volumes',
|
||||
$volume_path = '/var/lib/cinder',
|
||||
$size = '4G',
|
||||
$loopback_device = '/dev/loop2'
|
||||
String[1] $volume_name = 'cinder-volumes',
|
||||
Stdlib::Absolutepath $volume_path = '/var/lib/cinder',
|
||||
$size = '4G',
|
||||
$loopback_device = '/dev/loop2'
|
||||
) {
|
||||
|
||||
include cinder::deps
|
||||
|
Loading…
x
Reference in New Issue
Block a user