From 1dd266d35a44ff946a9f50ec63f7ee9be865884a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guilherme=20Steinm=C3=BCller?= Date: Mon, 3 Sep 2018 21:58:16 -0300 Subject: [PATCH] Fix api-paste.ini path in RedHat ditro install This patch aims to revert the commit meant to fix api-paste.ini [1] that has no effect to solve the path problem in distro installs based on RedHat. After the neutron_install.yml task responsible to install neutron role packages, some config files are placed in /usr/share/neutron, some of these files are soft links from /etc/neutron from /usr/share/neutron. One of the config files that is used by neutron-server is the api-paste.ini that needs to be placed in /etc/neutron in order to the service to initalize correctly. This is a workaround only for RedHat distro installs and the root cause is still being investigated. [1] https://github.com/openstack/openstack-ansible-os_neutron/commit/c0b17e9d89d86d0f9543c401316727cfcd6045f2 Change-Id: Ie5441b8d2b147bf0e57928a2b6ea6a745a96c67f --- tasks/neutron_post_install.yml | 10 ++++++++++ vars/main.yml | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/tasks/neutron_post_install.yml b/tasks/neutron_post_install.yml index 01e75694..59cf70ae 100644 --- a/tasks/neutron_post_install.yml +++ b/tasks/neutron_post_install.yml @@ -63,6 +63,16 @@ notify: - Restart neutron services +- name: Place api-paste.ini to the correct path in RedHat + file: + src: "/usr/share/neutron/api-paste.ini" + dest: "{{ neutron_conf_dir }}/api-paste.ini" + owner: "root" + group: "{{ neutron_system_group_name }}" + mode: "0640" + state: link + when: neutron_install_method == 'distro' and ansible_os_family == 'RedHat' + - name: Preserve original configuration file(s) command: "cp {{ item.target_f }} {{ item.target_f }}.original" args: diff --git a/vars/main.yml b/vars/main.yml index bd3b72a0..c431bd76 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -582,7 +582,7 @@ neutron_role_project_group: neutron_all neutron_core_files: - tmp_f: "/tmp/api-paste.ini.original" - target_f: "{{ (neutron_install_method == 'distro' and ansible_os_family == 'RedHat') | ternary('/usr/share/neutron', neutron_conf_dir) }}/api-paste.ini" + target_f: "{{ neutron_conf_dir }}/api-paste.ini" config_overrides: "{{ _neutron_api_paste_ini_overrides | combine(neutron_api_paste_ini_overrides, recursive=True) }}" config_type: "ini" - tmp_f: "/tmp/rootwrap.conf.original"