distribution icon indicating copy to clipboard operation
distribution copied to clipboard

image pull returns 404 on manifest request if there is storage error

Open yuwaMSFT2 opened this issue 9 years ago • 4 comments

When get manifest, the handler will try to retrieve it from storage driver. When storage driver is cloud storage, it can fail due to various reasons even if the manifest exists (like 500, 503, etc. from storage server). However, the manifest handler in images.go doesn't distinguish the TagUnknown/BlobUnknown error from other service transient error. As a result, it always returns 404 to user, which is misleading when user knows the manifest exists.

All other handlers seem to distinguish the unknown/notfound error from other errors, so they return 404/500 respectively.

yuwaMSFT2 avatar Jan 11 '17 00:01 yuwaMSFT2

We used the Azure driver but it should be the same for all other drivers...

yuwaMSFT2 avatar Jan 11 '17 00:01 yuwaMSFT2

@yuwaMSFT2 Would you mind sending a PR with a fix?

stevvooe avatar Jan 11 '17 00:01 stevvooe

Sure will prepare a PR.

yuwaMSFT2 avatar Jan 11 '17 00:01 yuwaMSFT2

Closed by #2138

dmcgowan avatar Jan 18 '17 22:01 dmcgowan