From 95b3520f78591101579af6d8ddf76098dd363f9d Mon Sep 17 00:00:00 2001 From: akrzos Date: Tue, 11 Jul 2017 16:10:23 -0400 Subject: [PATCH] Some Pike support to Browbeat Playbooks. * Remove Shaker check as it can cause a conflict with heat ports when heat is containerized * Check for selinux on several tasks * Acount for novacompute-X naming in total memory dashboard Change-Id: I8d0330aaf2087d5202fc9c0fc5f44d455af79fca --- ansible/install/browbeat.yml | 8 +------- .../install/roles/collectd-openstack/tasks/main.yml | 9 ++++++--- .../templates/00-browbeat_mod_status.conf.j2 | 2 +- .../files/cloud_total_memory_usage.json | 12 ++++++------ ansible/install/roles/shaker-check/tasks/main.yml | 11 ----------- 5 files changed, 14 insertions(+), 28 deletions(-) delete mode 100644 ansible/install/roles/shaker-check/tasks/main.yml diff --git a/ansible/install/browbeat.yml b/ansible/install/browbeat.yml index a431a7f49..75a69e005 100644 --- a/ansible/install/browbeat.yml +++ b/ansible/install/browbeat.yml @@ -3,12 +3,6 @@ # Playbook to install Browbeat (Rally + Shaker + PerfKitBenchmarker) on undercloud # -- hosts: controller - remote_user: "{{ host_remote_user }}" - roles: - - no-sshd-dns - - shaker-check - - hosts: browbeat remote_user: "{{ browbeat_user }}" roles: @@ -23,7 +17,7 @@ - images environment: "{{proxy_env}}" -- hosts: compute +- hosts: controller, compute remote_user: "{{ host_remote_user }}" roles: - no-sshd-dns diff --git a/ansible/install/roles/collectd-openstack/tasks/main.yml b/ansible/install/roles/collectd-openstack/tasks/main.yml index 01ea1353a..ef4b3a155 100644 --- a/ansible/install/roles/collectd-openstack/tasks/main.yml +++ b/ansible/install/roles/collectd-openstack/tasks/main.yml @@ -145,7 +145,7 @@ - name: (Controller) Allow httpd to listen to port ({{apache_controller_mod_status_port}}) shell: "/usr/sbin/semanage port -m -t http_port_t -p tcp {{apache_controller_mod_status_port}}" become: true - when: "('controller' in group_names and {{apache_controller_collectd_plugin}} == true)" + when: "(ansible_selinux['status'] == 'enabled') and ('controller' in group_names and {{apache_controller_collectd_plugin}} == true)" - name: Restart Apache service: @@ -260,11 +260,12 @@ register: collectd_permissive ignore_errors: true changed_when: false + when: "ansible_selinux['status'] == 'enabled'" - name: Set permissive for collectd command: /sbin/semanage permissive -a collectd_t become: true - when: collectd_permissive.rc != 0 + when: "ansible_selinux['status'] == 'enabled' and collectd_permissive.rc != 0" # # Additional policy bits may be needed for exec @@ -277,6 +278,7 @@ group: root mode: 0644 become: true + when: "ansible_selinux['status'] == 'enabled'" - name: Check for collectd custom shell: /sbin/semodule -l | grep -q custom-collectd @@ -284,11 +286,12 @@ register: collectd_custom ignore_errors: true changed_when: false + when: "ansible_selinux['status'] == 'enabled'" - name: Set custom policy for collectd command: /sbin/semodule -i /root/custom-collectd.pp become: true - when: collectd_custom.rc != 0 + when: "ansible_selinux['status'] == 'enabled' and collectd_custom.rc != 0" # # Start collectd service diff --git a/ansible/install/roles/collectd-openstack/templates/00-browbeat_mod_status.conf.j2 b/ansible/install/roles/collectd-openstack/templates/00-browbeat_mod_status.conf.j2 index dfd0e15f3..a7f50015d 100644 --- a/ansible/install/roles/collectd-openstack/templates/00-browbeat_mod_status.conf.j2 +++ b/ansible/install/roles/collectd-openstack/templates/00-browbeat_mod_status.conf.j2 @@ -1,8 +1,8 @@ # Installed by Browbeat Ansible Installer -{% if 'undercloud' in group_names %} LoadModule status_module modules/mod_status.so +{% if 'undercloud' in group_names %} Listen {{apache_undercloud_mod_status_port}} {% endif %} {% if 'controller' in group_names %} diff --git a/ansible/install/roles/grafana-dashboards/files/cloud_total_memory_usage.json b/ansible/install/roles/grafana-dashboards/files/cloud_total_memory_usage.json index cd955483c..e40ad1086 100644 --- a/ansible/install/roles/grafana-dashboards/files/cloud_total_memory_usage.json +++ b/ansible/install/roles/grafana-dashboards/files/cloud_total_memory_usage.json @@ -359,27 +359,27 @@ "targets": [ { "refId": "A", - "target": "alias(sumSeries($Cloud.overcloud-compute-*.memory.memory-slab_unrecl), 'Slab Unrecl')" + "target": "alias(sumSeries($Cloud.overcloud-*compute-*.memory.memory-slab_unrecl), 'Slab Unrecl')" }, { "refId": "B", - "target": "alias(sumSeries($Cloud.overcloud-compute-*.memory.memory-used), 'Used')" + "target": "alias(sumSeries($Cloud.overcloud-*compute-*.memory.memory-used), 'Used')" }, { "refId": "C", - "target": "alias(sumSeries($Cloud.overcloud-compute-*.memory.memory-buffered), 'Buffered')" + "target": "alias(sumSeries($Cloud.overcloud-*compute-*.memory.memory-buffered), 'Buffered')" }, { "refId": "D", - "target": "alias(sumSeries($Cloud.overcloud-compute-*.memory.memory-slab_recl), 'Slab Recl')" + "target": "alias(sumSeries($Cloud.overcloud-*compute-*.memory.memory-slab_recl), 'Slab Recl')" }, { "refId": "E", - "target": "alias(sumSeries($Cloud.overcloud-compute-*.memory.memory-cached), 'Cached')" + "target": "alias(sumSeries($Cloud.overcloud-*compute-*.memory.memory-cached), 'Cached')" }, { "refId": "F", - "target": "alias(sumSeries($Cloud.overcloud-compute-*.memory.memory-free), 'Free')" + "target": "alias(sumSeries($Cloud.overcloud-*compute-*.memory.memory-free), 'Free')" } ], "thresholds": [], diff --git a/ansible/install/roles/shaker-check/tasks/main.yml b/ansible/install/roles/shaker-check/tasks/main.yml deleted file mode 100644 index e7bbe842f..000000000 --- a/ansible/install/roles/shaker-check/tasks/main.yml +++ /dev/null @@ -1,11 +0,0 @@ ---- -# -# Tasks to check requirements for installing shaker -# - -- name: Check for heat - service: name={{ item }} state=started - become: true - with_items: - - openstack-heat-api - - openstack-heat-engine