diff options
author | Matthias Runge <mrunge@redhat.com> | 2019-12-13 07:42:36 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2019-12-13 07:42:36 +0000 |
commit | 3c47290b9a08d836c6d648ee08d3ca9fe3401f8f (patch) | |
tree | 80c93e6608cc6e4b7d8ec5e33c4fc390523bfde3 | |
parent | 6afde5454ff335c1f1050905a6d171e76712cfd3 (diff) | |
parent | 3b7264dea083281fe8cca20cf4ee9829ea1e8c49 (diff) |
Merge "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."
-rw-r--r-- | docker/ansible/roles/run_collectd/tasks/main.yml | 25 | ||||
-rw-r--r-- | docs/release/userguide/installguide.docker.rst | 27 | ||||
-rw-r--r-- | src/libpqos/Makefile | 4 |
3 files changed, 47 insertions, 9 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 diff --git a/docs/release/userguide/installguide.docker.rst b/docs/release/userguide/installguide.docker.rst index 7312a9f7..f3b889e6 100644 --- a/docs/release/userguide/installguide.docker.rst +++ b/docs/release/userguide/installguide.docker.rst @@ -377,7 +377,8 @@ Run the collectd stable docker image $ cd <BAROMETER_REPO_DIR> $ sudo docker run -ti --net=host -v \ `pwd`/src/collectd/collectd_sample_configs:/opt/collectd/etc/collectd.conf.d \ - -v /var/run:/var/run -v /tmp:/tmp --privileged opnfv/barometer-collectd + -v /var/run:/var/run -v /tmp:/tmp -v /sys/fs/resctrl:/sys/fs/resctrl \ + --privileged opnfv/barometer-collectd .. note:: The docker collectd image contains configuration for all the collectd @@ -406,6 +407,12 @@ Run the collectd stable docker image can be found at: https://wiki.opnfv.org/display/fastpath/Barometer-collectd+host+dependencies + The Resource Control file system (/sys/fs/resctrl) can be bound from host to + container only if this directory exists on the host system. Otherwise omit + the '-v /sys/fs/resctrl:/sys/fs/resctrl' part in docker run command. + More information about resctrl can be found at: + https://github.com/intel/intel-cmt-cat/wiki/resctrl + Check your docker image is running .. code:: bash @@ -431,7 +438,8 @@ plugins requiring different configuration files) $ cd <BAROMETER_REPO_DIR> $ sudo docker run -ti --net=host -v \ `pwd`/src/collectd/collectd_sample_configs-master:/opt/collectd/etc/collectd.conf.d \ - -v /var/run:/var/run -v /tmp:/tmp --privileged opnfv/barometer-collectd-master + -v /var/run:/var/run -v /tmp:/tmp -v /sys/fs/resctrl:/sys/fs/resctrl \ + --privileged opnfv/barometer-collectd-master .. note:: Barometer collectd docker images are sharing some directories with host @@ -440,6 +448,12 @@ plugins requiring different configuration files) `barometer-collectd-experimental` image, please stop instance of `barometer-collectd(stable)` image first. + The Resource Control file system (/sys/fs/resctrl) can be bound from host to + container only if this directory exists on the host system. Otherwise omit + the '-v /sys/fs/resctrl:/sys/fs/resctrl' part in docker run command. + More information about resctrl can be found at: + https://github.com/intel/intel-cmt-cat/wiki/resctrl + Run the barometer-collectd-experimental docker image ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Barometer-collectd-experimental container shares default configuration files @@ -466,9 +480,16 @@ collectd container) $ cd <BAROMETER_REPO_DIR> $ sudo docker run -ti --net=host -v \ `pwd`/src/collectd/collectd_sample_configs-master:/opt/collectd/etc/collectd.conf.d \ - -v /var/run:/var/run -v /tmp:/tmp --privileged \ + -v /var/run:/var/run -v /tmp:/tmp -v /sys/fs/resctrl:/sys/fs/resctrl --privileged \ opnfv/barometer-collectd-experimental +.. note:: + The Resource Control file system (/sys/fs/resctrl) can be bound from host to + container only if this directory exists on the host system. Otherwise omit + the '-v /sys/fs/resctrl:/sys/fs/resctrl' part in docker run command. + More information about resctrl can be found at: + https://github.com/intel/intel-cmt-cat/wiki/resctrl + Build and Run InfluxDB and Grafana docker images ------------------------------------------------ diff --git a/src/libpqos/Makefile b/src/libpqos/Makefile index a32a4ab8..a3a9ba55 100644 --- a/src/libpqos/Makefile +++ b/src/libpqos/Makefile @@ -40,7 +40,9 @@ INSTALL_TARGET = force_install force_make force_make: $(WORK_DIR) $(AT)cd $(WORK_DIR) && git pull $(LIBPQOS_URL) $(LIBPQOS_TAG) @echo "git pull done" - $(AT)$(MAKE) -C $(WORK_DIR) $(MORE_MAKE_FLAGS) + $(AT)$(MAKE) -C $(WORK_DIR)/lib $(MORE_MAKE_FLAGS) + $(AT)$(MAKE) -C $(WORK_DIR)/pqos $(MORE_MAKE_FLAGS) + $(AT)$(MAKE) -C $(WORK_DIR)/rdtset $(MORE_MAKE_FLAGS) @echo "Make done" force_install: |