examples icon indicating copy to clipboard operation
examples copied to clipboard

Load balancer example check improvement

Open nickolaev opened this issue 6 years ago • 6 comments

The load balancer example check script is not verifying the traffic is passing and distributed by the balancer. We need a more sophisticated check that will ensure the balancer is operating as expected.

nickolaev avatar Feb 10 '20 14:02 nickolaev

@uablrek can you please check if we can have a more sophisticated check?

nickolaev avatar Feb 10 '20 14:02 nickolaev

Yes I will try. Thanks for fixing the ci problems, I can't say I have understood those. Now when it works I can try to extend the testing. My problem has been that the base-image for NSE lacks every tcp test tool I could think of, only "ping" exists, so test from within the NSE pod is hard. I will try to test from main netns on nodes with "nc".

uablrek avatar Feb 10 '20 15:02 uablrek

Oh, you can install whatever you need even in the check script if you want to.

If it is Alpine based it is a matter of apk update and then apk install curl for example. Ubuntu is apt-get update && apt-get install -y curl and so on. What tools do you need?

nickolaev avatar Feb 10 '20 15:02 nickolaev

Tried to add install of nc in the Dockerfile;

FROM ${VPP_AGENT} as runtime
RUN apt install -y netcat-openbsd
...

But unfortunately any "apt install" fails in the "${VPP_AGENT}" image;

# apt-get install -y netcat-openbsd
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package netcat-openbsd

I tried a number of packages and all fails.

I will try something else.

uablrek avatar Feb 13 '20 12:02 uablrek

So the images get distributed with cleaned package cache to make time lighter weight. The typical way to make this work is like this: RUN apt-get update && apt-get install -y netcat-openbsd And then it is a good practice to clean up the cache again before the final image is built. So the final execution might be something like:

RUN apt update && apt install -y netcat-openbsd && rm -rf /var/lib/apt/lists/*

nickolaev avatar Feb 13 '20 12:02 nickolaev

Seems to work fine. Thanks!

uablrek avatar Feb 13 '20 12:02 uablrek