处理命令时:
gsutil -m -q setmeta -h“Cache-Control:public,max-age = 10”
我经常收到这些错误:
ERROR 1028 16:10:46.257674 retry_decorator.py] Retrying in 0.94 seconds ...
Traceback (most recent call last):
File "/usr/local/share/google/google-cloud-sdk/platform/gsutil/third_party/retry-decorator/retry_decorator/retry_decorator.py", line 20, in f_retry
return f(*args, **kwargs)
File "/usr/local/share/google/google-cloud-sdk/platform/gsutil/gslib/commands/setmeta.py", line 248, in SetMetadataFunc
provider=exp_src_url.scheme)
File "/usr/local/share/google/google-cloud-sdk/platform/gsutil/gslib/cloud_api_delegator.py", line 212, in PatchObjectMetadata
generation=generation, preconditions=preconditions, fields=fields)
File "/usr/local/share/google/google-cloud-sdk/platform/gsutil/gslib/gcs_json_api.py", line 819, in PatchObjectMetadata
generation=generation)
File "/usr/local/share/google/google-cloud-sdk/platform/gsutil/gslib/gcs_json_api.py", line 1308, in _TranslateExceptionAndRaise
raise translated_exception
PreconditionException: PreconditionException: 412 Precondition Failed
服务器位于Google Compute引擎上,并经常更新:
gcloud组件更新
似乎该过程实际完成但这些错误仍在继续。知道是什么原因导致他们以及是否有解决方案?
感谢。
答案 0 :(得分:1)
出现这种情况有两个原因:
如果原因是#1,您可以通过避免对对象的并发更新来解决它。如果原因是#2,不幸的是,你无能为力。