Merge "Create Swift directory d1 if needed"
This commit is contained in:
commit
70f000daa0
@ -27,10 +27,20 @@
|
||||
# for more details.
|
||||
# Defaults to hiera('step')
|
||||
#
|
||||
# [*use_local_dir*]
|
||||
# (Optional) Creates a local directory to store data on the system disk
|
||||
# Defaults to true
|
||||
#
|
||||
# [*local_dir*]
|
||||
# (Optional) Defines the directory name to use for the local storage
|
||||
# Defaults to /srv/node/d1
|
||||
#
|
||||
class tripleo::profile::base::swift::storage (
|
||||
# Deprecated conditional to support ControllerEnableSwiftStorage parameter
|
||||
$enable_swift_storage = true,
|
||||
$step = Integer(hiera('step')),
|
||||
$use_local_dir = true,
|
||||
$local_dir = '/srv/node/d1',
|
||||
) {
|
||||
if $step >= 4 {
|
||||
if $enable_swift_storage {
|
||||
@ -50,6 +60,14 @@ class tripleo::profile::base::swift::storage (
|
||||
$swift_components = ['account', 'container', 'object']
|
||||
swift::storage::filter::recon { $swift_components : }
|
||||
swift::storage::filter::healthcheck { $swift_components : }
|
||||
if $use_local_dir {
|
||||
ensure_resource('file', $local_dir, {
|
||||
ensure => 'directory',
|
||||
owner => 'swift',
|
||||
group => 'swift',
|
||||
require => Package['swift'],
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,7 @@
|
||||
---
|
||||
fixes:
|
||||
- |
|
||||
Swift added a requirement to ensure that storage directories exist before
|
||||
using them. However, when local directories are used in Tripleo (storing
|
||||
data in /srv/node/d1), these are missing by default and thus Swift won't
|
||||
store any data. This fix creates this directory if needed.
|
Loading…
x
Reference in New Issue
Block a user