From c0bd59ab1285ebf390ef2f0f85509d2c8b126bef Mon Sep 17 00:00:00 2001 From: Graham Whaley Date: Wed, 14 Feb 2018 17:45:06 +0000 Subject: [PATCH] ci: metrics: disable ksm on global proxy if under metrics If running under the metrics CI, then we want to disable the global KSM control of the proxy, and control it ourselves. This is effectively an unwind of #828, that was a touch premature. Fixes: #910 Signed-off-by: Graham Whaley --- .ci/install_proxy.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.ci/install_proxy.sh b/.ci/install_proxy.sh index 4480b7d33..7dd3a83a5 100755 --- a/.ci/install_proxy.sh +++ b/.ci/install_proxy.sh @@ -22,3 +22,18 @@ cidir=$(dirname "$0") source "${cidir}/lib.sh" clone_build_and_install "github.com/clearcontainers/proxy" + +systemd_extra_flags="-log debug" + +# If we are running under the metrics CI system then we do not want the proxy +# to be dynmaically changing the KSM settings under us - we need control of them +# ourselves +if [[ $METRICS_CI ]]; then + systemd_extra_flags="${systemd_extra_flags} -ksm initial" +fi + +proxy_systemd_file=$(sudo systemctl show cc-proxy | fgrep FragmentPath | awk 'BEGIN{FS="="}{print $2}') +sudo sed -i "s/\(^ExecStart.*$\)/\1 ${systemd_extra_flags}/" "${proxy_systemd_file}" +sudo systemctl daemon-reload +echo "Start proxy service" +sudo systemctl restart cc-proxy