diff --git a/deployment/swift/swift-storage-container-puppet.yaml b/deployment/swift/swift-storage-container-puppet.yaml index 474fdabf52..e7e4a5d088 100644 --- a/deployment/swift/swift-storage-container-puppet.yaml +++ b/deployment/swift/swift-storage-container-puppet.yaml @@ -330,12 +330,14 @@ outputs: step_3: # The puppet config sets this up but we don't have a way to mount the named # volume during the configuration stage. We just need to create this - # directory and make sure it's owned by swift. + # directory and make sure it's owned by swift, as well as all + # immediate subdirectories (which might be mountpoints for additional + # disks). swift_setup_srv: image: &swift_account_image {get_param: ContainerSwiftAccountImage} net: none user: root - command: ['chown', '-R', 'swift:', '/srv/node'] + command: ['find', '/srv/node', '-maxdepth', '1', '-type', 'd', '-exec', 'chown', 'swift:', '{}', ';'] volumes: - /srv/node:/srv/node:z environment: diff --git a/releasenotes/notes/swift-do-not-chown-recursive-1086879873cd9fa6.yaml b/releasenotes/notes/swift-do-not-chown-recursive-1086879873cd9fa6.yaml new file mode 100644 index 0000000000..9ace1727e1 --- /dev/null +++ b/releasenotes/notes/swift-do-not-chown-recursive-1086879873cd9fa6.yaml @@ -0,0 +1,7 @@ +--- +fixes: + - | + Do not change ownership recursive for Swift. This was required when + deployments upgraded from baremetal to containerized deployments. + However, by now all deployments should be containerized, and running chown + recursive against a large amount of data might timeout during upgrades.