derat
derat

Reputation: 217

Deleting Google Cloud Storage object results in "Invalid argument" and "storage_class_update_time_nano" errors

I'm unable to overwrite or remove a particular object from a Google Cloud Storage bucket that I own.

gsutil rm fails with BadRequestException: 400 Invalid argument:

% gsutil stat gs://mybucket/0e133e23-6005-4711-ac2e-24b2cc95ee05.jpg
gs://mybucket/0e133e23-6005-4711-ac2e-24b2cc95ee05.jpg:
    Creation time:          Fri, 07 Aug 2015 02:03:47 GMT
    Update time:            Fri, 17 Feb 2017 04:34:43 GMT
    Storage class:          STANDARD
    Content-Length:         46169
    Content-Type:           image/jpeg
    Metadata:               
        goog-reserved-file-mtime:1438913027
    Hash (crc32c):          UBUUbQ==
    Hash (md5):             fhU9YXjE7M6XRiT+05seeQ==
    ETag:                   CPiV3t7wlccCEAI=
    Generation:             1438913027083000
    Metageneration:         2
% gsutil rm -a gs://mybucket/0e133e23-6005-4711-ac2e-24b2cc95ee05.jpg
Removing gs://mybucket/0e133e23-6005-4711-ac2e-24b2cc95ee05.jpg#1438913027083000...
BadRequestException: 400 Invalid argument

The GCP Console Storage Browser fails with Invalid argument (1 error) and (digging deeper) storage_class_update_time_nano must be positive.

screenshot of error after trying to delete using console

The bucket is using the Standard storage class with object-level ACLs enabled (although I'm not using them, and my account is listed as an owner for the object in question). The bucket does not have a retention policy, and the default event-based hold option is disabled. It does not have any lifecycle rules.

I can remove other objects in the bucket. I'm suspecting that this is a bug on Google's side, although I haven't been able to find reports online of others experiencing the same issue (e.g. Google returns zero results for the storage_class_update_time_nano error message).

Upvotes: 1

Views: 923

Answers (1)

derat
derat

Reputation: 217

This is resolved now: a gsutil mv command that failed in the morning of 2021-02-08 worked when I ran it again four hours later.

In the GCP issue that I filed, a Google employee confirmed that it was caused by a regression:

I can confirm that the issue was on the GCP side and related to a new change on GCS which was performed in the beggining of February.

Now I can see that the issue was rolled out and fixed.

Upvotes: 1

Related Questions