Skip to content

Use MD5 checksums in the registry's Google storage driver

Stan Hu requested to merge sh-add-md5-support-gcs-docker into master

We saw high number of 500 errors by users accessing the container registry (gitlab#32907) due to manifest files showing up as 0-byte files. While it's not clear at the moment whether this is a bug in the storage driver or an issue on Google's infrastructure, adding a MD5 checksum should ensure Google will not write a file that doesn't match the intended value.

Note that this patches both the Google Cloud Storage (GCS) driver and the vendored Google Cloud SDK, since the SDK used (circa 2015) is so old it doesn't actually have full support for sending MD5 checksums. This commit grafted on changes from the latest SDK, which significantly changed the interface.

Note that MD5 checksums are only attached to data sent via the PutObject interface, which is responsible for writing relatively small payloads (e.g. manifest files).

Issue to upstream these changes: https://github.com/docker/distribution/issues/3018

Edited by GitLab Release Tools Bot

Merge request reports