From c4f7989bf4ab82b3b417e20e817cd92dcaf47608 Mon Sep 17 00:00:00 2001 From: ricolin Date: Fri, 29 Dec 2017 13:44:33 +0800 Subject: [PATCH] Avoid to overrdie entire policy file We should not override entire policy file, this might cause error to other services (like Tacker) who also try to override Heat policy file. Change-Id: I349de4b5e78fd6807db646543e3ac69212f304e9 --- devstack/plugin.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/devstack/plugin.sh b/devstack/plugin.sh index e733d708c..f27904264 100644 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -342,11 +342,11 @@ function stop_vitrage { function modify_heat_global_index_policy_rule { if is_service_enabled heat; then - cat << EOF > /etc/heat/policy.yaml -# List stacks globally. -# GET /v1/{tenant_id}/stacks -"stacks:global_index": "rule:deny_stack_user" -EOF + local heat_policy=/etc/heat/policy.yaml + touch $heat_policy + # List stacks globally. + # GET /v1/{tenant_id}/stacks + echo '"stacks:global_index": "rule:deny_stack_user"' >> $heat_policy fi }