Separate config_volume for ringbuilder
Use a separate config_volume for swift_ringbuilder puppet_config tasks. This is necessary so that the swift_ringbuilder and swift-storage services don't both rsync files to the same bind mounted directory. The rsync command from docker-puppet.py uses --delete-after, so when they both use the same config_volume, they can end up deleting the files generated by the other (depending on the order of execution). Even though a separate config_volume is used, the rings must still end up in /etc/swift for the swift services containers. An additional container init task is used to copy the ring files into /var/lib/config-data/puppet-generated/swift/etc/swift so that they will be present when the actual swift services containers are started. Change-Id: I05821e76191f64212704ca8e3b7428cda6b3a4b7 Closes-Bug: #1710952
This commit is contained in:
parent
f2d7d4d733
commit
cba00abb75
@ -7,6 +7,10 @@ parameters:
|
|||||||
DockerSwiftConfigImage:
|
DockerSwiftConfigImage:
|
||||||
description: The container image to use for the swift config_volume
|
description: The container image to use for the swift config_volume
|
||||||
type: string
|
type: string
|
||||||
|
DockerSwiftRingbuilderConfigImage:
|
||||||
|
description: Fake parameter to bypass config_volume yaml validation
|
||||||
|
type: string
|
||||||
|
default: ''
|
||||||
ServiceData:
|
ServiceData:
|
||||||
default: {}
|
default: {}
|
||||||
description: Dictionary packing service data
|
description: Dictionary packing service data
|
||||||
@ -92,9 +96,22 @@ outputs:
|
|||||||
service_config_settings: {get_attr: [SwiftRingbuilderBase, role_data, service_config_settings]}
|
service_config_settings: {get_attr: [SwiftRingbuilderBase, role_data, service_config_settings]}
|
||||||
# BEGIN DOCKER SETTINGS
|
# BEGIN DOCKER SETTINGS
|
||||||
puppet_config:
|
puppet_config:
|
||||||
config_volume: 'swift'
|
config_volume: 'swift_ringbuilder'
|
||||||
puppet_tags: exec,fetch_swift_ring_tarball,extract_swift_ring_tarball,ring_object_device,swift::ringbuilder::create,tripleo::profile::base::swift::add_devices,swift::ringbuilder::rebalance,create_swift_ring_tarball,upload_swift_ring_tarball
|
puppet_tags: exec,fetch_swift_ring_tarball,extract_swift_ring_tarball,ring_object_device,swift::ringbuilder::create,tripleo::profile::base::swift::add_devices,swift::ringbuilder::rebalance,create_swift_ring_tarball,upload_swift_ring_tarball
|
||||||
step_config: *step_config
|
step_config: *step_config
|
||||||
config_image: {get_param: DockerSwiftConfigImage}
|
config_image: &swift_ringbuilder_image {get_param: DockerSwiftConfigImage}
|
||||||
kolla_config: {}
|
kolla_config: {}
|
||||||
docker_config: {}
|
docker_config:
|
||||||
|
step_3:
|
||||||
|
swift_copy_rings:
|
||||||
|
image: *swift_ringbuilder_image
|
||||||
|
user: root
|
||||||
|
detach: false
|
||||||
|
command:
|
||||||
|
# Use bash to run the cp command so that wildcards can be used
|
||||||
|
- '/bin/bash'
|
||||||
|
- '-c'
|
||||||
|
- 'cp -v -a -t /etc/swift /swift_ringbuilder/etc/swift/*.gz /swift_ringbuilder/etc/swift/*.builder /swift_ringbuilder/etc/swift/backups'
|
||||||
|
volumes:
|
||||||
|
- /var/lib/config-data/puppet-generated/swift/etc/swift:/etc/swift:rw
|
||||||
|
- /var/lib/config-data/swift_ringbuilder:/swift_ringbuilder:ro
|
||||||
|
@ -105,7 +105,7 @@ PARAMETER_DEFINITION_EXCLUSIONS = {'ManagementNetCidr': ['default'],
|
|||||||
'ControllerExtraConfig': ['description'],
|
'ControllerExtraConfig': ['description'],
|
||||||
'NovaComputeExtraConfig': ['description'],
|
'NovaComputeExtraConfig': ['description'],
|
||||||
'controllerExtraConfig': ['description'],
|
'controllerExtraConfig': ['description'],
|
||||||
'DockerSwiftConfigImage': ['default'],
|
'DockerSwiftConfigImage': ['default']
|
||||||
}
|
}
|
||||||
|
|
||||||
PREFERRED_CAMEL_CASE = {
|
PREFERRED_CAMEL_CASE = {
|
||||||
|
Loading…
Reference in New Issue
Block a user