From 9e03ad3f7ad84f854b088d9e5ef9b7f322533754 Mon Sep 17 00:00:00 2001 From: Salvador Fuentes Date: Thu, 22 Feb 2018 08:30:23 -0600 Subject: [PATCH 1/2] CI: Call the ksm throttler installation We need to call install_ksm_throttler.sh into the main CC setup script. Fixes: #922. Signed-off-by: Salvador Fuentes --- .ci/install_ksm_throttler.sh | 0 .ci/setup.sh | 3 +++ 2 files changed, 3 insertions(+) mode change 100644 => 100755 .ci/install_ksm_throttler.sh diff --git a/.ci/install_ksm_throttler.sh b/.ci/install_ksm_throttler.sh old mode 100644 new mode 100755 diff --git a/.ci/setup.sh b/.ci/setup.sh index 2615c65c5..e9c6e224c 100755 --- a/.ci/setup.sh +++ b/.ci/setup.sh @@ -45,6 +45,9 @@ bash -f ${cidir}/install_shim.sh echo "Install proxy" bash -f ${cidir}/install_proxy.sh +echo "Install ksm throttler" +bash -f ${cidir}/install_ksm_throttler.sh + echo "Install Clear containers image" "${cidir}/install_asset.sh" "image" "latest" From a302fab30a73d6c45eab59043d1d59ccbe6bcc37 Mon Sep 17 00:00:00 2001 From: Salvador Fuentes Date: Thu, 22 Feb 2018 09:06:33 -0600 Subject: [PATCH 2/2] CI: reload services & start vc-throttler service with sudo Run systemctl daemon-reload, in case the service files already existed and were installed again. Also we need to start systemd services with sudo. Otherwise, it will fail. Signed-off-by: Salvador Fuentes --- .ci/install_ksm_throttler.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.ci/install_ksm_throttler.sh b/.ci/install_ksm_throttler.sh index 7f09a13f0..5f6fd7cd9 100755 --- a/.ci/install_ksm_throttler.sh +++ b/.ci/install_ksm_throttler.sh @@ -27,11 +27,13 @@ clone_build_and_install "github.com/kata-containers/ksm-throttler" # to be dynmaically changing the KSM settings under us - we need control of them # ourselves if [[ ! $METRICS_CI ]]; then - systemctl enable vc-throttler.service - systemctl start vc-throttler.service + sudo systemctl daemon-reload + sudo systemctl enable vc-throttler.service + sudo systemctl start vc-throttler.service fi # Stop and disable cc-proxy service in case the service files # are installed. -systemctl stop cc-proxy || true -systemctl disable cc-proxy || true +sudo systemctl daemon-reload +sudo systemctl disable cc-proxy || true +sudo systemctl stop cc-proxy || true