Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No "/bin/timeout" binary in the trace container #97

Closed
lainra opened this issue Oct 4, 2019 · 9 comments
Closed

No "/bin/timeout" binary in the trace container #97

lainra opened this issue Oct 4, 2019 · 9 comments
Assignees

Comments

@lainra
Copy link

lainra commented Oct 4, 2019

HI there,

Thank you very much for making this project.
I tried it in a GKE cluster running with COS nodes and got an error after creating a trace using

kubectl trace run node-name -e 'tracepoint:syscalls:sys_enter_open { printf("%s %s\n", comm,
    str(args->filename)); }'

The container cannot run because of the following error:

Containers:
  kubectl-trace-c59249b4-e5b5-11e9-9f93-f2189825cd80:
    Container ID:  docker://abca6aed039bd81ef98f4ca205c19040ae808477666b3ddfae509767c5e56916
    Image:         quay.io/iovisor/kubectl-trace-bpftrace:latest
    Image ID:      docker-pullable://quay.io/iovisor/kubectl-trace-bpftrace@sha256:fe1683d6782f4ad7690955543c048296b43b6c6a5046ea345a277318c92482d1
    Port:          <none>
    Host Port:     <none>
    Command:
      /bin/timeout
      --preserve-status
      --signal
      INT
      3600
      /bin/trace-runner
      --program=/programs/program.bt
    State:          Terminated
      Reason:       ContainerCannotRun
      Message:      OCI runtime create failed: container_linux.go:345: starting container process caused "exec: \"/bin/timeout\": stat /bin/timeout: no such file or directory": unknown
      Exit Code:    127
      Started:      Thu, 03 Oct 2019 17:14:15 +0900
      Finished:     Thu, 03 Oct 2019 17:14:15 +0900

I checked the /bin/timeout existence in the docker image used:

➜ docker run -it --entrypoint "stat" quay.io/iovisor/kubectl-trace-bpftrace /bin/timeout
stat: can't stat '/bin/timeout': No such file or directory

The PR related to the source code is #88 but there is no trace of adding the binary to the Dockerfile.

Could you check it please?

Cheers,

Raphael

@lainra lainra changed the title No "/bin/timeout" in the trace container No "/bin/timeout" binary in the trace container Oct 4, 2019
@leodido
Copy link
Member

leodido commented Oct 4, 2019

@dalehamel could you please take a look at it? :)

@leogr
Copy link
Contributor

leogr commented Oct 4, 2019

I've the same issue too:

Warning  Failed     37s   kubelet, kind-control-plane  Error: failed to create containerd task: OCI runtime create failed: container_linux.go:345: starting container process caused "exec: \"/bin/timeout\": stat /bin/timeout: no such file or directory": unknown

I've tested with the latest installed from source.

@dalehamel
Copy link
Member

This must be that the tag latest isn't updated, it was last updated 2 months so it is missing this binary. This must still be the alpine image, which wouldn't have this binary.

@leogr @lainra can you please try specifying:

--imagename quay.io/iovisor/kubectl-trace-bpftrace:HEAD

And confirm that works?

@leodido @fntlnz we should either update that tag right away (i don't have access to quay.io i don't think, unless it's controlled by github access), or else release a binary that uses the right tag reference.

@leogr
Copy link
Contributor

leogr commented Oct 4, 2019

@dalehamel yes, it works!

@dalehamel
Copy link
Member

Sorry about this, the version I QA'd internally had this overridden. We'll get the tag fixed and then there shouldn't be any need to updated the kubectl-trace binary, it should just work.

@dalehamel
Copy link
Member

@leogr @lainra the quay.io/iovisor/kubectl-trace-bpftrace:latest tag has been updated, can you please confirm this problem is resolved without needing the --imagename flag?

@leogr
Copy link
Contributor

leogr commented Oct 7, 2019

Hi @dalehamel ,
now yes it works perfectly without --imagename

Image:         quay.io/iovisor/kubectl-trace-bpftrace:latest
Image ID:      sha256:df8ffc4e9f045fa3d8e066d939a8a6b26b5a19c6e68fb76ce64d354b63037a57

😊
Thank you!

@dalehamel
Copy link
Member

thanks for confirming @leogr ! I'll close

@lainra
Copy link
Author

lainra commented Oct 8, 2019

@dalehamel
I also confirmed it works! Thank you for the quick fix!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants