Add connmon support for cinder.
This will enable connmon install to also enable Cinder to report database transactions. Change-Id: I7100b5cd27c57bb795b6ec6a258e58cd8177ef35
This commit is contained in:
parent
514f76e693
commit
9a4cb2b05b
@ -1 +1,5 @@
|
|||||||
[defaults]
|
[defaults]
|
||||||
|
gathering = smart
|
||||||
|
fact_caching_timeout = 86400
|
||||||
|
fact_caching = jsonfile
|
||||||
|
fact_caching_connection = /tmp/browbeat_fact_cache
|
||||||
|
@ -23,3 +23,4 @@
|
|||||||
- nova
|
- nova
|
||||||
- neutron
|
- neutron
|
||||||
- keystone
|
- keystone
|
||||||
|
- cinder
|
||||||
|
35
ansible/install/roles/cinder/handlers/main.yml
Normal file
35
ansible/install/roles/cinder/handlers/main.yml
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
---
|
||||||
|
#
|
||||||
|
# Cinder handlers for browbeat install connmon
|
||||||
|
#
|
||||||
|
|
||||||
|
- name: unmanage cinder services
|
||||||
|
command: pcs resource unmanage {{ item }}
|
||||||
|
with_items:
|
||||||
|
- openstack-cinder-api
|
||||||
|
- openstack-cinder-scheduler
|
||||||
|
- openstack-cinder-volume
|
||||||
|
ignore_errors: true
|
||||||
|
|
||||||
|
- name: restart cinder services
|
||||||
|
service: name={{ item }} state=restarted
|
||||||
|
with_items:
|
||||||
|
- openstack-cinder-api
|
||||||
|
- openstack-cinder-scheduler
|
||||||
|
- openstack-cinder-volume
|
||||||
|
|
||||||
|
- name: manage cinder services
|
||||||
|
command: pcs resource manage {{ item }}
|
||||||
|
with_items:
|
||||||
|
- openstack-cinder-api
|
||||||
|
- openstack-cinder-scheduler
|
||||||
|
- openstack-cinder-volume
|
||||||
|
ignore_errors: true
|
||||||
|
|
||||||
|
- name: cleanup cinder services
|
||||||
|
command: pcs resource cleanup {{ item }}
|
||||||
|
with_items:
|
||||||
|
- openstack-cinder-api
|
||||||
|
- openstack-cinder-scheduler
|
||||||
|
- openstack-cinder-volume
|
||||||
|
ignore_errors: true
|
19
ansible/install/roles/cinder/tasks/main.yml
Normal file
19
ansible/install/roles/cinder/tasks/main.yml
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
---
|
||||||
|
#
|
||||||
|
# Cinder connmon tasks
|
||||||
|
#
|
||||||
|
|
||||||
|
- name: Check for connmon in cinder.conf
|
||||||
|
shell: grep -Eq 'connection\s?=\s?mysql:' /etc/cinder/cinder.conf
|
||||||
|
register: cinder_mysql
|
||||||
|
ignore_errors: true
|
||||||
|
changed_when: false
|
||||||
|
|
||||||
|
- name: Enable Connmon in cinder.conf
|
||||||
|
shell: sed -i 's/mysql:/mysql+connmon:/g' /etc/cinder/cinder.conf
|
||||||
|
when: cinder_mysql.rc == 0
|
||||||
|
notify:
|
||||||
|
- unmanage cinder services
|
||||||
|
- restart cinder services
|
||||||
|
- manage cinder services
|
||||||
|
- cleanup cinder services
|
@ -11,7 +11,9 @@ import matplotlib.cbook as cbook
|
|||||||
from pylab import rcParams
|
from pylab import rcParams
|
||||||
rcParams['figure.figsize'] = 18, 10
|
rcParams['figure.figsize'] = 18, 10
|
||||||
|
|
||||||
services=['/usr/bin/nova-scheduler','/usr/bin/keystone-all','/usr/bin/nova-api','/usr/bin/nova-conductor','/usr/bin/neutron-server']
|
services=['/usr/bin/nova-scheduler','/usr/bin/keystone-all','/usr/bin/nova-api',
|
||||||
|
'/usr/bin/nova-conductor','/usr/bin/neutron-server','/usr/bin/cinder-api',
|
||||||
|
'/usr/bin/cinder-volume','/usr/bin/cinder-scheduler']
|
||||||
color_wheel=['r','g','b','y']
|
color_wheel=['r','g','b','y']
|
||||||
|
|
||||||
data = {}
|
data = {}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user