Add playbook to clean up sqlalchemy collectd configuration

Browbeat adds configuration for sqlalchemy collectd on the configuration files
of many Openstack API containers on controller hosts. This causes issues in the
next overcloud deployment. This patch adds a playbook to clean up sqlalchemy
collectd configuration.

Closes-Bug: #1975693
Change-Id: I2574676aa444f76e11cec91d9e0e2a66282301ac
This commit is contained in:
Sanjay Chari 2022-05-26 11:43:59 +05:30
parent 71b1afc61a
commit a71506b31c
5 changed files with 104 additions and 1 deletions

View File

@ -0,0 +1,15 @@
---
#
# Playbook to clean up sqlalchemy collectd configuration on controller hosts.
# The sqlalchemy collectd configuration on containers from a previous deployment
# causes issues in the next overcloud deployment.
- hosts: Controller
strategy: free
remote_user: "{{ host_remote_user }}"
roles:
- { role: osp_version }
- { role: containers }
- { role: common }
- { role: cleanup_sqlalchemy_collectd }

View File

@ -0,0 +1,39 @@
- name: Fetch mysql svc file paths
include_vars:
file: "vars/{{ rhosp_major }}.yml"
- name: Get mysql string
shell: "crudini --get {{item.value.path}} database connection"
become: true
register: db_connections
with_dict: "{{ mysql_svcs }}"
- name: Remove collectd configuration from mysql string
ini_file:
backup: true
dest: "{{ item.item.value.path }}"
section: database
option: connection
value: "{{ item.stdout[:item.stdout.index('&plugin=collectd')] }}"
with_items: "{{ db_connections.results }}"
become: true
- name: restart containers
shell: podman restart {{ item }}
become: true
with_items:
- cinder_api
- cinder_api_cron
- cinder_scheduler
- nova_conductor
- nova_api_cron
- nova_scheduler
- nova_vnc_proxy
- nova_api
- nova_metadata
- neutron_api
- keystone
- heat_api
- heat_engine
- heat_api_cron
- heat_api_cfn

View File

@ -0,0 +1,19 @@
mysql_svcs:
cinder:
path: "/var/lib/config-data/puppet-generated/cinder/etc/cinder/cinder.conf"
glance:
path: "/var/lib/config-data/puppet-generated/glance_api/etc/glance/glance-api.conf"
heat:
path: "/var/lib/config-data/puppet-generated/heat/etc/heat/heat.conf"
heat_api:
path: "/var/lib/config-data/puppet-generated/heat_api/etc/heat/heat.conf"
heat_api_cnf:
path: "/var/lib/config-data/puppet-generated/heat_api_cfn/etc/heat/heat.conf"
keystone:
path: "/var/lib/config-data/puppet-generated/keystone/etc/keystone/keystone.conf"
neutron:
path: "/var/lib/config-data/puppet-generated/neutron/etc/neutron/neutron.conf"
nova:
path: "/var/lib/config-data/puppet-generated/nova/etc/nova/nova.conf"
nova_metadata:
path: "/var/lib/config-data/puppet-generated/nova_metadata/etc/nova/nova.conf"

View File

@ -0,0 +1,19 @@
mysql_svcs:
cinder:
path: "/var/lib/config-data/puppet-generated/cinder/etc/cinder/cinder.conf"
glance:
path: "/var/lib/config-data/puppet-generated/glance_api/etc/glance/glance-api.conf"
heat:
path: "/var/lib/config-data/puppet-generated/heat/etc/heat/heat.conf"
heat_api:
path: "/var/lib/config-data/puppet-generated/heat_api/etc/heat/heat.conf"
heat_api_cnf:
path: "/var/lib/config-data/puppet-generated/heat_api_cfn/etc/heat/heat.conf"
keystone:
path: "/var/lib/config-data/puppet-generated/keystone/etc/keystone/keystone.conf"
neutron:
path: "/var/lib/config-data/puppet-generated/neutron/etc/neutron/neutron.conf"
nova:
path: "/var/lib/config-data/puppet-generated/nova/etc/nova/nova.conf"
nova_metadata:
path: "/var/lib/config-data/puppet-generated/nova_metadata/etc/nova/nova.conf"

View File

@ -25,7 +25,7 @@ convenience they are being mentioned here as well.
:: ::
$ ansible-playbook -i hosts install/shaker_build.yml $ ansible-playbook -i hosts.yml install/shaker_build.yml
.. note:: The playbook to setup networking is provided as an example only and .. note:: The playbook to setup networking is provided as an example only and
might not work for you based on your underlay/overlay network setup. In such might not work for you based on your underlay/overlay network setup. In such
@ -340,6 +340,17 @@ To cleanup :
$ source ~/overcloudrc $ source ~/overcloudrc
$ python browbeat/rally_cleanup.py $ python browbeat/rally_cleanup.py
Cleanup sqlalchemy collectd configuration
------------------------------------------
Browbeat adds configuration for sqlalchemy collectd on the configuration files of many Openstack API containers on controller hosts. This causes issues in the
next overcloud deployment. There is a playbook to clean up sqlalchemy collectd configuration installed by Browbeat from Openstack API containers.
To cleanup :
::
$ cd ansible
$ ansible-playbook -i hosts.yml install/cleanup_sqlalchemy_collectd.yml
Generate CSV file/Google Sheets from Rally json file Generate CSV file/Google Sheets from Rally json file
-------------------------------------------- --------------------------------------------
Rally generates a json file with data about atomic actions duration from each iteration. These atomic actions often occur multiple times within one iteration. Rally generates a json file with data about atomic actions duration from each iteration. These atomic actions often occur multiple times within one iteration.