Skip to content
Permalink
Browse files

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>
  • Loading branch information...
zulcss committed Nov 7, 2019
1 parent 07f564e commit 4138368126a21138da7db3de47852602f0ef14ed
@@ -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,21 +85,20 @@
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 }} \
--network host --pid host \
--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

@@ -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>

0 comments on commit 4138368

Please sign in to comment.
You can’t perform that action at this time.