From f6108f5dab9501ec4a91449e2faaae5ec894c379 Mon Sep 17 00:00:00 2001 From: Christian Schwede Date: Thu, 2 Nov 2017 17:04:52 +0000 Subject: [PATCH] Create Swift directory d1 if required Swift added a requirement that storage directories must exist before using them. In case of the d1 directory in TripleO - used when there are no "real disks" - it has to be created by TripleO in advance. This change forwards the SwiftUseLocalDir parameter to puppet-tripleo, which creates the directory with the correct permissions. Closes-Bug: 1729569 Depends-On: I49e395ac379ced01adb60d8d9f951c08718b1c61 Change-Id: I82b783541c6097f6b8747b63349720c47f3b3f94 --- puppet/services/swift-storage.yaml | 5 +++++ .../notes/swift-create-local-dir-7671f7967620e261.yaml | 6 ++++++ 2 files changed, 11 insertions(+) create mode 100644 releasenotes/notes/swift-create-local-dir-7671f7967620e261.yaml diff --git a/puppet/services/swift-storage.yaml b/puppet/services/swift-storage.yaml index ffffbcb1a4..660e4e0bcf 100644 --- a/puppet/services/swift-storage.yaml +++ b/puppet/services/swift-storage.yaml @@ -57,6 +57,10 @@ parameters: default: auto description: Number of workers for Swift account service. type: string + SwiftUseLocalDir: + default: true + description: 'Use a local directory for Swift storage services when building rings' + type: boolean # DEPRECATED options for compatibility with overcloud.yaml # This should be removed and manipulation of the ControllerServices list @@ -105,6 +109,7 @@ outputs: - get_attr: [SwiftBase, role_data, config_settings] - swift::storage::all::mount_check: {if: [swift_mount_check, true, false]} tripleo::profile::base::swift::storage::enable_swift_storage: {get_param: ControllerEnableSwiftStorage} + tripleo::profile::base::swift::storage::use_local_dir: {get_param: SwiftUseLocalDir} tripleo.swift_storage.firewall_rules: '123 swift storage': dport: diff --git a/releasenotes/notes/swift-create-local-dir-7671f7967620e261.yaml b/releasenotes/notes/swift-create-local-dir-7671f7967620e261.yaml new file mode 100644 index 0000000000..f996412ae0 --- /dev/null +++ b/releasenotes/notes/swift-create-local-dir-7671f7967620e261.yaml @@ -0,0 +1,6 @@ +--- +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.