community
community copied to clipboard
S3 controller - cryptic error message
Hi!
When I am creating bucket like:
apiVersion: s3.services.k8s.aws/v1alpha1
kind: Bucket
metadata:
name: test-rec
spec:
name: test-rec
logging:
loggingEnabled:
targetBucket: "test-rec-access"
targetPrefix: "test-"
objectLockEnabledForBucket: true
I am getting the next cryptic error message in controller:
conditions:
- message: "Error syncing property 'Versioningc': InvalidBucketState: An Object Lock configuration is present on this bucket, so the versioning state cannot be changed.\n\tstatus code: 409, request id: CEPWE7F806XMFF57, host id: o7n5o/9dqirQcSILbyRpbUBkknyZPIX//Io9SG9bdqaCzl+k8S/9aG0y8B3pp7Iuobdc7VMaD/s="
status: 'True'
type: ACK.Recoverable
- lastTransitionTime: '2023-08-09T09:18:37Z'
message: >-
Unable to determine if desired resource state matches latest observed
state
reason: "Error syncing property 'Versioningc': InvalidBucketState: An Object Lock configuration is present on this bucket, so the versioning state cannot be changed.\n\tstatus code: 409, request id: CEPWE7F806XMFF57, host id: o7n5o/9dqirQcSILbyRpbUBkknyZPIX//Io9SG9bdqaCzl+k8S/9aG0y8B3pp7Iuobdc7VMaD/s="
status: Unknown
type: ACK.ResourceSynced
and bucket never goes to ACK.ResourceSynced state
Desired behaviour:
- correct error message, I think there is no property like
Versioningc - If there are default settings - make them explicit
- don't throw error as
objectLockEnabledForBucketalready suppose some versioning config. Otherwise - implement admission that will force compliant settings between different keys.
The Versioningc is just a typo in the error message code - https://github.com/aws-controllers-k8s/s3-controller/blob/e0addd656d76730fbf0eac428e29f4520b0525ba/pkg/resource/bucket/hook.go#L279
This error message only happens when the code attempts to update versioning or replication settings for the bucket. Are you modifying either of these settings in your spec? Otherwise it may be an issue with the controller detecting a diff in the versioning part of the S3 response
@RedbackThomson Hi! More details: I did not changed both fields in the S3 object definition.
Issues go stale after 180d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 60d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Provide feedback via https://github.com/aws-controllers-k8s/community.
/lifecycle stale
/remove-lifecycle stale
Issues go stale after 180d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 60d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Provide feedback via https://github.com/aws-controllers-k8s/community.
/lifecycle stale
/remove-lifecycle stale