1
0
Fork 0
mirror of https://github.com/chrislusf/seaweedfs synced 2025-08-16 09:02:47 +02:00
seaweedfs/weed/shell
Chris Lu 891a2fb6eb
Admin: misc improvements on admin server and workers. EC now works. (#7055)
* initial design

* added simulation as tests

* reorganized the codebase to move the simulation framework and tests into their own dedicated package

* integration test. ec worker task

* remove "enhanced" reference

* start master, volume servers, filer

Current Status
 Master: Healthy and running (port 9333)
 Filer: Healthy and running (port 8888)
 Volume Servers: All 6 servers running (ports 8080-8085)
🔄 Admin/Workers: Will start when dependencies are ready

* generate write load

* tasks are assigned

* admin start wtih grpc port. worker has its own working directory

* Update .gitignore

* working worker and admin. Task detection is not working yet.

* compiles, detection uses volumeSizeLimitMB from master

* compiles

* worker retries connecting to admin

* build and restart

* rendering pending tasks

* skip task ID column

* sticky worker id

* test canScheduleTaskNow

* worker reconnect to admin

* clean up logs

* worker register itself first

* worker can run ec work and report status

but:
1. one volume should not be repeatedly worked on.
2. ec shards needs to be distributed and source data should be deleted.

* move ec task logic

* listing ec shards

* local copy, ec. Need to distribute.

* ec is mostly working now

* distribution of ec shards needs improvement
* need configuration to enable ec

* show ec volumes

* interval field UI component

* rename

* integration test with vauuming

* garbage percentage threshold

* fix warning

* display ec shard sizes

* fix ec volumes list

* Update ui.go

* show default values

* ensure correct default value

* MaintenanceConfig use ConfigField

* use schema defined defaults

* config

* reduce duplication

* refactor to use BaseUIProvider

* each task register its schema

* checkECEncodingCandidate use ecDetector

* use vacuumDetector

* use volumeSizeLimitMB

* remove

remove

* remove unused

* refactor

* use new framework

* remove v2 reference

* refactor

* left menu can scroll now

* The maintenance manager was not being initialized when no data directory was configured for persistent storage.

* saving config

* Update task_config_schema_templ.go

* enable/disable tasks

* protobuf encoded task configurations

* fix system settings

* use ui component

* remove logs

* interface{} Reduction

* reduce interface{}

* reduce interface{}

* avoid from/to map

* reduce interface{}

* refactor

* keep it DRY

* added logging

* debug messages

* debug level

* debug

* show the log caller line

* use configured task policy

* log level

* handle admin heartbeat response

* Update worker.go

* fix EC rack and dc count

* Report task status to admin server

* fix task logging, simplify interface checking, use erasure_coding constants

* factor in empty volume server during task planning

* volume.list adds disk id

* track disk id also

* fix locking scheduled and manual scanning

* add active topology

* simplify task detector

* ec task completed, but shards are not showing up

* implement ec in ec_typed.go

* adjust log level

* dedup

* implementing ec copying shards and only ecx files

* use disk id when distributing ec shards

🎯 Planning: ActiveTopology creates DestinationPlan with specific TargetDisk
📦 Task Creation: maintenance_integration.go creates ECDestination with DiskId
🚀 Task Execution: EC task passes DiskId in VolumeEcShardsCopyRequest
💾 Volume Server: Receives disk_id and stores shards on specific disk (vs.store.Locations[req.DiskId])
📂 File System: EC shards and metadata land in the exact disk directory planned

* Delete original volume from all locations

* clean up existing shard locations

* local encoding and distributing

* Update docker/admin_integration/EC-TESTING-README.md

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* check volume id range

* simplify

* fix tests

* fix types

* clean up logs and tests

---------

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2025-07-30 12:38:03 -07:00
..
command.go refactor 2024-09-29 10:38:22 -07:00
command_cluster_check.go [shell] use constant for hdd of type (#6337) 2024-12-10 08:43:59 -08:00
command_cluster_ps.go refactor 2024-09-29 10:38:22 -07:00
command_cluster_raft_add.go convert error fromating to %w everywhere (#6995) 2025-07-16 23:39:27 -07:00
command_cluster_raft_ps.go convert error fromating to %w everywhere (#6995) 2025-07-16 23:39:27 -07:00
command_cluster_raft_remove.go convert error fromating to %w everywhere (#6995) 2025-07-16 23:39:27 -07:00
command_collection_delete.go refactor 2024-09-29 10:38:22 -07:00
command_collection_list.go refactor 2024-09-29 10:38:22 -07:00
command_ec_balance.go Nit: unify the default --maxParallelization value for weed shell commands supporting this option (#6788) 2025-05-13 07:59:26 -07:00
command_ec_common.go convert error fromating to %w everywhere (#6995) 2025-07-16 23:39:27 -07:00
command_ec_common_test.go ec.encode: Fix resolution of target collections. (#6585) 2025-02-28 11:42:19 -08:00
command_ec_decode.go Unify the re-balancing logic for ec.encode with ec.balance. (#6339) 2024-12-10 13:30:13 -08:00
command_ec_encode.go convert error fromating to %w everywhere (#6995) 2025-07-16 23:39:27 -07:00
command_ec_rebuild.go Unify the re-balancing logic for ec.encode with ec.balance. (#6339) 2024-12-10 13:30:13 -08:00
command_ec_test.go Delete legacy balancing code for ec.encode. (#6344) 2024-12-12 07:42:03 -08:00
command_fs_cat.go added context to filer_client method calls (#6808) 2025-05-22 09:46:49 -07:00
command_fs_cd.go refactor 2024-09-29 10:38:22 -07:00
command_fs_configure.go chore(deps): bump gocloud.dev from 0.40.0 to 0.41.0 (#6679) 2025-03-31 21:42:54 -07:00
command_fs_du.go added context to filer_client method calls (#6808) 2025-05-22 09:46:49 -07:00
command_fs_log.go added context to filer_client method calls (#6808) 2025-05-22 09:46:49 -07:00
command_fs_ls.go added context to filer_client method calls (#6808) 2025-05-22 09:46:49 -07:00
command_fs_merge_volumes.go Add context with request (#6824) 2025-05-28 11:34:02 -07:00
command_fs_meta_cat.go added context to filer_client method calls (#6808) 2025-05-22 09:46:49 -07:00
command_fs_meta_change_volume_id.go added context to filer_client method calls (#6808) 2025-05-22 09:46:49 -07:00
command_fs_meta_load.go added context to filer_client method calls (#6808) 2025-05-22 09:46:49 -07:00
command_fs_meta_notify.go refactor 2024-09-29 10:38:22 -07:00
command_fs_meta_save.go refactor 2024-09-29 10:38:22 -07:00
command_fs_mkdir.go refactor 2024-09-29 10:38:22 -07:00
command_fs_mv.go added context to filer_client method calls (#6808) 2025-05-22 09:46:49 -07:00
command_fs_pwd.go refactor 2024-09-29 10:38:22 -07:00
command_fs_rm.go added context to filer_client method calls (#6808) 2025-05-22 09:46:49 -07:00
command_fs_tree.go added context to filer_client method calls (#6808) 2025-05-22 09:46:49 -07:00
command_fs_verify.go Add context with request (#6824) 2025-05-28 11:34:02 -07:00
command_lock_unlock.go refactor 2024-09-29 10:38:22 -07:00
command_mount_configure.go refactor 2024-09-29 10:38:22 -07:00
command_mq_balance.go refactor 2024-09-29 10:38:22 -07:00
command_mq_topic_compact.go merge current message queue code changes (#6201) 2024-11-04 12:08:25 -08:00
command_mq_topic_configure.go Add message queue agent (#6463) 2025-01-20 22:19:27 -08:00
command_mq_topic_desc.go Add message queue agent (#6463) 2025-01-20 22:19:27 -08:00
command_mq_topic_list.go convert error fromating to %w everywhere (#6995) 2025-07-16 23:39:27 -07:00
command_remote_cache.go convert error fromating to %w everywhere (#6995) 2025-07-16 23:39:27 -07:00
command_remote_configure.go added context to filer_client method calls (#6808) 2025-05-22 09:46:49 -07:00
command_remote_meta_sync.go convert error fromating to %w everywhere (#6995) 2025-07-16 23:39:27 -07:00
command_remote_mount.go convert error fromating to %w everywhere (#6995) 2025-07-16 23:39:27 -07:00
command_remote_mount_buckets.go convert error fromating to %w everywhere (#6995) 2025-07-16 23:39:27 -07:00
command_remote_uncache.go convert error fromating to %w everywhere (#6995) 2025-07-16 23:39:27 -07:00
command_remote_unmount.go convert error fromating to %w everywhere (#6995) 2025-07-16 23:39:27 -07:00
command_s3_bucket_create.go convert error fromating to %w everywhere (#6995) 2025-07-16 23:39:27 -07:00
command_s3_bucket_delete.go convert error fromating to %w everywhere (#6995) 2025-07-16 23:39:27 -07:00
command_s3_bucket_list.go convert error fromating to %w everywhere (#6995) 2025-07-16 23:39:27 -07:00
command_s3_bucket_quota.go convert error fromating to %w everywhere (#6995) 2025-07-16 23:39:27 -07:00
command_s3_bucket_quota_check.go convert error fromating to %w everywhere (#6995) 2025-07-16 23:39:27 -07:00
command_s3_circuitbreaker.go chore(deps): bump gocloud.dev from 0.40.0 to 0.41.0 (#6679) 2025-03-31 21:42:54 -07:00
command_s3_circuitbreaker_test.go refactor(shell): readability improvements (#3704) 2022-09-16 02:43:49 -07:00
command_s3_clean_uploads.go convert error fromating to %w everywhere (#6995) 2025-07-16 23:39:27 -07:00
command_s3_configure.go chore(deps): bump gocloud.dev from 0.40.0 to 0.41.0 (#6679) 2025-03-31 21:42:54 -07:00
command_volume_balance.go fix: consider EC shard count in volume.balance capacity calculation (#7034) 2025-07-28 12:24:56 -07:00
command_volume_balance_test.go [shell] only apply the balancing for writable volumes (#6346) 2024-12-13 01:10:00 -08:00
command_volume_check_disk.go convert error fromating to %w everywhere (#6995) 2025-07-16 23:39:27 -07:00
command_volume_check_disk_test.go fix: skipping checking active volumes with the same number of files at the moment (#4893) 2023-10-09 09:57:26 -07:00
command_volume_configure_replication.go convert error fromating to %w everywhere (#6995) 2025-07-16 23:39:27 -07:00
command_volume_copy.go [shell] volume copy add param noLock (#6871) 2025-06-16 07:39:19 -07:00
command_volume_delete.go refactor 2024-09-29 10:38:22 -07:00
command_volume_delete_empty.go Unify usage of shell.EcNode.dc as DataCenterId. (#6258) 2024-11-19 06:33:18 -08:00
command_volume_fix_replication.go Paralleize operations for weed shell's volume.fix.replication. (#6789) 2025-07-30 10:58:30 -07:00
command_volume_fix_replication_test.go Fix/copy before delete replication (#6064) 2024-09-26 08:34:13 -07:00
command_volume_fsck.go convert error fromating to %w everywhere (#6995) 2025-07-16 23:39:27 -07:00
command_volume_grow.go refactor 2024-09-29 10:38:22 -07:00
command_volume_list.go Admin: misc improvements on admin server and workers. EC now works. (#7055) 2025-07-30 12:38:03 -07:00
command_volume_list_test.go Improve EC shards rebalancing logic across racks (#6270) 2024-11-21 08:46:24 -08:00
command_volume_mark.go refactor 2024-09-29 10:38:22 -07:00
command_volume_mount.go refactor 2024-09-29 10:38:22 -07:00
command_volume_move.go Parallelize volume replica operations within ec.encode. (#6374) 2024-12-18 11:59:48 -08:00
command_volume_server_evacuate.go "golang.org/x/exp/slices" => "slices" and go fmt 2024-12-19 19:25:06 -08:00
command_volume_server_evacuate_test.go fix tests 2023-03-13 10:00:27 -07:00
command_volume_server_leave.go refactor 2024-09-29 10:38:22 -07:00
command_volume_tier_download.go Unify usage of shell.EcNode.dc as DataCenterId. (#6258) 2024-11-19 06:33:18 -08:00
command_volume_tier_move.go Unify usage of shell.EcNode.dc as DataCenterId. (#6258) 2024-11-19 06:33:18 -08:00
command_volume_tier_upload.go fix command_volume_tier_upload bug (#7041) 2025-07-28 12:34:43 -07:00
command_volume_unmount.go refactor 2024-09-29 10:38:22 -07:00
command_volume_vacuum.go refactor 2024-09-29 10:38:22 -07:00
command_volume_vacuum_disable.go refactor 2024-09-29 10:38:22 -07:00
command_volume_vacuum_enable.go refactor 2024-09-29 10:38:22 -07:00
commands.go added context to filer_client method calls (#6808) 2025-05-22 09:46:49 -07:00
common.go Nit: unify the default --maxParallelization value for weed shell commands supporting this option (#6788) 2025-05-13 07:59:26 -07:00
shell_liner.go add more help message 2025-03-13 09:11:16 -07:00
volume.ecshards.txt Improve EC shards rebalancing logic across racks (#6270) 2024-11-21 08:46:24 -08:00
volume.list.txt Revert "a new test case" 2022-09-10 15:35:42 -07:00
volume.list2.txt tests add parsing ec shard info 2022-10-09 22:47:55 -07:00