Repository navigation
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 <[email protected]>
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! |
Jamstah
left a comment
There was a problem hiding this comment.
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.