Skip to content
This repository was archived by the owner on May 6, 2020. It is now read-only.

Commit 77877b8

Browse files
author
James O. D. Hunt
authored
Merge pull request #911 from grahamwhaley/20180214_disable_ksm
ci: metrics: disable ksm on global proxy if under metrics
2 parents d343d36 + c0bd59a commit 77877b8

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

.ci/install_proxy.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,18 @@ cidir=$(dirname "$0")
2222
source "${cidir}/lib.sh"
2323

2424
clone_build_and_install "github.com/clearcontainers/proxy"
25+
26+
systemd_extra_flags="-log debug"
27+
28+
# If we are running under the metrics CI system then we do not want the proxy
29+
# to be dynmaically changing the KSM settings under us - we need control of them
30+
# ourselves
31+
if [[ $METRICS_CI ]]; then
32+
systemd_extra_flags="${systemd_extra_flags} -ksm initial"
33+
fi
34+
35+
proxy_systemd_file=$(sudo systemctl show cc-proxy | fgrep FragmentPath | awk 'BEGIN{FS="="}{print $2}')
36+
sudo sed -i "s/\(^ExecStart.*$\)/\1 ${systemd_extra_flags}/" "${proxy_systemd_file}"
37+
sudo systemctl daemon-reload
38+
echo "Start proxy service"
39+
sudo systemctl restart cc-proxy

0 commit comments

Comments
 (0)