pumba icon indicating copy to clipboard operation
pumba copied to clipboard

Unable to pull the tc image

Open avinashnarra opened this issue 5 years ago • 7 comments

@alexei-led I am trying to run pumba in kubernetes and adding tc-image, but logs says "unable to pull the tc-image".So could you please help me.Tried various ways . So i am doing it in kubernetes way and it creates daemon set with pumba docker image and trying to pull iproute2 image and it is not able to pull the image due to some restrictions inside our environment. So is there any other way that i can pull the images? Is it possible for you to add the docker image inside pumba image so that it would be very helpful to me

avinashnarra avatar Sep 10 '20 15:09 avinashnarra

@avinashnarra can you pull gaiadocker/iproute2 on your K8s nodes? In general, you can create and use any Docker image that has tc tool on-board. For example, create your own Alpine based image and add iproute2 package to it.

alexei-led avatar Sep 12 '20 08:09 alexei-led

@alexei-led i created my own iproute2 image but seeing below error.

DEBU[0001] tc container created, starting it id=b572c49c994b34ef612c0eb21b5186317d2dd1cf2249073a536a17a0a45552ca WARN[0001] failed to delay network for container error="failed to start tc-container: Error response from daemon: OCI runtime create failed: container_linux.go:345: starting container process caused "exec: \"tc\": executable file not found in $PATH": unknown" FATA[0001] failed to delay packets for one or more containers: failed to start tc-container: Error response from daemon: OCI runtime create failed: container_linux.go:345: starting container process caused "exec: "tc": executable file not found in $PATH": unknown

can u please help me

avinashnarra avatar Sep 13 '20 21:09 avinashnarra

@avinashnarra Please paste Dockerfile you've used to create image.

alexei-led avatar Sep 14 '20 04:09 alexei-led

@alexei-led I fear that the same problems await us in our company.

Is it possible to take the gaiaadm/pumba as a base image and install the iproute2 package directly on it, or does Pumba expect a container? In that case, can you give an example of a Dockerfile that you can use to build your own iproute2 package that Pumba can work with?

torblerone avatar Oct 16 '20 06:10 torblerone

@torblerone it's possible to provide your own Docker image with tc tool on-board or add tc to the target Docker container. Both options should work. Take a look at tc.Dockerfile link

alexei-led avatar Oct 18 '20 13:10 alexei-led

@alexei-led So I could also use the Pumba Dockerfile and just add the lines below or simply pull the existing Docker Image and add the tc package?

RUN apk --no-cache add iproute2

RUN ln -s /usr/lib/tc /lib/tc

Or would Pumba cause problems when the tc application is installed right into its own container?

torblerone avatar Oct 20 '20 06:10 torblerone

Pumba uses "docker exec/run" API to run "tc" command in the target's container network namespace.

Probably it is possible to run "tc" command available in $PATH and attach it to the target namespace, and this will allow you to package a "tc" tool in the same Docker image as Pumba.

But, today, you need either add "tc" tool to the target container or bring a new Docker image with "tc" tool on-board.

alexei-led avatar Oct 20 '20 06:10 alexei-led