Repository navigation
Conversation
…ing_suspended
Allows mounting and reclaiming objects on an S3 bucket whose versioning is Suspended (never Enabled) when opted in via <cas_allow_versioning_suspended>true</cas_allow_versioning_suspended>.
1. IObjectStorage / S3ObjectStorage: add BucketVersioningStatus (Unknown, Disabled, Suspended, Enabled) and getBucketVersioningStatus() so S3ObjectStorage distinguishes Enabled from Suspended while preserving isBucketVersioningEnabled().
2. ContentAddressedSettings / ContentAddressedMetadataStorage: add cas_allow_versioning_suspended (default false) and wire it into ObjectStorageBackend.
3. CasObjectStorageBackend / CasProbe: verify getBucketVersioningStatus() != Enabled when opted in (always refusing Enabled buckets) and accept S3 null-version delete markers (created_delete_marker=true) as Removed with a startup warning advising an ExpiredObjectDeleteMarker lifecycle rule.
4. Add unit test S3SuspendedVersioningRequiresOptInAndStillRefusesEnabled in gtest_cas_backend_generation.cpp and update docs/en/antalya/cas/{bucket-requirements,configuration}.md.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: sabith <sks@stackgen.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
On AWS S3, once a bucket has ever had versioning enabled, suspending versioning (
BucketVersioningStatus::Suspended) stops creating new noncurrent versions for new keys, butDeleteObject(withoutVersionId) still creates a"null"-version delete marker (x-amz-delete-marker: true).CasObjectStorageBackend::removeUnder()returnsRawRemoval::DeleteMarker, which causesCasOperation::removeUnder()to throwCAS_DELETE_MARKERandCasProbeto refuse the mount withNOT_IMPLEMENTED(Code: 48), even when versioning is suspended and anExpiredObjectDeleteMarkerlifecycle rule is configured.Changes
SuspendedvsEnabled(IObjectStorage.h,S3ObjectStorage.h/.cpp):IObjectStorage::BucketVersioningStatus(Unknown,Disabled,Suspended,Enabled) andgetBucketVersioningStatus(), preservingisBucketVersioningEnabled()for existing callers/tests.ContentAddressedSettings.cpp,ContentAddressedMetadataStorage.h/.cpp):<cas_allow_versioning_suspended>(defaultfalse) and passed it toObjectStorageBackend.CasObjectStorageBackend.h/.cpp,CasProbe.cpp):cas_allow_versioning_suspended=trueon anETag-dialect Native mount,verifySuspendedVersioningAllowed()checksgetBucketVersioningStatus()atcheckPoolPreconditions()(and before accepting any delete marker):BucketVersioningStatus::Enabledis always refused (NOT_IMPLEMENTED), even whencas_allow_versioning_suspended=true.BucketVersioningStatus::Suspended(orUnknown) logs aWarningadvising anExpiredObjectDeleteMarker: trueS3 lifecycle rule and acceptscreated_delete_marker = trueasRawRemoval::Removed.CasProbe'sCAS_DELETE_MARKERerror text to mentioncas_allow_versioning_suspended.CASBackendGeneration.S3SuspendedVersioningRequiresOptInAndStillRefusesEnabledinsrc/Disks/tests/gtest_cas_backend_generation.cpp.docs/en/antalya/cas/bucket-requirements.mdanddocs/en/antalya/cas/configuration.md.Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Added the
cas_allow_versioning_suspendedCAS disk setting to permit mounting and reclaiming objects on S3 buckets whose object versioning isSuspended(while continuing to rejectEnabledbuckets).Documentation entry for user-facing changes
docs/en/antalya/cas/bucket-requirements.mdanddocs/en/antalya/cas/configuration.md.CI/CD Options
Exclude tests:
Regression jobs to run: