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

Local mode gets file path confused #121

Open
donbowman opened this issue Jul 5, 2018 · 0 comments
Open

Local mode gets file path confused #121

donbowman opened this issue Jul 5, 2018 · 0 comments

Comments

@donbowman
Copy link

donbowman commented Jul 5, 2018

dump.pcap.gz
strace -f -e file clairctl analyze -l --log-level debug group/container:hash

writes to /tmp/clairctl/group/container/blobs/hash/layer.tar

But the read-back comes from:
[pid 157] openat(AT_FDCWD, "/tmp/clairctl/docker.io/group/container/blobs/hash/layer.tar", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)

e.g. docker.io got inserted.

I'm not clear why, on the below (from clairctl analyze -l --log-level debug group/container:tag) I get a 'https://registry-1.docker.io/v2' output.

2018-07-05 17:20:46.497510 D | config: Using config file: /root/.clairctl/clairctl.yaml
2018-07-05 17:20:46.497883 D | dockercli: docker image to save: group/container:tag
2018-07-05 17:20:46.497897 D | dockercli: saving in: /tmp/clairctl/group/container/blobs
2018-07-05 17:20:47.919113 I | config: retrieving interface for local IP
2018-07-05 17:20:47.919148 D | config: interface provided, looking for eth0
2018-07-05 17:20:47.919942 I | server: Starting Server on 10.16.1.175:37888
2018-07-05 17:20:47.925375 I | config: retrieving interface for local IP
2018-07-05 17:20:47.925402 D | config: interface provided, looking for eth0
2018-07-05 17:20:47.925527 I | clair: using http://10.16.1.175:37888/local as local url
2018-07-05 17:20:47.925540 I | clair: Pushing Layer 1/1 [74fe78893638]
2018-07-05 17:20:47.925615 D | clair: Saving 74fe78893638ede16ca5550eebc360fbb40ff6232330376693ada97d948ad75f[https://registry-1.docker.io/v2]
2018-07-05 17:20:47.995326 I | clair: adding layer 1/1 [74fe78893638]: receiving http error: 400
client quit unexpectedly
2018-07-05 17:20:47.995366 C | cmd: pushing image "group/container:tag": receiving http error: 400

a packet capture is attached. port 37888 is the 'local' port of cairctl:

{"Layer":{"Name":"4f220f2aa3577047e7ca4f782d2bef57a7b58f0d73804559219bcc224e1099ad","Path":"http://10.16.1.175:37888/local/docker.io/library/openjdk/blobs/4f220f2aa3577047e7ca4f782d2bef57a7b58f0d73804559219bcc224e1099ad/layer.tar","Format":"Docker"}}

donbowman added a commit to donbowman/clairctl that referenced this issue Jul 5, 2018
donbowman added a commit to donbowman/clairctl that referenced this issue Jul 5, 2018
donbowman added a commit to donbowman/clairctl that referenced this issue Jul 5, 2018
donbowman added a commit to donbowman/clairctl that referenced this issue Jul 5, 2018
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

1 participant