1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

imageのpushで "Error: writing blob: uploading layer chunked: blob upload invalid" 発生

Posted at

環境

  • OpenShift 4.15 (OpenShift Data Foundation 4.15)
  • Red Hat Quay 3.13.4
    こちらのような手順で、PVをバックエンドにしたMCGのバケットをデータストアとした Red Hat Quay を使用。

発生したエラー

docker push が次のようなエラーで失敗していました。

WARN[0169] Failed, retrying in 1s ... (1/3). Error: writing blob: uploading layer chunked: blob upload invalid

Error: writing blob: uploading layer to https://.....: received unexpected HTTP status: 500 Internal Server Error

quay_app_pod のログを見ると次のようなメッセージがみつかりました。

oc logs my-registry-quay-app-84b8bbc97b-wcfbz -n quay-enterprise
gunicorn-registry stdout | 2025-03-06 04:33:52,738 [252] [WARNING] [storage.cloud] Error when writing to stream in stream_write_internal at path uploads/962875f7-6f85-470b-ae51-0bb281d52b7a: An error occurred (InvalidBucketState) when calling the UploadPart operation: The request is not valid with the current state of the bucket.
gunicorn-registry stdout | 2025-03-06 04:33:52,782 [252] [ERROR] [data.registry_model.blobuploader] storage.stream_upload_chunk returned error An error occurred (InvalidBucketState) when calling the UploadPart operation: The request is not valid with the current state of the bucket.
gunicorn-registry stdout |     raise BlobUploadException(upload_error)
gunicorn-registry stdout | data.registry_model.blobuploader.BlobUploadException: An error occurred (InvalidBucketState) when calling the UploadPart operation: The request is not valid with the current state of the bucket.

対応

OpenShift Container Platform コンソールから確認する限りバケットは正常でした。
しかし、今回使用しているのが ODF 4.15 であったことから、以前遭遇したことのある default backingstore のリソース不足を疑いました。そこで、次のようにリソース割り当てを増やしたところ、imageのpush が成功しました。

$ oc patch -n openshift-storage backingstore noobaa-default-backing-store --type=merge --patch='{"spec":{"pvPool":{"resources":{"limits":{"cpu": "999m","memory": "1Gi"}}}}}'
$ oc patch -n openshift-storage backingstore noobaa-default-backing-store --type=merge --patch='{"spec":{"pvPool":{"resources":{"requests":{"cpu": "999m","memory": "1Gi"}}}}}'
$ oc get backingstore noobaa-default-backing-store -n openshift-storage
NAME                           TYPE      PHASE   AGE
noobaa-default-backing-store   pv-pool   Ready   2d13h

参考

ODF 4.16 で「OpenShift Data Foundation Multicloud Object Gateway BackingStore のリソース割り当ての増加」という機能拡張が入っています。
4.16以前のバージョンを使用する場合は、注意が必要です。

1
0
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?