Updating Checks and output
Change-Id: I203944c1f172d5ee395e13ea11945a342628baac
This commit is contained in:
parent
20f7e86fe5
commit
069d37eee1
2
ansible/ansible.cfg
Normal file
2
ansible/ansible.cfg
Normal file
@ -0,0 +1,2 @@
|
||||
[defaults]
|
||||
callback_plugins = plugins/callback/
|
@ -1,2 +1,4 @@
|
||||
---
|
||||
ansible_sudo: yes
|
||||
|
||||
# vi:syntax=yaml
|
||||
|
@ -1,3 +1,28 @@
|
||||
---
|
||||
reserved_host_memory_check: 2048
|
||||
tuned_profile: virtual-host
|
||||
nova_vif_timeout: 300
|
||||
|
||||
checks:
|
||||
bz1245714:
|
||||
url: "https://bugzilla.redhat.com/show_bug.cgi?id=1245714"
|
||||
name: "No Swap Space allocated"
|
||||
bz1282644:
|
||||
url : "https://bugzilla.redhat.com/show_bug.cgi?id=1282644"
|
||||
name : "increase reserved_host_memory_mb"
|
||||
tuned_profile_result :
|
||||
url: "none"
|
||||
name: "Ensure Tuned Profile is set to {{ tuned_profile }}"
|
||||
nova_vif_timeout_result:
|
||||
url: "none"
|
||||
name: "Nova VIF timeout should be >= 300"
|
||||
# neutron_nova_creds:
|
||||
# url: "https://bugzilla.redhat.com/show_bug.cgi?id=1264740"
|
||||
# name: "RHEL OSP Director must be configure with nova-event-callback by default"
|
||||
bz1264740:
|
||||
url: "https://bugzilla.redhat.com/show_bug.cgi?id=1264740"
|
||||
name: "RHEL OSP Director must be configure with nova-event-callback by default"
|
||||
|
||||
|
||||
|
||||
# vi:syntax=yaml
|
||||
|
@ -3,3 +3,32 @@ tuned_profile: throughput-performance
|
||||
rabbitmq_fd: 1600
|
||||
haproxy_max_connections: 4096
|
||||
mariadb_max_connections: 4096
|
||||
nova_vif_timeout: 300
|
||||
|
||||
checks :
|
||||
bz1282491 :
|
||||
url: "https://bugzilla.redhat.com/show_bug.cgi?id=1282491"
|
||||
name: "update default file descriptor setting"
|
||||
bz1281584 :
|
||||
url: "https://bugzilla.redhat.com/show_bug.cgi?id=1281584"
|
||||
name: "Director does not create an haproxy configuration that conforms to our best-practice recommendations"
|
||||
bz1266253 :
|
||||
url: "https://bugzilla.redhat.com/show_bug.cgi?id=1266253"
|
||||
name: "increase mariadb max_connection default value"
|
||||
nova_vif_timeout_result:
|
||||
url: "none"
|
||||
name: "Nova VIF timeout should be >= 300"
|
||||
# neutron_nova_creds:
|
||||
# url: "https://bugzilla.redhat.com/show_bug.cgi?id=1264740"
|
||||
# name: "RHEL OSP Director must be configure with nova-event-callback by default"
|
||||
bz1264740:
|
||||
url: "https://bugzilla.redhat.com/show_bug.cgi?id=1264740"
|
||||
name: "RHEL OSP Director must be configure with nova-event-callback by default"
|
||||
rabbit_partitioned :
|
||||
url: "none"
|
||||
name: "Rabbit is currently partitioned - YMMV... Good luck."
|
||||
tuned_profile_result :
|
||||
url: "none"
|
||||
name: "Ensure Tuned Profile is set to {{ tuned_profile }}"
|
||||
|
||||
# vi:syntax=yaml
|
||||
|
@ -17,8 +17,8 @@
|
||||
|
||||
- name: Check tuned for correct profile on host
|
||||
command: tuned-adm active
|
||||
register: tuned_stdout
|
||||
register: tuned_profile_result
|
||||
changed_when: no
|
||||
failed_when: "'{{ tuned_profile }}' not in '{{ tuned_result.stdout }}'"
|
||||
failed_when: "'{{ tuned_profile }}' not in '{{ tuned_profile_result.stdout }}'"
|
||||
ignore_errors: True
|
||||
|
||||
|
@ -5,15 +5,15 @@
|
||||
|
||||
- name: Check if swap device exists
|
||||
command: swapon -s
|
||||
register: swap_result
|
||||
register: bz1245714
|
||||
changed_when: no
|
||||
failed_when: "'dev' not in '{{ swap_result.stdout }}'"
|
||||
failed_when: "'dev' not in '{{ bz1245714.stdout }}'"
|
||||
ignore_errors: True
|
||||
|
||||
- name: Check reserved_host_memory_mb
|
||||
shell: grep reserved_host_memory /etc/nova/nova.conf | grep -v "#" | cut -f2 -d =
|
||||
register: reserved_host_memory
|
||||
failed_when: reserved_host_memory.stdout|int < reserved_host_memory_check
|
||||
register: bz1282644
|
||||
failed_when: bz1282644.stdout|int < reserved_host_memory_check
|
||||
changed_when: no
|
||||
ignore_errors: True
|
||||
|
||||
|
@ -3,29 +3,29 @@
|
||||
# Performance checks specific to controller hosts
|
||||
#
|
||||
|
||||
- name: Check max_connections
|
||||
- name: Check max_connections on the database
|
||||
shell: mysql -e "show variables like 'max_connections';" | grep max_connections | awk '{print $2}'
|
||||
register: max_connections
|
||||
register: bz1266253
|
||||
changed_when: no
|
||||
failed_when: max_connections.stdout|int < mariadb_max_connections
|
||||
failed_when: bz1266253.stdout|int < mariadb_max_connections
|
||||
ignore_errors: yes
|
||||
|
||||
- name : Check rabbitmq file descriptors
|
||||
shell: rabbitmqctl status | grep file_descriptors | awk -F',' '{print $3}' | sed 's/.$//'
|
||||
register: rabbitmq_fd_result
|
||||
register: bz1282491
|
||||
changed_when: no
|
||||
failed_when: rabbitmq_fd_result.stdout|int < rabbitmq_fd
|
||||
failed_when: bz1282491.stdout|int < rabbitmq_fd
|
||||
ignore_errors: yes
|
||||
|
||||
- name : Check HAProxy Default maxconn
|
||||
shell : cat /etc/haproxy/haproxy.cfg | grep -iPzo '(?s)defaults.*?\n(\n|$)' | grep maxconn | awk '{print $2}'
|
||||
register: haproxy_maxconn
|
||||
failed_when: haproxy_maxconn.stdout|int < mariadb_max_connections
|
||||
register: bz1281584
|
||||
failed_when: bz1281584.stdout|int < mariadb_max_connections
|
||||
changed_when: no
|
||||
ignore_errors: yes
|
||||
|
||||
- name : Check rabbitmq for partitions
|
||||
shell: rabbitmqctl cluster_status | grep partitions -A 1 | grep -q controller
|
||||
register: rabbitmq_partition_result
|
||||
register: rabbit_partitioned
|
||||
changed_when: no
|
||||
failed_when: rabbitmq_partition_result.rc == 0
|
||||
failed_when: rabbit_partitioned.rc == 0
|
||||
|
7
ansible/check/roles/neutron/tasks/main.yaml
Normal file
7
ansible/check/roles/neutron/tasks/main.yaml
Normal file
@ -0,0 +1,7 @@
|
||||
---
|
||||
- name: Check nova is configured in neutron config
|
||||
command: crudini --get /etc/neutron/neutron.conf DEFAULT nova_admin_tenant_id
|
||||
register: neutron_nova_creds
|
||||
failed_when: neutron_nova_creds.rc == 1
|
||||
changed_when: false
|
||||
ignore_errors: True
|
14
ansible/check/roles/nova/tasks/main.yaml
Normal file
14
ansible/check/roles/nova/tasks/main.yaml
Normal file
@ -0,0 +1,14 @@
|
||||
---
|
||||
- name: Check Nova vif_plugging
|
||||
command: crudini --get /etc/nova/nova.conf DEFAULT vif_plugging_is_fatal
|
||||
register: bz1264740
|
||||
failed_when: "'True' not in '{{ bz1264740.stdout }}'"
|
||||
changed_when: false
|
||||
ignore_errors: True
|
||||
|
||||
- name: Check Nova vif_plugging_timeout
|
||||
command: crudini --get /etc/nova/nova.conf DEFAULT vif_plugging_timeout
|
||||
register: nova_vif_timeout_result
|
||||
failed_when: nova_vif_timeout > nova_vif_timeout_result.stdout|int
|
||||
changed_when: false
|
||||
ignore_errors: True
|
@ -5,20 +5,30 @@
|
||||
|
||||
- hosts: controller
|
||||
remote_user: heat-admin
|
||||
vars:
|
||||
roles:
|
||||
- common
|
||||
- controller
|
||||
- keystone
|
||||
- neutron
|
||||
- nova
|
||||
|
||||
- hosts: compute
|
||||
remote_user: heat-admin
|
||||
roles:
|
||||
- common
|
||||
- compute
|
||||
- nova
|
||||
|
||||
- hosts: ceph
|
||||
remote_user: heat-admin
|
||||
roles:
|
||||
- common
|
||||
- ceph
|
||||
|
||||
- hosts: all
|
||||
gather_facts: False
|
||||
become: false
|
||||
sudo: false
|
||||
name: Generating bug report
|
||||
tasks:
|
||||
- local_action: template src=templates/bug_report.j2 dest=./bug_report.log
|
||||
|
28
ansible/check/templates/bug_report.j2
Normal file
28
ansible/check/templates/bug_report.j2
Normal file
@ -0,0 +1,28 @@
|
||||
# Browbeat generated bug report
|
||||
{% for host in groups['controller'] %}
|
||||
---------------------------------------
|
||||
| Issues for host : {{ host }}
|
||||
---------------------------------------
|
||||
{% for check in hostvars[host]['checks'] %}
|
||||
{% if hostvars[host][check]['failed'] == true %}
|
||||
Bug: {{ check }}
|
||||
Name: {{ hostvars[host]['checks'][check]['name'] }}
|
||||
URL: {{ hostvars[host]['checks'][check]['url'] }}
|
||||
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
|
||||
{% for host in groups['compute'] %}
|
||||
---------------------------------------
|
||||
| Issues for host : {{ host }}
|
||||
---------------------------------------
|
||||
{% for check in hostvars[host]['checks'] %}
|
||||
{% if hostvars[host][check]['failed'] == true %}
|
||||
Bug: {{ check }}
|
||||
Name: {{ hostvars[host]['checks'][check]['name'] }}
|
||||
URL: {{ hostvars[host]['checks'][check]['url'] }}
|
||||
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
Loading…
Reference in New Issue
Block a user