Repository navigation
Conversation
The ObjectStore controller sets an owner reference with blockOwnerDeletion when creating the gateway's ServiceAccount, which requires update on the ObjectStore's finalizers subresource. That permission was never granted, so the API server rejects the create and the ObjectStore never becomes Ready. The S3Bucket controller already has the equivalent permission; this brings ObjectStore in line. SFAM-2858
…S3-004) The CRD documents that an increase of S3Bucket.spec.capacityBytes reconciles to a PVC expansion and that a decrease is rejected. Neither was implemented. ensurePVC returned an existing PVC unchanged and the Ready path only ran mount delivery, so in CI run 45100042373 the PVC still requested 1Gi ten minutes after capacityBytes went to 3Gi. The Ready path now raises the PVC's requested storage to capacityBytes when the spec asks for more, and emits CapacityExpanding. A StorageClass that does not allow expansion is reported as a CapacityExpansionRefused warning instead of an error retried on every pass. A CEL transition rule rejects a decrease at admission. Tests I-14 and I-15 were red against the unchanged tree (PVC stayed at 50Mi, decrease admitted) and are green with the fix.
…3-003) versitygw v1.9.0's posix backend maps every error from linking a finished object into place to ExistingObjectIsDirectory. On a pNFS mount that is where a full volume surfaces: write() only fills the client's page cache, and the server's ENOSPC comes back from the fsync and close inside the link. In CI run 45100042373 the 14th 64 MiB object into a 1 GiB bucket was refused with 409 ExistingObjectIsDirectory, which no S3 client treats as out of space. The gateway's Backend wrapper now overrides PutObject, CopyObject, and CompleteMultipartUpload. When versitygw answers ExistingObjectIsDirectory and the key is not actually blocked by a directory or by an object in its path, the bucket volume's free space decides: below the request size, or below 1% of capacity when the size is unknown, the answer is 507 InsufficientStorage, and otherwise 500 InternalError. versitygw discards the errno, so the cause is inferred from statfs, not observed. The full-volume and space-left cases were red against the unchanged wrapper (409 ExistingObjectIsDirectory) and are green with the fix.
mxsrc
marked this pull request as ready for review
November 23, 2026 23:56
mxsrc
force-pushed
the
fix/s3-e2e-failures
branch
from
November 24, 2026 00:00
6fb5215 to
4a20c94
Compare
The operator records simplyblock_objectstore_bucket_provisioning_seconds and the other ObjectStore/S3Bucket families on controller-runtime's registry, but --metrics-bind-address defaults to "0" and only the kustomize deployment set it. The Helm chart never did, so a chart-installed operator served no metrics at all, and in CI run 45100042373 the histogram had no samples after six buckets reached Ready. The chart now passes --metrics-bind-address=:8443 and declares it as the container port named metrics, both behind operatorMetrics.enabled (default false). There is no Service: the metrics belong to one pod, so a scraper addresses pods, and a PodMonitor can select the named port. The endpoint keeps controller-runtime's secure serving: a scraper needs a token bound to the existing simplyblock-operator-metrics-reader ClusterRole, and the manager role already carries the tokenreviews and subjectaccessreviews it authorizes with. The chart has no test suite to make red first. Verified by rendering with helm template: the arg and port are absent with the default and appear with operatorMetrics.enabled=true. The e2e scrape is fixed separately in sbcli, and its workflow enables the endpoint.
…S3MissingEnvFromSecretK8s) Degraded had no outgoing edge and Reconcile returned early on it, so an ObjectStore that degraded because spec.envFrom named a Secret that did not exist yet stayed Degraded after the Secret was created. In CI run 45100042373 s3-fn went Degraded at 05:53:41, the Secret was created the same second, and the ObjectStore was still Degraded ten minutes later. Degraded now returns to Provisioning with a fresh deadline when the cause may be gone: a Secret or ConfigMap named in spec.envFrom was created or written after the ObjectStore degraded, or, for an ObjectStore degraded on its certificate, the Certificate reports Ready. The controller watches Secrets and ConfigMaps and enqueues the ObjectStores whose envFrom names them. The Certificate is unstructured and not watched, so a certificate-degraded ObjectStore re-reads it once a minute. Nothing else leaves Degraded, so a refusal is still not retried on every event. The design's state machine and failure tables record the new edge. U-20, U-22, and U-23 were red against the unchanged tree and are green with the fix. U-21 guards against flapping and passed before and after.
…e it (TC-S3-002) Deleting an ObjectStore removed its gateway Deployment and Service while the S3Buckets that named it stayed Ready, so nothing served them and nothing said so. In CI run 45100042373 tc002a was still Ready after its ObjectStore and every gateway pod were gone. The decision is that deletion is blocked until the buckets are gone. The ObjectStore now carries the finalizer storage.simplyblock.io/objectstore-buckets. On delete, the reconciler lists the S3Buckets that reference it, keeps the finalizer while any remain, and sets BucketsRemaining True naming them. The phase is unchanged and the owned objects stay, so the gateway keeps serving. The controller watches S3Buckets and enqueues the ObjectStore each names, so the last bucket's deletion releases the finalizer. An S3Bucket whose ObjectStore is being deleted now counts it as missing and degrades with ObjectStoreNotFound, so a new bucket cannot hold the delete open indefinitely. The design docs record the decision. I-08 and I-16 were red against the unchanged tree (the ObjectStore vanished with a bucket still referencing it; the new bucket never degraded) and are green with the fix. I-04 now asserts that a delete with no buckets completes once the finalizer is released.
mxsrc
force-pushed
the
fix/s3-e2e-failures
branch
from
November 24, 2026 00:11
4a20c94 to
94b2f44
Compare
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.
Fixes the product-side causes of the S3 e2e failures in run 45100042373, where 8 of 18 cases failed. Stacked on #943. The test-side fixes are in simplyblock/sbcli#1703.
One commit per failing test:
fix(objectstore): expand a bucket's PVC when capacityBytes growscapacityBytesgrows. A CEL transition rule rejects a decrease. A StorageClass without expansion is reported as aCapacityExpansionRefusedevent.fix(gateway): answer a write to a full bucket with 507, not 409ExistingObjectIsDirectory. The gateway wrapper reclassifies it: still 409 when a directory or object really blocks the key, 507InsufficientStoragewhen the volume is out of space, 500 otherwise.fix(chart): serve the operator's metrics endpoint--metrics-bind-address=:8443and declares it as the container portmetrics, behindoperatorMetrics.enabled, which defaults to false. There is no Service, because the metrics belong to one pod.fix(objectstore): leave Degraded when the missing reference appearsenvFromis created or written after the ObjectStore degraded, or when the Certificate becomes Ready. Secrets and ConfigMaps are now watched.fix(objectstore): hold an ObjectStore's delete while buckets reference itstorage.simplyblock.io/objectstore-bucketswith conditionBucketsRemaining. An S3Bucket whose ObjectStore is being deleted degrades withObjectStoreNotFound.The design docs and test plans are updated for both lifecycle decisions: deletion is blocked by buckets, and Degraded recovers.
Testing
go testwith envtest) and the gateway suite pass.helm template, with the setting on and off.🤖 Generated with Claude Code