Dragonfly2
Dragonfly2 copied to clipboard
Registry request failed in dfget mirror mode
Bug report:
Use dfget daemon as registry mirror, when client request dfget daemon to fetch a blob by GET /v2/$repo/blobs/sha256:xxx from a remote registry which needed authentication, get 500 status code and an error:
task: 99f61bc8b61641e96c5a7372d865886827497d7b33fa8dd03dee5e28dc8e7e4a\npeer: 10.136.90.100-22-26f32ac1-8b2d-4ce3-be25-ca7ee0a713b6\nerror: peer task failed: 4000/status code from source is 401; was expecting 200 or 206
Expected behavior:
Response 401 status code and the raw headers returned from the remote registry.
How to reproduce it:
- Run dfget daemon as registry mirror;
- Run
curl https://private-registry-host/v2/$repo/blobs/sha256:xxx - Get an error responded from dfget;
Environment:
- Dragonfly version: v2.0.3-beta.3
- OS: Linux ubuntu amd64
- Kernel (e.g.
uname -a): 5.18.0-rc2+
When the seed peer or back-to-source peer fails, return the http status code. Scheduler notifies all downloaded peers of the http error status code.