diff options
author | jabirkkclt <jabir.kanhira.kadavathu@intel.com> | 2019-12-06 09:35:56 -0800 |
---|---|---|
committer | Kamil Wiatrowski <kamilx.wiatrowski@intel.com> | 2019-12-09 15:47:25 +0100 |
commit | 3b7264dea083281fe8cca20cf4ee9829ea1e8c49 (patch) | |
tree | 5c8bb7634f9cec41cfc2d44969126f204c873490 /docker/ansible/roles/run_collectd/tasks | |
parent | ed42941aa613ba9612ce53c0e812309d14e35955 (diff) |
Fix the Makefile for intel-cmt-cat so it can be build without errors on
CentOS 7. Mount the /sys/fs/resctrl from host to container to avoid
issues with intel_rdt plugin.
Change-Id: I04d22fccb950aabbde774c1850a5b44ee57908f5
Signed-off-by: jabirkkclt <jabir.kanhira.kadavathu@intel.com>
Signed-off-by: Kamil Wiatrowski <kamilx.wiatrowski@intel.com>
Diffstat (limited to 'docker/ansible/roles/run_collectd/tasks')
-rw-r--r-- | docker/ansible/roles/run_collectd/tasks/main.yml | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/docker/ansible/roles/run_collectd/tasks/main.yml b/docker/ansible/roles/run_collectd/tasks/main.yml index 744c7a77..8fc27342 100644 --- a/docker/ansible/roles/run_collectd/tasks/main.yml +++ b/docker/ansible/roles/run_collectd/tasks/main.yml @@ -31,15 +31,30 @@ - rm_collectd_image when: rm_images|default(false)|bool == true -- name: launch collectd container - docker_container: - name: bar-collectd - image: "{{ collectd_image_name }}" - volumes: +- name: check if /sys/fs/resctrl exist + stat: + path: /sys/fs/resctrl + register: resctrl_dir + +- name: set list of volumes to bind + set_fact: + volumes_list: + - /opt/collectd/etc/collectd.conf.d/:/opt/collectd/etc/collectd.conf.d - /var/run:/var/run - /tmp:/tmp - /var/lib/collectd:/var/lib/collectd + +- name: add resctrl to container volumes + set_fact: + volumes_list: "{{ volumes_list + [ '/sys/fs/resctrl:/sys/fs/resctrl' ] }}" + when: resctrl_dir.stat.exists + +- name: launch collectd container + docker_container: + name: bar-collectd + image: "{{ collectd_image_name }}" + volumes: "{{ volumes_list }}" command: "/run_collectd.sh" detach: yes state: started |