Skip to content
This repository was archived by the owner on May 6, 2020. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .ci/install_proxy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}')
Copy link

@devimc devimc Feb 19, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wait, the proxy is no more a systemd service.
also awk is not needed, sudo systemctl -p FragmentPath show cc-proxy | cut -d= -f2 works

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but, that is the problem - the proxy still is a systemd service under the CIs:
https://github.com/clearcontainers/tests/blob/master/.ci/install_proxy.sh
https://github.com/clearcontainers/proxy/blob/master/Makefile#L88

we have a mis-match between the packaging distro installs and the CI scripted installs - we opened a few new Issues on Thursday about this. Need input from @chavafg I think. Let me see if I can find those other relevant issues...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here we go - have a look at: #913

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are not installing cc-proxy service files any more. This was removed some time ago: dd24a5b

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I see that the make install rule of the proxy still installs the service files, but I think we do not make use of them. clearcontainers/proxy#177 should solve this, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but clearcontainers/proxy#177 is not merged ;-)
So, today we do install and run the proxy on the CI systems afaict - and that messes up my metrics CI memory measurements ;-)
Either we

  • turn it off again with this patch (quick fix)
  • or we fix the .ci install scrips and proxy Makefile and replace it with ksm-throttler installation (the better fix, but will take a little more work to write the scripts)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're going to need to resolve #913 (create .ci/install_ksm_throttler.sh) first because if I get clearcontainers/proxy#177 landed, the CI and PnP will immediately break fwics as there will be no KSM functionality in the proxy.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ohh ok, then, to me it is ok to merge this and have a proper fix once clearcontainers/proxy#177 gets merged.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

metrics CI will be very happy if there is no KSM via either proxy or ksm-throtter ;-) - metrics CI controls KSM itself so it knows exactly what it is measuring...
but, yes, QA CI should have ksm-throttler running so we are testing the 'same' environment you'd get if you installed from the distro packages.

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