Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CopyGCSObjects validation failed if destination bucket has a retention policy #1628

Open
rueian opened this issue May 10, 2021 · 0 comments
Open

Comments

@rueian
Copy link
Contributor

rueian commented May 10, 2021

Hi, I would like to export my vm image to a bucket that having a retention policy. But the work flow will fail while validating copy-image-object step:

[image-export]: 2021-05-10T15:40:06+08:00 Validating workflow
[image-export]: 2021-05-10T15:40:06+08:00 Validating step "setup-disks"
[image-export]: 2021-05-10T15:40:08+08:00 Validating step "image-export-export-disk"
[image-export.image-export-export-disk]: 2021-05-10T15:40:08+08:00 Validating step "setup-disks"
[image-export.image-export-export-disk]: 2021-05-10T15:40:09+08:00 Validating step "run-image-export-export-disk"
[image-export.image-export-export-disk]: 2021-05-10T15:40:10+08:00 Validating step "wait-for-inst-image-export-export-disk"
[image-export.image-export-export-disk]: 2021-05-10T15:40:10+08:00 Validating step "delete-inst"
[image-export.image-export-export-disk]: 2021-05-10T15:40:10+08:00 Validating step "copy-image-object"
[image-export]: 2021-05-10T15:40:10+08:00 Error validating workflow: step "image-export-export-disk" validation error: step "copy-image-object" validation error: error deleting file &{c:0xc0003e4440 bucket:mybucket object:daisy-validate-copy-image-object-4v63q acl:{c:0xc0003e4440 bucket:mybucket object:daisy-validate-copy-image-object-4v63q isDefault:false userProject:} gen:-1 conds:<nil> encryptionKey:[] userProject: readCompressed:false} after write validation: googleapi: Error 403: Object 'mybucket/daisy-validate-copy-image-object-4v63q' is subject to bucket's retention policy and cannot be deleted, overwritten or archived until 2021-05-10T00:50:10.85271-07:00, forbidden
[image-export] 2021/05/10 15:40:11 step "image-export-export-disk" validation error: step "copy-image-object" validation error: error deleting file &{c:0xc0003e4440 bucket:mybucket object:daisy-validate-copy-image-object-4v63q acl:{c:0xc0003e4440 bucket:mybucket object:daisy-validate-copy-image-object-4v63q isDefault:false userProject:} gen:-1 conds:<nil> encryptionKey:[] userProject: readCompressed:false} after write validation: googleapi: Error 403: Object 'mybucket/daisy-validate-copy-image-object-4v63q' is subject to bucket's retention policy and cannot be deleted, overwritten or archived until 2021-05-10T00:50:10.85271-07:00, forbidden
panic: step "image-export-export-disk" validation error: step "copy-image-object" validation error: error deleting file &{c:0xc0003e4440 bucket:mybucket object:daisy-validate-copy-image-object-4v63q acl:{c:0xc0003e4440 bucket:mybucket object:daisy-validate-copy-image-object-4v63q isDefault:false userProject:} gen:-1 conds:<nil> encryptionKey:[] userProject: readCompressed:false} after write validation: googleapi: Error 403: Object 'mybucket/daisy-validate-copy-image-object-4v63q' is subject to bucket's retention policy and cannot be deleted, overwritten or archived until 2021-05-10T00:50:10.85271-07:00, forbidden

It seems that the validation is to create and delete a tmp file to validate permission, and therefore will fail if the bucket having a retention policy.

Is there any suggested workaround? Thanks.

@rueian rueian changed the title CopyGCSObjects validation failed if destination bucket with retention policy CopyGCSObjects validation failed if destination bucket has a retention policy May 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant