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

Add Container level WORM immutable object support for Azure Blob Storage. #781

Merged
merged 8 commits into from
Nov 25, 2024

Conversation

renormalize
Copy link
Member

What this PR does / why we need it:

Enables etcd-backup-restore to handle immutable objects as provided by Container Level WORM in Azure Blob Storage.

This PR mirrors #776 for Azure Blob Storage.

Which issue(s) this PR fixes:
Fixes # #777 only for ABS.

Special notes for your reviewer:

The same conventions are followed as in #776. Please let me know if you find anything that doesn't stick to those conventions.

Release note:

etcd-backup-restore now supports immutable objects for storage provider: Azure Blob Storage, provided by the [Container Level WORM](hhttps://learn.microsoft.com/en-us/azure/storage/blobs/immutable-container-level-worm-policies) feature.
Snapshots garbage collection performed by etcd-backup-restore (if enabled) for ABS is performed only when the objects' immutability period expires.
Support for Container level WORM (ABS) in etcd-backup-restore is backward compatible. For more info please refer to this doc: https://github.com/gardener/etcd-backup-restore/blob/master/docs/usage/immutable_snapshots.md

@renormalize renormalize added area/robustness Robustness, reliability, resilience related area/backup Backup related area/storage Storage related platform/azure Microsoft Azure platform/infrastructure labels Sep 30, 2024
@renormalize renormalize added this to the 2024-Q4 milestone Sep 30, 2024
@renormalize renormalize self-assigned this Sep 30, 2024
@renormalize renormalize requested a review from a team as a code owner September 30, 2024 05:33
@gardener-robot gardener-robot added the needs/review Needs review label Sep 30, 2024
@gardener-robot-ci-3 gardener-robot-ci-3 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Sep 30, 2024
@gardener-robot gardener-robot added the size/s Size of pull request is small (see gardener-robot robot/bots/size.py) label Sep 30, 2024
@gardener-robot-ci-2 gardener-robot-ci-2 added needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Sep 30, 2024
@ishan16696 ishan16696 self-assigned this Oct 3, 2024
@anveshreddy18
Copy link
Contributor

/assign

Copy link
Contributor

@anveshreddy18 anveshreddy18 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR @renormalize. I have few comments, PTAL

pkg/snapstore/abs_snapstore.go Outdated Show resolved Hide resolved
pkg/snapstore/abs_snapstore.go Outdated Show resolved Hide resolved
pkg/snapstore/abs_snapstore.go Outdated Show resolved Hide resolved
pkg/snapstore/abs_snapstore_test.go Outdated Show resolved Hide resolved
pkg/snapstore/abs_snapstore_test.go Outdated Show resolved Hide resolved
@gardener-robot gardener-robot added the needs/changes Needs (more) changes label Oct 7, 2024
@shreyas-s-rao shreyas-s-rao modified the milestones: 2024-Q4, v0.31.0 Oct 8, 2024
@gardener-robot gardener-robot added size/m Size of pull request is medium (see gardener-robot robot/bots/size.py) and removed size/s Size of pull request is small (see gardener-robot robot/bots/size.py) labels Oct 8, 2024
@gardener-robot-ci-1 gardener-robot-ci-1 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Oct 8, 2024
@gardener-robot-ci-3 gardener-robot-ci-3 removed the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Oct 8, 2024
@gardener-robot-ci-1 gardener-robot-ci-1 added reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Oct 8, 2024
Copy link
Contributor

@anveshreddy18 anveshreddy18 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR, LGTM!

just one small mention: As discussed, it would be better if we mention somewhere that adding tags is only possible through CLI at the moment.

Copy link
Member

@ishan16696 ishan16696 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

overall looks good, few nits

pkg/snapstore/abs_snapstore.go Outdated Show resolved Hide resolved
pkg/snapstore/abs_snapstore.go Outdated Show resolved Hide resolved
@gardener-robot-ci-3 gardener-robot-ci-3 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Oct 18, 2024
@renormalize
Copy link
Member Author

@ishan16696 yes I'll get to it ASAP.

@gardener-robot-ci-1 gardener-robot-ci-1 added reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Nov 22, 2024
@renormalize renormalize added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Nov 22, 2024
@gardener-robot-ci-3 gardener-robot-ci-3 removed the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Nov 22, 2024
@renormalize renormalize added the reviewed/do-not-merge Has no approval for merging as it may break things, be of poor quality or have (ext.) dependencies label Nov 22, 2024
@renormalize
Copy link
Member Author

Needs changes. Please do not merge.

@gardener-robot-ci-1 gardener-robot-ci-1 added reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Nov 25, 2024
@gardener-robot-ci-2 gardener-robot-ci-2 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Nov 25, 2024
@gardener-robot-ci-1 gardener-robot-ci-1 removed the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Nov 25, 2024
@ishan16696 ishan16696 removed the reviewed/do-not-merge Has no approval for merging as it may break things, be of poor quality or have (ext.) dependencies label Nov 25, 2024
Comment on lines +64 to +67
var (
// ErrSnapshotDeleteFailDueToImmutability is the error returned when the Delete call fails due to immutability
ErrSnapshotDeleteFailDueToImmutability = fmt.Errorf("ErrSnapshotDeleteFailDueToImmutability")
)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the easiest way to establish a custom error for garbage collection, for dealing with errors faced during deletion of immutable objects.
In the future this should be removed, and a more comprehensive custom error should be created.

@gardener-robot-ci-1 gardener-robot-ci-1 added reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Nov 25, 2024
Copy link
Member

@ishan16696 ishan16696 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!!

@renormalize renormalize merged commit 1936760 into gardener:master Nov 25, 2024
9 checks passed
@gardener-robot gardener-robot added the status/closed Issue is closed (either delivered or triaged) label Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/backup Backup related area/robustness Robustness, reliability, resilience related area/storage Storage related needs/changes Needs (more) changes needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) needs/review Needs review platform/azure Microsoft Azure platform/infrastructure size/m Size of pull request is medium (see gardener-robot robot/bots/size.py) status/closed Issue is closed (either delivered or triaged)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants