Commit Graph
100 Commits
Author SHA1 Message Date
Chris Lu e3e015e108 feat: introduce scheduler lanes for independent per-workload scheduling
Split the single plugin scheduler loop into independent per-lane
goroutines so that volume management, iceberg compaction, and lifecycle
operations never block each other.

Each lane has its own:
- Goroutine (laneSchedulerLoop)
- Wake channel for immediate scheduling
- Admin lock scope (e.g. "plugin scheduler:default")
- Configurable idle sleep duration
- Loop state tracking

Three lanes are defined:
- default: vacuum, volume_balance, ec_balance, erasure_coding, admin_script
- iceberg: iceberg_maintenance
- lifecycle: s3_lifecycle (new, handler coming in a later commit)

Job types are mapped to lanes via a hardcoded map with LaneDefault as
the fallback. The SchedulerJobTypeState and SchedulerStatus types now
include a Lane field for API consumers.
2026-03-26 19:32:18 -07:00
Chris Lu 933fd5b474 feat: add SeaweedFS_upload_error_total Prometheus metric (PR #8788)
Add upload error counter labeled by HTTP status code, matching Go
commit 5fa5507. Code "0" indicates a transport error (no HTTP
response received). Incremented on replication failures in
do_replicated_request.
2026-03-26 17:28:57 -07:00
Chris Lu 2844c70ecf fix tests 2026-03-23 19:36:14 -07:00
Chris Lu 7c83460b10 adjust template path 2026-03-16 15:29:12 -07:00
Chris Lu 47799a5b4f fix tests 2026-03-15 09:44:14 -07:00
Chris Lu 89ccb6d825 use constants 2026-03-13 18:11:08 -07:00
Chris Lu f48725a31d add more tests 2026-03-13 17:44:44 -07:00
Chris Lu a6774f0e01 add git commit hash on admin ui 2026-03-12 23:51:25 -07:00
Chris Lu 8ac4caf930 fix(s3api): return no-encryption instead of error when bucket metadata is missing
When getEncryptionConfiguration encounters a not-found error (e.g.,
during bucket recreation after a partial delete), return
ErrNoSuchBucketEncryptionConfiguration instead of ErrInternalError.
This prevents uploads from failing with 500 errors during recovery.
2026-03-11 13:49:21 -07:00
Chris Lu ab85f46529 fix(s3api): clear negative cache in autoCreateBucket when bucket exists
When autoCreateBucket finds the bucket already exists, remove it from
the negative cache so subsequent requests don't unnecessarily trigger
another auto-create attempt.
2026-03-11 13:49:15 -07:00
Chris Lu 5208c7c727 fix(s3api): improve PutBucketHandler comment for orphaned collection recovery
Clarify the comment and log message for the case where a collection
exists but the bucket directory is missing, explaining the root cause
(partial deletion) more precisely.
2026-03-11 13:49:11 -07:00
Chris Lu 12b360f499 fix(s3api): delete bucket directory before collection to prevent inconsistent state
Reorder DeleteBucketHandler to remove the bucket directory first, then
delete the collection. If collection deletion fails, the bucket is still
effectively deleted and can be recreated. Previously, if directory
deletion succeeded but collection deletion failed, the bucket was left
in an unrecoverable state.
2026-03-11 13:49:03 -07:00
Chris Lu 4a5243886a 4.17 2026-03-11 02:29:24 -07:00
Chris Lu 0a2dac1e56 Reduce mutex scope in bucket metrics TTL sweep
Collect expired bucket names under the lock, then release before
calling DeletePartialMatch on Prometheus metrics. This prevents
RecordBucketActiveTime from blocking during the expensive cleanup.
2026-03-10 18:43:35 -07:00
Chris Lu 737116e83c fix port probing 2026-03-10 18:30:19 -07:00
Chris Lu b20eae697e Merge branch 'master' of https://github.com/seaweedfs/seaweedfs 2026-03-10 18:03:39 -07:00
Chris Lu 07f3f5eec5 remove worker links 2026-03-10 18:03:38 -07:00
Chris Lu d4d2e511ed for mini, default to bind all 2026-03-10 00:56:40 -07:00
Chris Lu 3d9f7f6f81 go 1.25 2026-03-09 23:10:27 -07:00
Chris Lu d89a78d9e3 reduce logs 2026-03-09 22:42:03 -07:00
Chris Lu 00000ec006 Update s3_buckets_templ.go 2026-03-09 22:41:07 -07:00
Chris Lu 1bd7a98a4a simplify plugin scheduler: remove configurable IdleSleepSeconds, use constant 61s
The SchedulerConfig struct and its persistence/API were unnecessary
indirection. Replace with a simple constant (reduced from 613s to 61s)
so the scheduler re-checks for detectable job types promptly after
going idle, improving the clean-install experience.
2026-03-09 22:41:03 -07:00
Chris Lu 8ad58e7002 4.16 2026-03-09 21:52:43 -07:00
Chris Lu f220328ae4 test: assert ReadFileStatusCount in batch execution test
Verify that pre-delete verification called ReadVolumeFileStatus on
both source and target for each volume move.
2026-03-09 19:33:06 -07:00
Chris Lu cf3693651c fix: add IdxFileSize check to pre-delete volume verification
The verification step checked DatFileSize and FileCount but not
IdxFileSize, leaving a gap in the copy validation before source
deletion.
2026-03-09 19:33:02 -07:00
Chris Lu 02d3e3195c Update object_store_users_templ.go 2026-03-09 18:34:58 -07:00
Chris Lu b3d32fe73b fix go version 2026-03-09 14:18:46 -07:00
Chris Lu 89f1096c0e Update ec-integration.yml 2026-03-09 14:05:39 -07:00
Chris Lu 55bce53953 reduce logs 2026-03-09 12:14:25 -07:00
Chris Lu bff084ff6a update go version 2026-03-09 11:12:05 -07:00
Chris Lu ba66411337 Update plugin_templ.go 2026-03-08 14:29:06 -07:00
Chris Lu fa7da0f57e template 2026-03-08 14:05:42 -07:00
Chris Lu 338be16254 fix logs 2026-03-05 15:38:05 -08:00
Chris Lu 1b6e96614d s3api: cache parsed IAM policy engines for fallback auth
Previously, evaluateIAMPolicies created a new PolicyEngine and re-parsed
the JSON policy document for every policy on every request. This adds a
shared iamPolicyEngine field that caches compiled policies, kept in sync
by PutPolicy, DeletePolicy, and bulk config reload paths.

- PutPolicy deletes the old cache entry before setting the new one, so a
  parse failure on update does not leave a stale allow.
- Log warnings when policy compilation fails instead of silently
  discarding errors.
- Add test for valid-to-invalid policy update regression.
2026-03-05 14:27:48 -08:00
Chris Lu 230ae9c24e no need to set default scripts now 2026-03-04 22:27:02 -08:00
Chris Lu b3f7472fd3 4.15 2026-03-04 22:13:57 -08:00
Chris LuandCopilot 7799804200 4.14
Co-Authored-By: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-04 19:22:39 -08:00
Chris Lu cf3b7b3ad7 adjust weight 2026-02-26 19:46:38 -08:00
Chris Lu 09a1ace53a adjust display name 2026-02-26 19:33:52 -08:00
Chris Lu a92e9baddf Add integration test for multipart operations inheriting s3:PutObject permissions
TestS3MultipartOperationsInheritPutObjectPermissions verifies that multipart
upload operations (CreateMultipartUpload, UploadPart, ListParts,
CompleteMultipartUpload, AbortMultipartUpload, ListMultipartUploads) work
correctly when a user has only s3:PutObject permission granted.

This test validates the behavior where multipart operations are implicitly
granted when s3:PutObject is authorized, as multipart upload is an
implementation detail of putting objects in S3.
2026-02-25 13:38:14 -08:00
Chris Lu d5e71eb0d8 Revert "s3api: preserve Host header port in signature verification (#8434)"
This reverts commit 98d89ffad7.
2026-02-25 12:28:44 -08:00
Chris Lu e3decd2e3b go fmt 2026-02-25 10:25:44 -08:00
Chris Lu 7296f51f48 Merge branch 'master' of https://github.com/seaweedfs/seaweedfs 2026-02-25 10:25:31 -08:00
Chris Lu a3cb7fa8cc go fmt 2026-02-25 10:25:23 -08:00
Chris Lu ce4940b441 fix filer link on dashboard 2026-02-24 14:21:27 -08:00
Chris Lu cba69f4593 Update layout_templ.go 2026-02-24 13:22:12 -08:00
Chris Lu 91f59e73e5 close ports 2026-02-24 13:20:21 -08:00
Chris Lu 8e8edd7706 not empty only if there are actual files in the bucket 2026-02-23 00:12:04 -08:00
Chris Lu b5f3094619 fix format of internal node URLs in master UI templates 2026-02-22 13:47:29 -08:00
Chris Lu 07f284c391 fix links 2026-02-22 13:40:50 -08:00
Chris Lu 7b08cf74ed consistent template generation 2026-02-22 13:34:06 -08:00
Chris Lu e4b70c2521 go fix 2026-02-20 18:42:00 -08:00
Chris Lu f7c27cc81f go fmt 2026-02-20 18:40:47 -08:00
Chris Lu 66680c58b7 consistent time 2026-02-20 18:40:27 -08:00
Chris Lu eda4a000cc Revert "Fix IAM defaults and s3tables identities"
This reverts commit bf71fe0039.
2026-02-18 16:23:13 -08:00
Chris Lu bf71fe0039 Fix IAM defaults and s3tables identities 2026-02-18 16:21:48 -08:00
Chris Lu 63f641a6c9 Merge branch 'master' of https://github.com/seaweedfs/seaweedfs 2026-02-16 17:01:26 -08:00
Chris Lu 3c3a78d08e 4.13 2026-02-16 17:01:19 -08:00
Chris Lu 564fc56698 Update docker-compose.yml 2026-02-16 15:01:09 -08:00
Chris Lu 35ad7d08a5 remove debug 2026-02-16 14:03:02 -08:00
Chris Lu e863767ac7 cleanup(iam): final removal of temporary debug logging from STS and S3 API 2026-02-14 22:15:06 -08:00
Chris Lu e29a7f1741 cleanup(iam): remove temporary debug logging from STS and S3 API (redo) 2026-02-14 22:14:33 -08:00
Chris Lu f1bf60d288 faster 2026-02-13 14:09:30 -08:00
Chris Lu ac242d04ee one time manual run 2026-02-11 13:20:52 -08:00
Chris Lu 21543134c8 fix manual build process 2026-02-11 13:20:41 -08:00
Chris Lu 7151181d54 fix flaky tests 2026-02-11 12:23:35 -08:00
Chris Lu db76eb26e7 compile 2026-02-09 21:06:07 -08:00
Chris Lu 4ccc7668ce admin: resolve merge conflicts 2026-02-09 20:56:20 -08:00
Chris Lu be26ce74ce s3tables: support multi-level namespace normalization 2026-02-09 19:42:31 -08:00
Chris Lu 0b80f055c2 Merge branch 'fix/8270-leader-not-elected' 2026-02-09 18:15:59 -08:00
Chris Lu af8273386d 4.12 2026-02-09 18:15:19 -08:00
Chris Lu 15d0a46679 Normalize and deduplicate master peer addresses 2026-02-09 18:10:54 -08:00
Chris Lu ae27e17e6f Canonicalize self peer entry to avoid raft self-alias panic 2026-02-09 18:07:01 -08:00
Chris Lu 02dac23119 Fix master leader detection when grpc ports change 2026-02-09 18:00:09 -08:00
Chris Lu 2ed5a8f65c add tests 2026-02-09 01:37:56 -08:00
Chris Lu 5a279c4d2f fmt 2026-02-08 21:19:00 -08:00
Chris Lu 0c89185291 4.10 2026-02-08 21:16:58 -08:00
Chris Lu bbcb8b7590 Merge branch 'master' of https://github.com/seaweedfs/seaweedfs 2026-02-08 20:05:24 -08:00
Chris Lu 3bb9493a5b Enhance Iceberg catalog browsing UI 2026-02-08 00:00:02 -08:00
Chris Lu d9e3fb2b8e Add Iceberg table details view 2026-02-07 23:59:49 -08:00
Chris Lu 217d977579 Merge branch 'master' of https://github.com/seaweedfs/seaweedfs 2026-02-06 13:14:30 -08:00
Chris Lu 833bcde9f3 test: add Trino Iceberg catalog integration test
- Create test/s3/catalog_trino/trino_catalog_test.go with TestTrinoIcebergCatalog
- Tests integration between Trino SQL engine and SeaweedFS Iceberg REST catalog
- Starts weed mini with all services and Trino in Docker container
- Validates Iceberg catalog schema creation and listing operations
- Uses native S3 filesystem support in Trino with path-style access
- Add workflow job to s3-tables-tests.yml for CI execution
2026-02-05 16:10:31 -08:00
Chris Lu e39a4c2041 fix flaky test 2026-02-04 23:16:31 -08:00
Chris Lu 27d5f44415 Merge branch 'master' of https://github.com/seaweedfs/seaweedfs 2026-02-04 12:44:54 -08:00
Chris Lu 000e2bd4a9 logging and debugging 2026-02-04 12:44:52 -08:00
Chris Lu 2ff1cd9fc9 format 2026-02-03 18:39:01 -08:00
Chris Lu 5a5cc38692 4.09 2026-02-03 17:56:25 -08:00
Chris Lu 746df25164 fix formatting 2026-02-03 00:27:20 -08:00
Chris Lu 7169fe585d Delete verify_gc_empty_test.go 2026-02-03 00:20:38 -08:00
Chris Lu 1c1f80358f templ 2026-02-03 00:10:43 -08:00
Chris Lu 330bd92ddc 4.08 2026-02-02 20:44:13 -08:00
Chris Lu ba8816e2e1 4.08 2026-02-02 20:36:03 -08:00
Chris Lu 3b9e367c1a templ 2026-02-02 20:34:37 -08:00
Chris Lu c7c2d8d606 Merge branch 'master' of https://github.com/seaweedfs/seaweedfs 2026-01-29 20:03:26 -08:00
Chris Lu 88c27615c4 /table-buckets 2026-01-29 20:03:17 -08:00
Chris Lu 94e0b902f9 shell: update fs.verify and volume.fsck for new BFS signature
Updated dependent commands to match the refactored
doTraverseBfsAndSaving signature and use context for channel sends.
2026-01-29 14:42:10 -08:00
Chris Lu 3b05efbdbc shell: fix potential deadlock in fs.meta.save BFS traversal
Refactored doTraverseBfsAndSaving to use context cancellation.
If the saving process fails, the traversal is stopped immediately
to prevent workers from blocking on the output channel.
2026-01-29 14:42:10 -08:00
Chris Lu b91427c30f filer: preserve existing TTL during CreateEntry/UpdateEntry gRPC calls
This ensures that metadata load correctly restores entries with their
original TTL instead of overwriting with the default from filer.conf.
Fixes #8159.
2026-01-29 14:42:09 -08:00
Chris Lu 9e575822a3 Merge master into s3tables-by-claude (resolve conflicts, keep s3tables changes) 2026-01-28 19:47:42 -08:00
Chris Lu d399113e0c test: fix duplicate subtest names in permissions_test.go
Rename duplicate 'combined * and ?' test cases to include singular/plural suffix
for clarity and to support targeted test runs.
2026-01-28 19:42:19 -08:00