workaround for swift task 99/17799/1
authorchenshuai@huawei.com <chenshuai@huawei.com>
Fri, 29 Jul 2016 09:05:38 +0000 (05:05 -0400)
committerchenshuai@huawei.com <chenshuai@huawei.com>
Fri, 29 Jul 2016 09:05:38 +0000 (05:05 -0400)
JIRA: COMPASS-446

Change-Id: Id697fc0d314e223d41e7d1e67ce828986f24760f
Signed-off-by: chenshuai@huawei.com <chenshuai@huawei.com>
deploy/adapters/ansible/openstack_mitaka_xenial/roles/swift/tasks/main.yml

index 71d5454..b3c93bb 100644 (file)
   with_items:
     - rsync
   when: inventory_hostname in groups['compute']
+
+- name: wait 30 seconds
+  shell: sleep 30
+
+- name: stop tasks on compute
+  service: name={{ item }} state=stop enabled=yes
+  with_items:
+    - swift-account
+    - swift-account-replicator
+    - swift-container-replicator
+    - swift-object
+    - swift-object-updater
+    - swift-account-auditor
+    - swift-container
+    - swift-container-sync
+    - swift-object-auditor
+    - swift-account-reaper
+    - swift-container-auditor
+    - swift-container-updater
+    - swift-object-replicator
+  when: inventory_hostname in groups['compute']
+
+- name: sleep 10 second
+  shell: sleep 10
+
+- name: start tasks on compute
+  service: name={{ item }} state=start enabled=yes
+  with_items:
+    - swift-account
+    - swift-account-replicator
+    - swift-container-replicator
+    - swift-object
+    - swift-object-updater
+    - swift-account-auditor
+    - swift-container
+    - swift-container-sync
+    - swift-object-auditor
+    - swift-account-reaper
+    - swift-container-auditor
+    - swift-container-updater
+    - swift-object-replicator
+  when: inventory_hostname in groups['compute']