From 71fbf63c88f2ce08fd640002e04f333d5345c202 Mon Sep 17 00:00:00 2001
From: Paul Bourke <paul.bourke@oracle.com>
Date: Thu, 8 Oct 2015 17:08:56 +0000
Subject: [PATCH] Swift JSON files looking for rings in the wrong place

For Swift, the *.json.j2 templates are looking under
{{ container_config_directory }} whereas they need to be looking in the
common location for swift which is /var/lib/kolla/swift

Change-Id: I6f0dcbc9a705b36d1d98275ba9ebc56404fe882d
backport: liberty
Closes-Bug: #1504210
---
 ansible/roles/swift/templates/swift-account-auditor.json.j2 | 2 +-
 ansible/roles/swift/templates/swift-account-reaper.json.j2  | 2 +-
 .../roles/swift/templates/swift-account-replicator.json.j2  | 2 +-
 ansible/roles/swift/templates/swift-account-server.json.j2  | 2 +-
 .../roles/swift/templates/swift-container-auditor.json.j2   | 2 +-
 .../swift/templates/swift-container-replicator.json.j2      | 2 +-
 .../roles/swift/templates/swift-container-server.json.j2    | 2 +-
 .../roles/swift/templates/swift-container-updater.json.j2   | 4 ++--
 ansible/roles/swift/templates/swift-object-auditor.json.j2  | 4 ++--
 ansible/roles/swift/templates/swift-object-expirer.json.j2  | 6 +++---
 .../roles/swift/templates/swift-object-replicator.json.j2   | 4 ++--
 ansible/roles/swift/templates/swift-object-server.json.j2   | 4 ++--
 ansible/roles/swift/templates/swift-object-updater.json.j2  | 4 ++--
 ansible/roles/swift/templates/swift-proxy-server.json.j2    | 6 +++---
 14 files changed, 23 insertions(+), 23 deletions(-)

diff --git a/ansible/roles/swift/templates/swift-account-auditor.json.j2 b/ansible/roles/swift/templates/swift-account-auditor.json.j2
index 8553ad0296..c5bd96776c 100644
--- a/ansible/roles/swift/templates/swift-account-auditor.json.j2
+++ b/ansible/roles/swift/templates/swift-account-auditor.json.j2
@@ -8,7 +8,7 @@
             "perm": "0640"
         },
         {
-            "source": "{{ container_config_directory }}/account.ring.gz",
+            "source": "/var/lib/kolla/swift/account.ring.gz",
             "dest": "/etc/swift/account.ring.gz",
             "owner": "swift",
             "perm": "0640"
diff --git a/ansible/roles/swift/templates/swift-account-reaper.json.j2 b/ansible/roles/swift/templates/swift-account-reaper.json.j2
index 086b39e29b..2e74084963 100644
--- a/ansible/roles/swift/templates/swift-account-reaper.json.j2
+++ b/ansible/roles/swift/templates/swift-account-reaper.json.j2
@@ -8,7 +8,7 @@
             "perm": "0640"
         },
         {
-            "source": "{{ container_config_directory }}/account.ring.gz",
+            "source": "/var/lib/kolla/swift/account.ring.gz",
             "dest": "/etc/swift/account.ring.gz",
             "owner": "swift",
             "perm": "0640"
diff --git a/ansible/roles/swift/templates/swift-account-replicator.json.j2 b/ansible/roles/swift/templates/swift-account-replicator.json.j2
index 1dc49b8558..ca1abbf120 100644
--- a/ansible/roles/swift/templates/swift-account-replicator.json.j2
+++ b/ansible/roles/swift/templates/swift-account-replicator.json.j2
@@ -8,7 +8,7 @@
             "perm": "0640"
         },
         {
-            "source": "{{ container_config_directory }}/account.ring.gz",
+            "source": "/var/lib/kolla/swift/account.ring.gz",
             "dest": "/etc/swift/account.ring.gz",
             "owner": "swift",
             "perm": "0640"
diff --git a/ansible/roles/swift/templates/swift-account-server.json.j2 b/ansible/roles/swift/templates/swift-account-server.json.j2
index 43b562114d..140cded881 100644
--- a/ansible/roles/swift/templates/swift-account-server.json.j2
+++ b/ansible/roles/swift/templates/swift-account-server.json.j2
@@ -8,7 +8,7 @@
             "perm": "0640"
         },
         {
-            "source": "{{ container_config_directory }}/account.ring.gz",
+            "source": "/var/lib/kolla/swift/account.ring.gz",
             "dest": "/etc/swift/account.ring.gz",
             "owner": "swift",
             "perm": "0640"
diff --git a/ansible/roles/swift/templates/swift-container-auditor.json.j2 b/ansible/roles/swift/templates/swift-container-auditor.json.j2
index d517d6a4b4..d3e4fbe075 100644
--- a/ansible/roles/swift/templates/swift-container-auditor.json.j2
+++ b/ansible/roles/swift/templates/swift-container-auditor.json.j2
@@ -8,7 +8,7 @@
             "perm": "0640"
         },
         {
-            "source": "{{ container_config_directory }}/container.ring.gz",
+            "source": "/var/lib/kolla/swift/container.ring.gz",
             "dest": "/etc/swift/container.ring.gz",
             "owner": "swift",
             "perm": "0640"
diff --git a/ansible/roles/swift/templates/swift-container-replicator.json.j2 b/ansible/roles/swift/templates/swift-container-replicator.json.j2
index 36ecf9a09c..9a61642a0c 100644
--- a/ansible/roles/swift/templates/swift-container-replicator.json.j2
+++ b/ansible/roles/swift/templates/swift-container-replicator.json.j2
@@ -8,7 +8,7 @@
             "perm": "0640"
         },
         {
-            "source": "{{ container_config_directory }}/container.ring.gz",
+            "source": "/var/lib/kolla/swift/container.ring.gz",
             "dest": "/etc/swift/container.ring.gz",
             "owner": "swift",
             "perm": "0640"
diff --git a/ansible/roles/swift/templates/swift-container-server.json.j2 b/ansible/roles/swift/templates/swift-container-server.json.j2
index a181b9c710..87e6cbc22e 100644
--- a/ansible/roles/swift/templates/swift-container-server.json.j2
+++ b/ansible/roles/swift/templates/swift-container-server.json.j2
@@ -8,7 +8,7 @@
             "perm": "0640"
         },
         {
-            "source": "{{ container_config_directory }}/container.ring.gz",
+            "source": "/var/lib/kolla/swift/container.ring.gz",
             "dest": "/etc/swift/container.ring.gz",
             "owner": "swift",
             "perm": "0640"
diff --git a/ansible/roles/swift/templates/swift-container-updater.json.j2 b/ansible/roles/swift/templates/swift-container-updater.json.j2
index edf32abfa5..9feb3ac1fc 100644
--- a/ansible/roles/swift/templates/swift-container-updater.json.j2
+++ b/ansible/roles/swift/templates/swift-container-updater.json.j2
@@ -8,13 +8,13 @@
             "perm": "0640"
         },
         {
-            "source": "{{ container_config_directory }}/account.ring.gz",
+            "source": "/var/lib/kolla/swift/account.ring.gz",
             "dest": "/etc/swift/account.ring.gz",
             "owner": "swift",
             "perm": "0640"
         },
         {
-            "source": "{{ container_config_directory }}/container.ring.gz",
+            "source": "/var/lib/kolla/swift/container.ring.gz",
             "dest": "/etc/swift/container.ring.gz",
             "owner": "swift",
             "perm": "0640"
diff --git a/ansible/roles/swift/templates/swift-object-auditor.json.j2 b/ansible/roles/swift/templates/swift-object-auditor.json.j2
index 4f52de1411..a5058282e3 100644
--- a/ansible/roles/swift/templates/swift-object-auditor.json.j2
+++ b/ansible/roles/swift/templates/swift-object-auditor.json.j2
@@ -8,13 +8,13 @@
             "perm": "0640"
         },
         {
-            "source": "{{ container_config_directory }}/container.ring.gz",
+            "source": "/var/lib/kolla/swift/container.ring.gz",
             "dest": "/etc/swift/container.ring.gz",
             "owner": "swift",
             "perm": "0640"
         },
         {
-            "source": "{{ container_config_directory }}/object.ring.gz",
+            "source": "/var/lib/kolla/swift/object.ring.gz",
             "dest": "/etc/swift/object.ring.gz",
             "owner": "swift",
             "perm": "0640"
diff --git a/ansible/roles/swift/templates/swift-object-expirer.json.j2 b/ansible/roles/swift/templates/swift-object-expirer.json.j2
index 09fcbdc71c..301fdcf7cb 100644
--- a/ansible/roles/swift/templates/swift-object-expirer.json.j2
+++ b/ansible/roles/swift/templates/swift-object-expirer.json.j2
@@ -8,19 +8,19 @@
             "perm": "0640"
         },
         {
-            "source": "{{ container_config_directory }}/account.ring.gz",
+            "source": "/var/lib/kolla/swift/account.ring.gz",
             "dest": "/etc/swift/account.ring.gz",
             "owner": "swift",
             "perm": "0640"
         },
         {
-            "source": "{{ container_config_directory }}/container.ring.gz",
+            "source": "/var/lib/kolla/swift/container.ring.gz",
             "dest": "/etc/swift/container.ring.gz",
             "owner": "swift",
             "perm": "0640"
         },
         {
-            "source": "{{ container_config_directory }}/object.ring.gz",
+            "source": "/var/lib/kolla/swift/object.ring.gz",
             "dest": "/etc/swift/object.ring.gz",
             "owner": "swift",
             "perm": "0640"
diff --git a/ansible/roles/swift/templates/swift-object-replicator.json.j2 b/ansible/roles/swift/templates/swift-object-replicator.json.j2
index db73d50e7f..2b9f045822 100644
--- a/ansible/roles/swift/templates/swift-object-replicator.json.j2
+++ b/ansible/roles/swift/templates/swift-object-replicator.json.j2
@@ -8,13 +8,13 @@
             "perm": "0640"
         },
         {
-            "source": "{{ container_config_directory }}/container.ring.gz",
+            "source": "/var/lib/kolla/swift/container.ring.gz",
             "dest": "/etc/swift/container.ring.gz",
             "owner": "swift",
             "perm": "0640"
         },
         {
-            "source": "{{ container_config_directory }}/object.ring.gz",
+            "source": "/var/lib/kolla/swift/object.ring.gz",
             "dest": "/etc/swift/object.ring.gz",
             "owner": "swift",
             "perm": "0640"
diff --git a/ansible/roles/swift/templates/swift-object-server.json.j2 b/ansible/roles/swift/templates/swift-object-server.json.j2
index cb988beb03..4d1df326ff 100644
--- a/ansible/roles/swift/templates/swift-object-server.json.j2
+++ b/ansible/roles/swift/templates/swift-object-server.json.j2
@@ -8,13 +8,13 @@
             "perm": "0640"
         },
         {
-            "source": "{{ container_config_directory }}/container.ring.gz",
+            "source": "/var/lib/kolla/swift/container.ring.gz",
             "dest": "/etc/swift/container.ring.gz",
             "owner": "swift",
             "perm": "0640"
         },
         {
-            "source": "{{ container_config_directory }}/object.ring.gz",
+            "source": "/var/lib/kolla/swift/object.ring.gz",
             "dest": "/etc/swift/object.ring.gz",
             "owner": "swift",
             "perm": "0640"
diff --git a/ansible/roles/swift/templates/swift-object-updater.json.j2 b/ansible/roles/swift/templates/swift-object-updater.json.j2
index aa2c88e7d7..1410f4c4b4 100644
--- a/ansible/roles/swift/templates/swift-object-updater.json.j2
+++ b/ansible/roles/swift/templates/swift-object-updater.json.j2
@@ -8,13 +8,13 @@
             "perm": "0640"
         },
         {
-            "source": "{{ container_config_directory }}/container.ring.gz",
+            "source": "/var/lib/kolla/swift/container.ring.gz",
             "dest": "/etc/swift/container.ring.gz",
             "owner": "swift",
             "perm": "0640"
         },
         {
-            "source": "{{ container_config_directory }}/object.ring.gz",
+            "source": "/var/lib/kolla/swift/object.ring.gz",
             "dest": "/etc/swift/object.ring.gz",
             "owner": "swift",
             "perm": "0640"
diff --git a/ansible/roles/swift/templates/swift-proxy-server.json.j2 b/ansible/roles/swift/templates/swift-proxy-server.json.j2
index 00bf937d9b..52328b724b 100644
--- a/ansible/roles/swift/templates/swift-proxy-server.json.j2
+++ b/ansible/roles/swift/templates/swift-proxy-server.json.j2
@@ -8,19 +8,19 @@
             "perm": "0640"
         },
         {
-            "source": "{{ container_config_directory }}/account.ring.gz",
+            "source": "/var/lib/kolla/swift/account.ring.gz",
             "dest": "/etc/swift/account.ring.gz",
             "owner": "swift",
             "perm": "0640"
         },
         {
-            "source": "{{ container_config_directory }}/container.ring.gz",
+            "source": "/var/lib/kolla/swift/container.ring.gz",
             "dest": "/etc/swift/container.ring.gz",
             "owner": "swift",
             "perm": "0640"
         },
         {
-            "source": "{{ container_config_directory }}/object.ring.gz",
+            "source": "/var/lib/kolla/swift/object.ring.gz",
             "dest": "/etc/swift/object.ring.gz",
             "owner": "swift",
             "perm": "0640"