Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Commit

Permalink
Merge "Fix swift containers idempotency" into stable/train
Browse files Browse the repository at this point in the history
  • Loading branch information
Zuul authored and openstack-gerrit committed Jan 26, 2021
2 parents cb9f41f + bee00aa commit 31e48ec
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 3 deletions.
6 changes: 3 additions & 3 deletions common/container-puppet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,9 @@ if [ -z "$NO_ARCHIVE" ]; then
excluded_original_passwords+=" --exclude=/var/lib/config-data/*${p}"
fi
done
# We need to exclude the swift ring backups as those change over time and
# containers do not need to restart if they change
EXCLUDE=--exclude='*/etc/swift/backups/*'\ --exclude='*/etc/libvirt/passwd.db'\ ${excluded_original_passwords}
# We need to exclude the swift rings and backups as those change over time
# and containers do not need to restart if they change
EXCLUDE=--exclude='*/etc/swift/backups/*'\ --exclude='*/etc/swift/*.ring.gz'\ --exclude='*/etc/swift/*.builder'\ --exclude='*/etc/libvirt/passwd.db'\ ${excluded_original_passwords}

# We need to repipe the tar command through 'tar xO' to force text
# output because otherwise the sed command cannot work. The sed is
Expand Down
10 changes: 10 additions & 0 deletions deployment/swift/swift-ringbuilder-container-puppet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@ parameters:
default: ''
description: A temporary Swift URL to upload rings to.
type: string
DeployIdentifier:
default: ''
type: string
description: >
Setting this to a unique value will re-run any deployment tasks which
perform configuration on a Heat stack-update.
conditions:
swift_use_local_dir:
Expand Down Expand Up @@ -124,6 +130,10 @@ outputs:
volumes:
- /var/lib/config-data/puppet-generated/swift/etc/swift:/etc/swift:rw,z
- /var/lib/config-data/swift_ringbuilder:/swift_ringbuilder:ro
environment:
# NOTE: this should force this container to re-run on each
# update (scale-out, etc.)
TRIPLEO_DEPLOY_IDENTIFIER: {get_param: DeployIdentifier}
external_upgrade_tasks:
- when:
- step|int == 1
Expand Down
10 changes: 10 additions & 0 deletions deployment/swift/swift-storage-container-puppet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,12 @@ parameters:
default: 0
description: Number of workers for Swift account service.
type: string
DeployIdentifier:
default: ''
type: string
description: >
Setting this to a unique value will re-run any deployment tasks which
perform configuration on a Heat stack-update.
# DEPRECATED options for compatibility with overcloud.yaml
# This should be removed and manipulation of the ControllerServices list
Expand Down Expand Up @@ -311,6 +317,10 @@ outputs:
command: ['chown', '-R', 'swift:', '/srv/node']
volumes:
- /srv/node:/srv/node:z
environment:
# NOTE: this should force this container to re-run on each
# update (scale-out, etc.)
TRIPLEO_DEPLOY_IDENTIFIER: {get_param: DeployIdentifier}
step_4:
map_merge:
- if:
Expand Down

0 comments on commit 31e48ec

Please sign in to comment.