Fix "Add lock_path to cinder config"

Amend Ia94b17e24ec179a1804bc78c8defc25d63f7a4d3 to be distro agnostic.

Change-Id: Ib94ebf2fd8e70001ad154460dc829d2f52bd1dce
Closes-Bug: #1482590
This commit is contained in:
Clayton O'Neill 2015-08-04 14:53:16 -04:00 committed by Jiri Stransky
parent 775b96af2f
commit 99b185c66f
3 changed files with 9 additions and 3 deletions

View File

@ -228,7 +228,7 @@
# [*lock_path*]
# (optional) Where to store lock files. This directory must be writeable
# by the user executing the agent
# Defaults to: /var/lock/cinder
# Defaults to: $::cinder::params::lock_path
#
# === Deprecated Parameters
#
@ -289,7 +289,7 @@ class cinder (
$default_availability_zone = false,
$enable_v1_api = true,
$enable_v2_api = true,
$lock_path = '/var/lock/cinder',
$lock_path = $::cinder::params::lock_path,
# DEPRECATED PARAMETERS
$mysql_module = undef,
) {

View File

@ -19,6 +19,7 @@ class cinder::params {
$ceph_init_override = '/etc/init/cinder-volume.override'
$iscsi_helper = 'tgtadm'
$lio_package_name = 'targetcli'
$lock_path = '/var/lock/cinder'
} elsif($::osfamily == 'RedHat') {
@ -37,6 +38,7 @@ class cinder::params {
$tgt_service_name = 'tgtd'
$ceph_init_override = '/etc/sysconfig/openstack-cinder-volume'
$lio_package_name = 'targetcli'
$lock_path = '/var/lib/cinder/tmp'
case $::operatingsystem {
'RedHat', 'CentOS', 'Scientific', 'OracleLinux': {

View File

@ -1,7 +1,11 @@
require 'spec_helper'
describe 'cinder' do
let :req_params do
{:rabbit_password => 'guest', :database_connection => 'mysql://user:password@host/database'}
{
:rabbit_password => 'guest',
:database_connection => 'mysql://user:password@host/database',
:lock_path => '/var/lock/cinder',
}
end
let :facts do