From 558d8ae99879d91e8a0334708dcd214c5951c6ae Mon Sep 17 00:00:00 2001 From: Jeffrey Zhang Date: Mon, 17 Oct 2016 15:27:37 +0800 Subject: [PATCH] Fix neutron upgrade permission issue Change-Id: Id4e9d019ee5072b3a24e383174a2acfdb3ed984d Partial-Bug: #1631503 --- .../neutron/templates/neutron-dhcp-agent.json.j2 | 12 ++++++++++++ .../roles/neutron/templates/neutron-l3-agent.json.j2 | 12 ++++++++++++ .../neutron/templates/neutron-lbaas-agent.json.j2 | 12 ++++++++++++ .../templates/neutron-linuxbridge-agent.json.j2 | 7 +++++++ .../neutron/templates/neutron-metadata-agent.json.j2 | 12 ++++++++++++ .../templates/neutron-openvswitch-agent.json.j2 | 7 +++++++ .../roles/neutron/templates/neutron-server.json.j2 | 7 +++++++ .../neutron/templates/neutron-vpnaas-agent.json.j2 | 12 ++++++++++++ 8 files changed, 81 insertions(+) diff --git a/ansible/roles/neutron/templates/neutron-dhcp-agent.json.j2 b/ansible/roles/neutron/templates/neutron-dhcp-agent.json.j2 index bdd30c42e0..f5eed2a526 100644 --- a/ansible/roles/neutron/templates/neutron-dhcp-agent.json.j2 +++ b/ansible/roles/neutron/templates/neutron-dhcp-agent.json.j2 @@ -25,5 +25,17 @@ "owner": "neutron", "perm": "0600" } + ], + "permissions": [ + { + "path": "/var/log/kolla/neutron", + "owner": "neutron:neutron", + "recurse": true + }, + { + "path": "/var/lib/neutron/kolla", + "owner": "neutron:neutron", + "recurse": true + } ] } diff --git a/ansible/roles/neutron/templates/neutron-l3-agent.json.j2 b/ansible/roles/neutron/templates/neutron-l3-agent.json.j2 index 24bcc2849b..d3ef7653fb 100644 --- a/ansible/roles/neutron/templates/neutron-l3-agent.json.j2 +++ b/ansible/roles/neutron/templates/neutron-l3-agent.json.j2 @@ -25,5 +25,17 @@ "owner": "neutron", "perm": "0600" } + ], + "permissions": [ + { + "path": "/var/log/kolla/neutron", + "owner": "neutron:neutron", + "recurse": true + }, + { + "path": "/var/lib/neutron/kolla", + "owner": "neutron:neutron", + "recurse": true + } ] } diff --git a/ansible/roles/neutron/templates/neutron-lbaas-agent.json.j2 b/ansible/roles/neutron/templates/neutron-lbaas-agent.json.j2 index 6bb45cdeec..0955c30514 100644 --- a/ansible/roles/neutron/templates/neutron-lbaas-agent.json.j2 +++ b/ansible/roles/neutron/templates/neutron-lbaas-agent.json.j2 @@ -19,5 +19,17 @@ "owner": "neutron", "perm": "0600" } + ], + "permissions": [ + { + "path": "/var/log/kolla/neutron", + "owner": "neutron:neutron", + "recurse": true + }, + { + "path": "/var/lib/neutron/kolla", + "owner": "neutron:neutron", + "recurse": true + } ] } diff --git a/ansible/roles/neutron/templates/neutron-linuxbridge-agent.json.j2 b/ansible/roles/neutron/templates/neutron-linuxbridge-agent.json.j2 index 0da4f5a16a..6055414af3 100644 --- a/ansible/roles/neutron/templates/neutron-linuxbridge-agent.json.j2 +++ b/ansible/roles/neutron/templates/neutron-linuxbridge-agent.json.j2 @@ -13,5 +13,12 @@ "owner": "neutron", "perm": "0600" } + ], + "permissions": [ + { + "path": "/var/log/kolla/neutron", + "owner": "neutron:neutron", + "recurse": true + } ] } diff --git a/ansible/roles/neutron/templates/neutron-metadata-agent.json.j2 b/ansible/roles/neutron/templates/neutron-metadata-agent.json.j2 index ba0d1b9c94..205ad3bd34 100644 --- a/ansible/roles/neutron/templates/neutron-metadata-agent.json.j2 +++ b/ansible/roles/neutron/templates/neutron-metadata-agent.json.j2 @@ -19,5 +19,17 @@ "owner": "neutron", "perm": "0600" } + ], + "permissions": [ + { + "path": "/var/log/kolla/neutron", + "owner": "neutron:neutron", + "recurse": true + }, + { + "path": "/var/lib/neutron/kolla", + "owner": "neutron:neutron", + "recurse": true + } ] } diff --git a/ansible/roles/neutron/templates/neutron-openvswitch-agent.json.j2 b/ansible/roles/neutron/templates/neutron-openvswitch-agent.json.j2 index 36a9a03f76..853db81085 100644 --- a/ansible/roles/neutron/templates/neutron-openvswitch-agent.json.j2 +++ b/ansible/roles/neutron/templates/neutron-openvswitch-agent.json.j2 @@ -13,5 +13,12 @@ "owner": "neutron", "perm": "0600" } + ], + "permissions": [ + { + "path": "/var/log/kolla/neutron", + "owner": "neutron:neutron", + "recurse": true + } ] } diff --git a/ansible/roles/neutron/templates/neutron-server.json.j2 b/ansible/roles/neutron/templates/neutron-server.json.j2 index 54fed2e003..36402f0a5e 100644 --- a/ansible/roles/neutron/templates/neutron-server.json.j2 +++ b/ansible/roles/neutron/templates/neutron-server.json.j2 @@ -25,5 +25,12 @@ "owner": "neutron", "perm": "0600" } + ], + "permissions": [ + { + "path": "/var/log/kolla/neutron", + "owner": "neutron:neutron", + "recurse": true + } ] } diff --git a/ansible/roles/neutron/templates/neutron-vpnaas-agent.json.j2 b/ansible/roles/neutron/templates/neutron-vpnaas-agent.json.j2 index dff9c44d95..2c0853d488 100644 --- a/ansible/roles/neutron/templates/neutron-vpnaas-agent.json.j2 +++ b/ansible/roles/neutron/templates/neutron-vpnaas-agent.json.j2 @@ -31,5 +31,17 @@ "owner": "neutron", "perm": "0600" } + ], + "permissions": [ + { + "path": "/var/log/kolla/neutron", + "owner": "neutron:neutron", + "recurse": true + }, + { + "path": "/var/lib/neutron/kolla", + "owner": "neutron:neutron", + "recurse": true + } ] }