diff --git a/deployment/swift/releasenotes/notes/swift-refresh-rings-cc327f998490b0df.yaml b/deployment/swift/releasenotes/notes/swift-refresh-rings-cc327f998490b0df.yaml new file mode 100644 index 0000000000..e719cdbeef --- /dev/null +++ b/deployment/swift/releasenotes/notes/swift-refresh-rings-cc327f998490b0df.yaml @@ -0,0 +1,6 @@ +--- +features: + - | + Refresh Swift ring files without restarting containers. This makes it + possible to update rings without service restarts, lowering the overhead + for updates. diff --git a/deployment/swift/swift-proxy-container-puppet.yaml b/deployment/swift/swift-proxy-container-puppet.yaml index d40fb83572..a39a2ce964 100644 --- a/deployment/swift/swift-proxy-container-puppet.yaml +++ b/deployment/swift/swift-proxy-container-puppet.yaml @@ -467,6 +467,16 @@ outputs: when: - rsyslog_config is changed - rsyslog_config.rc == 0 + - name: Run kolla_set_configs to copy ring files + when: step|int == 5 + shell: "{{ container_cli }} exec -u root {{ item }} /usr/local/bin/kolla_set_configs " + become: true + register: kolla_set_configs_result + failed_when: + - kolla_set_configs_result.rc is defined # do not fail in dry run mode + - kolla_set_configs_result.rc not in [0, 125] # ignore containers that are not running + with_items: + - swift_proxy update_tasks: - name: Check swift containers log folder/symlink exists stat: diff --git a/deployment/swift/swift-storage-container-puppet.yaml b/deployment/swift/swift-storage-container-puppet.yaml index abc805f0a3..34b352a893 100644 --- a/deployment/swift/swift-storage-container-puppet.yaml +++ b/deployment/swift/swift-storage-container-puppet.yaml @@ -663,6 +663,28 @@ outputs: when: - rsyslog_config is changed - rsyslog_config.rc == 0 + - name: Run kolla_set_configs to copy ring files + when: step|int == 5 + shell: "{{ container_cli }} exec -u root {{ item }} /usr/local/bin/kolla_set_configs" + become: true + register: kolla_set_configs_result + failed_when: + - kolla_set_configs_result.rc is defined # do not fail in dry run mode + - kolla_set_configs_result.rc not in [0, 125] # ignore containers that are not running + with_items: + - swift_account_auditor + - swift_account_reaper + - swift_account_replicator + - swift_account_server + - swift_container_auditor + - swift_container_replicator + - swift_container_server + - swift_container_updater + - swift_object_auditor + - swift_object_expirer + - swift_object_replicator + - swift_object_server + - swift_object_updater update_tasks: - name: Check swift containers log folder/symlink exists stat: