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
Fix proxy statistics #4045
Fix proxy statistics #4045
Conversation
b09f419
to
2793a6d
Compare
@dimitar-kostadinov mind rebasing? |
2793a6d
to
d1a1ede
Compare
@milosgajdos PR is rebased. Can you have a look? Thank you in advance! |
@ialidzhikov sorry, been swamped with work, aiming to have a proper look this week, but can't promise anything I'm afraid |
@milosgajdos , a friendly ping. We would like to proceed with the monitoring story on our side. |
this needs a rebase @dimitar-kostadinov |
Again, no tests and not a well tested area, so I'd appreciate a quick "proof of test" message. |
73e0529
to
d2b369f
Compare
Signed-off-by: Dimitar Kostadinov <dimitar.kostadinov@sap.com>
d2b369f
to
bf933f5
Compare
Basic unit tests added. Here are the manual steps for validation:
# build
% make binaries
# prepare configuration
% mkdir -p ~/registry-test
% export REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY=~/registry-test
% export REGISTRY_PROXY_REMOTEURL=https://registry-1.docker.io
% export REGISTRY_HTTP_ADDR=":5500"
% export REGISTRY_HTTP_DEBUG_ADDR=":5501"
# start the registry as proxy cache to docker.io
% ./bin/registry serve cmd/registry/config-dev.yml
% curl http://test.registry.mirror:5501/debug/vars | jq '.registry.proxy'
{
"blobs": {
"Requests": 8,
"Hits": 0,
"Misses": 8,
"BytesPulled": 67238076,
"BytesPushed": 67238076
},
"manifests": {
"Requests": 3,
"Hits": 1,
"Misses": 2,
"BytesPulled": 3640,
"BytesPushed": 5502
}
}
% curl http://test.registry.mirror:5501/debug/vars | jq '.registry.proxy'
{
"blobs": {
"Requests": 16,
"Hits": 8,
"Misses": 8,
"BytesPulled": 67238076,
"BytesPushed": 134476152
},
"manifests": {
"Requests": 6,
"Hits": 4,
"Misses": 2,
"BytesPulled": 3640,
"BytesPushed": 11004
}
} |
@Jamstah, can you check again? |
HI folks, Can someone else have a look so that we proceed with the PR? Thank in advance! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the test results (and the rest of the PR!). Code looks good.
If registry is configured as pull through cache the reported proxy statistics are incorrect.
Fixes #4044.