From 514da1760546a89faddddc274e74a7fa78650d5b Mon Sep 17 00:00:00 2001 From: Serguei Bezverkhi Date: Fri, 4 Mar 2016 20:26:00 -0500 Subject: [PATCH] Reconfigure for Swift This implements reconfigure for Swift service. Fixes swift-rsyncd in All-in-One deployment Partially-Implements: blueprint kolla-reconfig Change-Id: I82bfa3c73b7365bc3a0ea35d3fc102a3525ebd8c --- ansible/roles/swift/tasks/do_reconfigure.yml | 24 ++++++++++++++------ ansible/roles/swift/tasks/start.yml | 4 +++- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/ansible/roles/swift/tasks/do_reconfigure.yml b/ansible/roles/swift/tasks/do_reconfigure.yml index c731a1d9d9..ea97824310 100644 --- a/ansible/roles/swift/tasks/do_reconfigure.yml +++ b/ansible/roles/swift/tasks/do_reconfigure.yml @@ -11,17 +11,19 @@ - { name: swift_account_auditor, group: swift-account-server } - { name: swift_account_replicator, group: swift-account-server } - { name: swift_account_reaper, group: swift-account-server } + - { name: swift_rsyncd, group: swift-account-server } - { name: swift_container_server, group: swift-container-server } - { name: swift_container_auditor, group: swift-container-server } - { name: swift_container_replicator, group: swift-container-server } - { name: swift_container_updater, group: swift-container-server } + - { name: swift_rsyncd, group: swift-container-server } - { name: swift_object_server, group: swift-object-server } - { name: swift_object_auditor, group: swift-object-server } - { name: swift_object_replicator, group: swift-object-server } - { name: swift_object_updater, group: swift-object-server } - { name: swift_object_expirer, group: swift-object-server } + - { name: swift_rsyncd, group: swift-object-server } - { name: swift_proxy_server, group: swift-proxy-server } - - { name: swift_rsyncd, group: swift-proxy-server } - include: config.yml @@ -36,17 +38,19 @@ - { name: swift_account_auditor, group: swift-account-server } - { name: swift_account_replicator, group: swift-account-server } - { name: swift_account_reaper, group: swift-account-server } + - { name: swift_rsyncd, group: swift-account-server } - { name: swift_container_server, group: swift-container-server } - { name: swift_container_auditor, group: swift-container-server } - { name: swift_container_replicator, group: swift-container-server } - { name: swift_container_updater, group: swift-container-server } + - { name: swift_rsyncd, group: swift-container-server } - { name: swift_object_server, group: swift-object-server } - { name: swift_object_auditor, group: swift-object-server } - { name: swift_object_replicator, group: swift-object-server } - { name: swift_object_updater, group: swift-object-server } - { name: swift_object_expirer, group: swift-object-server } + - { name: swift_rsyncd, group: swift-object-server } - { name: swift_proxy_server, group: swift-proxy-server } - - { name: swift_rsyncd, group: swift-proxy-server } # NOTE(jeffrey4l): when config_strategy == 'COPY_ALWAYS' # and container env['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE', @@ -62,17 +66,19 @@ - { name: swift_account_auditor, group: swift-account-server } - { name: swift_account_replicator, group: swift-account-server } - { name: swift_account_reaper, group: swift-account-server } + - { name: swift_rsyncd, group: swift-account-server } - { name: swift_container_server, group: swift-container-server } - { name: swift_container_auditor, group: swift-container-server } - { name: swift_container_replicator, group: swift-container-server } - { name: swift_container_updater, group: swift-container-server } + - { name: swift_rsyncd, group: swift-container-server } - { name: swift_object_server, group: swift-object-server } - { name: swift_object_auditor, group: swift-object-server } - { name: swift_object_replicator, group: swift-object-server } - { name: swift_object_updater, group: swift-object-server } - { name: swift_object_expirer, group: swift-object-server } + - { name: swift_rsyncd, group: swift-object-server } - { name: swift_proxy_server, group: swift-proxy-server } - - { name: swift_rsyncd, group: swift-proxy-server } - name: Remove the containers kolla_docker: @@ -88,17 +94,19 @@ { name: swift_account_auditor, group: swift-account-server }, { name: swift_account_replicator, group: swift-account-server }, { name: swift_account_reaper, group: swift-account-server }, + { name: swift_rsyncd, group: swift-account-server }, { name: swift_container_server, group: swift-container-server }, { name: swift_container_auditor, group: swift-container-server }, { name: swift_container_replicator, group: swift-container-server }, { name: swift_container_updater, group: swift-container-server }, + { name: swift_rsyncd, group: swift-container-server }, { name: swift_object_server, group: swift-object-server }, { name: swift_object_auditor, group: swift-object-server }, { name: swift_object_replicator, group: swift-object-server }, { name: swift_object_updater, group: swift-object-server }, { name: swift_object_expirer, group: swift-object-server }, - { name: swift_proxy_server, group: swift-proxy-server }, - { name: swift_rsyncd, group: swift-proxy-server }] + { name: swift_rsyncd, group: swift-object-server }, + { name: swift_proxy_server, group: swift-proxy-server }] - container_envs.results - check_results.results @@ -119,16 +127,18 @@ { name: swift_account_auditor, group: swift-account-server }, { name: swift_account_replicator, group: swift-account-server }, { name: swift_account_reaper, group: swift-account-server }, + { name: swift_rsyncd, group: swift-account-server }, { name: swift_container_server, group: swift-container-server }, { name: swift_container_auditor, group: swift-container-server }, { name: swift_container_replicator, group: swift-container-server }, { name: swift_container_updater, group: swift-container-server }, + { name: swift_rsyncd, group: swift-container-server }, { name: swift_object_server, group: swift-object-server }, { name: swift_object_auditor, group: swift-object-server }, { name: swift_object_replicator, group: swift-object-server }, { name: swift_object_updater, group: swift-object-server }, { name: swift_object_expirer, group: swift-object-server }, - { name: swift_proxy_server, group: swift-proxy-server }, - { name: swift_rsyncd, group: swift-proxy-server }] + { name: swift_rsyncd, group: swift-object-server }, + { name: swift_proxy_server, group: swift-proxy-server }] - container_envs.results - check_results.results diff --git a/ansible/roles/swift/tasks/start.yml b/ansible/roles/swift/tasks/start.yml index 215aef0239..2e4a5680b1 100644 --- a/ansible/roles/swift/tasks/start.yml +++ b/ansible/roles/swift/tasks/start.yml @@ -41,7 +41,9 @@ - "{{ node_config_directory }}/swift-rsyncd/:{{ container_config_directory }}/:ro" - "{{ swift_devices_mount_point }}:{{ swift_devices_mount_point }}" - "heka_socket:/var/lib/kolla/heka/" - when: inventory_hostname not in groups['swift-proxy-server'] + when: inventory_hostname in groups['swift-account-server'] or + inventory_hostname in groups['swift-container-server'] or + inventory_hostname in groups['swift-object-server'] - name: Starting swift-account-server container kolla_docker: