diff --git a/ansible/browbeat/adjustment-db.yml b/ansible/browbeat/adjustment-db.yml new file mode 100644 index 000000000..fd804bd0b --- /dev/null +++ b/ansible/browbeat/adjustment-db.yml @@ -0,0 +1,13 @@ +--- +# +# + +- hosts: controller + remote_user: heat-admin + gather_facts: false + vars: + ansible_become: true + greenlet_pool_size: 100 + max_overflow: 100 + roles: + - nova-db diff --git a/ansible/browbeat/roles/nova-db/handlers/main.yml b/ansible/browbeat/roles/nova-db/handlers/main.yml new file mode 100644 index 000000000..3cec085cb --- /dev/null +++ b/ansible/browbeat/roles/nova-db/handlers/main.yml @@ -0,0 +1,35 @@ +--- +# +# Nova handlers for browbeat adjustment +# + +- name: unmanage nova services + command: pcs resource unmanage {{ item }} + with_items: + - openstack-nova-api + - openstack-nova-scheduler + - openstack-nova-conductor + ignore_errors: true + +- name: restart nova services + service: name={{ item }} state=restarted + with_items: + - openstack-nova-api + - openstack-nova-scheduler + - openstack-nova-conductor + +- name: manage nova services + command: pcs resource manage {{ item }} + with_items: + - openstack-nova-api + - openstack-nova-scheduler + - openstack-nova-conductor + ignore_errors: true + +- name: cleanup nova services + command: pcs resource cleanup {{ item }} + with_items: + - openstack-nova-api + - openstack-nova-scheduler + - openstack-nova-conductor + ignore_errors: true diff --git a/ansible/browbeat/roles/nova-db/tasks/main.yml b/ansible/browbeat/roles/nova-db/tasks/main.yml new file mode 100644 index 000000000..39723323b --- /dev/null +++ b/ansible/browbeat/roles/nova-db/tasks/main.yml @@ -0,0 +1,21 @@ +--- +# +# Nova tasks for Browbeat +# + +- name: Ensure nova.conf is properly configured + ini_file: + dest: /etc/nova/nova.conf + mode: 0640 + section: "{{ item.section }}" + option: "{{ item.option }}" + value: "{{ item.value }}" + backup: yes + with_items: + - { section: DEFAULT, option: wsgi_default_pool_size, value: "{{ greenlet_pool_size }}" } + - { section: api_database, option: max_overflow, value: "{{ max_overflow }}" } + notify: + - unmanage nova services + - restart nova services + - manage nova services + - cleanup nova services