Clean up colelctd role a bit

- Clean up some typos.
- Pass the mysql.socket on the undercloud to the container.

Change-Id: I82d80ab63e3d838b024ed41ef969ae48e3cb64f3
Signed-off-by: Charles Short <chucks@redhat.com>
This commit is contained in:
Charles Short 2019-11-07 13:34:51 -05:00
parent 07f564ec50
commit 4138368126
2 changed files with 5 additions and 7 deletions

View File

@ -73,7 +73,7 @@
src: "{{ config_type }}.collectd.conf.j2"
dest: "{{ browbeat_containers_path }}/collectd-openstack/config/collectd.conf"
- name: Build and Run container using Docker (OSP < 15)
- name: Build and Run container
block:
- name: Set container_cli (OSP < 15)
set_fact:
@ -85,11 +85,11 @@
container_cli: podman
when: rhosp_version is version('15.0', '>=')
- name: Build collectd-openstack container (Docker)
- name: Build collectd-openstack container
shell: |
{{ container_cli }} build -t collectd-openstack {{ browbeat_containers_path }}/collectd-openstack/
become: true
- name: Run collectd-openstack container (Docker)
- name: Run collectd-openstack container
shell: |
{{ container_cli }} rm -f collectd-{{ config_type }}
{{ container_cli }} run --name collectd-{{ config_type }} \
@ -97,9 +97,8 @@
--privileged -d \
-v /var/log/containers:/var/log/containers \
-v /dev:/dev \
{% if config_type == 'controller' %}
{% if config_type == 'controller' or config_type == 'undercloud' %}
-v /var/lib/mysql/mysql.sock:/var/lib/mysql/mysql.sock \
{% endif %}
collectd-openstack
become: yes

View File

@ -108,9 +108,8 @@ PreCacheChain "PreCache"
<Database "keystone">
Driver "mysql"
DriverOption "host" "{{undercloud_ctlplane_ip_address.stdout}}"
DriverOption "user" "root"
DriverOption "password" "{{undercloud_mysql_password.stdout}}"
DriverOption "dbname" "keystone"
DriverOption "mysql_unix_socket" "/var/lib/mysql/mysql.sock"
Query token_count
</Database>
</Plugin>