Fix default lock_path according to distribution default
- In RDO the lock_path parameter defaults to '/var/lib/manila/tmp' by dist.conf, and it is generally recommended. - In Ubuntu/Debian /var/lock/<service> is widely used as a directory to store lock information of the service. Change-Id: Ia742d0493c26aaeac757697c1a8b498feabf2467
This commit is contained in:
parent
e6a1626391
commit
814128c1dc
@ -105,7 +105,7 @@
|
||||
#
|
||||
# [*lock_path*]
|
||||
# (optional) Location to store Manila locks
|
||||
# Defaults to '/tmp/manila/manila_locks'
|
||||
# Defaults to $::manila::params::lock_path
|
||||
#
|
||||
# [*amqp_server_request_prefix*]
|
||||
# address prefix used when sending to a specific server
|
||||
@ -225,7 +225,7 @@ class manila (
|
||||
$storage_availability_zone = 'nova',
|
||||
$rootwrap_config = '/etc/manila/rootwrap.conf',
|
||||
$state_path = '/var/lib/manila',
|
||||
$lock_path = '/tmp/manila/manila_locks',
|
||||
$lock_path = $::manila::params::lock_path,
|
||||
$amqp_server_request_prefix = 'exclusive',
|
||||
$amqp_broadcast_prefix = 'broadcast',
|
||||
$amqp_group_request_prefix = 'unicast',
|
||||
@ -246,11 +246,10 @@ class manila (
|
||||
$report_interval = $::os_service_default,
|
||||
$periodic_interval = $::os_service_default,
|
||||
$periodic_fuzzy_delay = $::os_service_default,
|
||||
) {
|
||||
) inherits manila::params {
|
||||
|
||||
include manila::deps
|
||||
include manila::db
|
||||
include manila::params
|
||||
|
||||
if $use_ssl {
|
||||
if !$cert_file {
|
||||
|
@ -13,6 +13,7 @@ class manila::params {
|
||||
|
||||
case $::osfamily {
|
||||
'Debian': {
|
||||
$lock_path = '/var/lock/manila'
|
||||
$package_name = 'manila-common'
|
||||
$api_package = 'manila-api'
|
||||
$api_service = 'manila-api'
|
||||
@ -27,6 +28,7 @@ class manila::params {
|
||||
$nfs_client_package_name = 'nfs-common'
|
||||
}
|
||||
'RedHat': {
|
||||
$lock_path = '/var/lib/manila/tmp'
|
||||
$package_name = 'openstack-manila'
|
||||
$api_package = false
|
||||
$api_service = 'openstack-manila-api'
|
||||
|
@ -63,7 +63,7 @@ describe 'manila' do
|
||||
:value => '<SERVICE DEFAULT>'
|
||||
)
|
||||
is_expected.to contain_oslo__concurrency('manila_config').with(
|
||||
:lock_path => '/tmp/manila/manila_locks'
|
||||
:lock_path => platform_params[:lock_path]
|
||||
)
|
||||
end
|
||||
end
|
||||
@ -232,6 +232,19 @@ describe 'manila' do
|
||||
let (:facts) do
|
||||
facts.merge!(OSDefaults.get_facts({ :fqdn => 'some.host.tld'}))
|
||||
end
|
||||
let(:platform_params) do
|
||||
case facts[:osfamily]
|
||||
when 'Debian'
|
||||
{
|
||||
:lock_path => '/var/lock/manila'
|
||||
}
|
||||
when 'RedHat'
|
||||
{
|
||||
:lock_path => '/var/lib/manila/tmp'
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
it_behaves_like 'manila'
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user