diff options
| author | chrislu <chris.lu@gmail.com> | 2025-12-06 21:52:44 -0800 |
|---|---|---|
| committer | chrislu <chris.lu@gmail.com> | 2025-12-06 21:54:12 -0800 |
| commit | 5167bbd2a9ecc832c566a5a21819dfd9b5384358 (patch) | |
| tree | df8b95873d69ef4abf25db79d51c50f436dc53ff /weed/command | |
| parent | 55f0fbf364ca64ee2016d3fed6b8163936f3155d (diff) | |
| download | seaweedfs-5167bbd2a9ecc832c566a5a21819dfd9b5384358.tar.xz seaweedfs-5167bbd2a9ecc832c566a5a21819dfd9b5384358.zip | |
Remove deprecated allowEmptyFolder CLI option
The allowEmptyFolder option is no longer functional because:
1. The code that used it was already commented out
2. Empty folder cleanup is now handled asynchronously by EmptyFolderCleaner
The CLI flags are kept for backward compatibility but marked as deprecated
and ignored. This removes:
- S3ApiServerOption.AllowEmptyFolder field
- The actual usage in s3api_object_handlers_list.go
- Helm chart values and template references
- References in test Makefiles and docker-compose files
Diffstat (limited to 'weed/command')
| -rw-r--r-- | weed/command/filer.go | 2 | ||||
| -rw-r--r-- | weed/command/s3.go | 4 | ||||
| -rw-r--r-- | weed/command/server.go | 2 |
3 files changed, 3 insertions, 5 deletions
diff --git a/weed/command/filer.go b/weed/command/filer.go index bb7092543..0e3154819 100644 --- a/weed/command/filer.go +++ b/weed/command/filer.go @@ -122,7 +122,7 @@ func init() { filerS3Options.tlsCertificate = cmdFiler.Flag.String("s3.cert.file", "", "path to the TLS certificate file") filerS3Options.config = cmdFiler.Flag.String("s3.config", "", "path to the config file") filerS3Options.auditLogConfig = cmdFiler.Flag.String("s3.auditLogConfig", "", "path to the audit log config file") - filerS3Options.allowEmptyFolder = cmdFiler.Flag.Bool("s3.allowEmptyFolder", true, "allow empty folders") + cmdFiler.Flag.Bool("s3.allowEmptyFolder", true, "deprecated, ignored. Empty folder cleanup is now automatic.") filerS3Options.allowDeleteBucketNotEmpty = cmdFiler.Flag.Bool("s3.allowDeleteBucketNotEmpty", true, "allow recursive deleting all entries along with bucket") filerS3Options.localSocket = cmdFiler.Flag.String("s3.localSocket", "", "default to /tmp/seaweedfs-s3-<port>.sock") filerS3Options.tlsCACertificate = cmdFiler.Flag.String("s3.cacert.file", "", "path to the TLS CA certificate file") diff --git a/weed/command/s3.go b/weed/command/s3.go index ace6dd427..5fb34155b 100644 --- a/weed/command/s3.go +++ b/weed/command/s3.go @@ -49,7 +49,6 @@ type S3Options struct { tlsVerifyClientCert *bool metricsHttpPort *int metricsHttpIp *string - allowEmptyFolder *bool allowDeleteBucketNotEmpty *bool auditLogConfig *string localFilerSocket *string @@ -80,7 +79,7 @@ func init() { s3StandaloneOptions.tlsVerifyClientCert = cmdS3.Flag.Bool("tlsVerifyClientCert", false, "whether to verify the client's certificate") s3StandaloneOptions.metricsHttpPort = cmdS3.Flag.Int("metricsPort", 0, "Prometheus metrics listen port") s3StandaloneOptions.metricsHttpIp = cmdS3.Flag.String("metricsIp", "", "metrics listen ip. If empty, default to same as -ip.bind option.") - s3StandaloneOptions.allowEmptyFolder = cmdS3.Flag.Bool("allowEmptyFolder", true, "allow empty folders") + cmdS3.Flag.Bool("allowEmptyFolder", true, "deprecated, ignored. Empty folder cleanup is now automatic.") s3StandaloneOptions.allowDeleteBucketNotEmpty = cmdS3.Flag.Bool("allowDeleteBucketNotEmpty", true, "allow recursive deleting all entries along with bucket") s3StandaloneOptions.localFilerSocket = cmdS3.Flag.String("localFilerSocket", "", "local filer socket path") s3StandaloneOptions.localSocket = cmdS3.Flag.String("localSocket", "", "default to /tmp/seaweedfs-s3-<port>.sock") @@ -273,7 +272,6 @@ func (s3opt *S3Options) startS3Server() bool { AllowedOrigins: strings.Split(*s3opt.allowedOrigins, ","), BucketsPath: filerBucketsPath, GrpcDialOption: grpcDialOption, - AllowEmptyFolder: *s3opt.allowEmptyFolder, AllowDeleteBucketNotEmpty: *s3opt.allowDeleteBucketNotEmpty, LocalFilerSocket: localFilerSocket, DataCenter: *s3opt.dataCenter, diff --git a/weed/command/server.go b/weed/command/server.go index 75997c75a..7d1606189 100644 --- a/weed/command/server.go +++ b/weed/command/server.go @@ -166,7 +166,7 @@ func init() { s3Options.config = cmdServer.Flag.String("s3.config", "", "path to the config file") s3Options.iamConfig = cmdServer.Flag.String("s3.iam.config", "", "path to the advanced IAM config file for S3. Overrides -iam.config if both are provided.") s3Options.auditLogConfig = cmdServer.Flag.String("s3.auditLogConfig", "", "path to the audit log config file") - s3Options.allowEmptyFolder = cmdServer.Flag.Bool("s3.allowEmptyFolder", true, "allow empty folders") + cmdServer.Flag.Bool("s3.allowEmptyFolder", true, "deprecated, ignored. Empty folder cleanup is now automatic.") s3Options.allowDeleteBucketNotEmpty = cmdServer.Flag.Bool("s3.allowDeleteBucketNotEmpty", true, "allow recursive deleting all entries along with bucket") s3Options.localSocket = cmdServer.Flag.String("s3.localSocket", "", "default to /tmp/seaweedfs-s3-<port>.sock") s3Options.bindIp = cmdServer.Flag.String("s3.ip.bind", "", "ip address to bind to. If empty, default to same as -ip.bind option.") |
