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
This commit is contained in:
4
Makefile
4
Makefile
@@ -18,12 +18,12 @@ full_install: admin-generate
|
|||||||
cd weed; go install -tags "elastic gocdk sqlite ydb tarantool tikv rclone"
|
cd weed; go install -tags "elastic gocdk sqlite ydb tarantool tikv rclone"
|
||||||
|
|
||||||
server: install
|
server: install
|
||||||
weed -v 0 server -s3 -filer -filer.maxMB=64 -volume.max=0 -master.volumeSizeLimitMB=100 -volume.preStopSeconds=1 -s3.port=8000 -s3.allowEmptyFolder=false -s3.allowDeleteBucketNotEmpty=true -s3.config=./docker/compose/s3.json -metricsPort=9324
|
weed -v 0 server -s3 -filer -filer.maxMB=64 -volume.max=0 -master.volumeSizeLimitMB=100 -volume.preStopSeconds=1 -s3.port=8000 -s3.allowDeleteBucketNotEmpty=true -s3.config=./docker/compose/s3.json -metricsPort=9324
|
||||||
|
|
||||||
benchmark: install warp_install
|
benchmark: install warp_install
|
||||||
pkill weed || true
|
pkill weed || true
|
||||||
pkill warp || true
|
pkill warp || true
|
||||||
weed server -debug=$(debug) -s3 -filer -volume.max=0 -master.volumeSizeLimitMB=100 -volume.preStopSeconds=1 -s3.port=8000 -s3.allowEmptyFolder=false -s3.allowDeleteBucketNotEmpty=false -s3.config=./docker/compose/s3.json &
|
weed server -debug=$(debug) -s3 -filer -volume.max=0 -master.volumeSizeLimitMB=100 -volume.preStopSeconds=1 -s3.port=8000 -s3.allowDeleteBucketNotEmpty=false -s3.config=./docker/compose/s3.json &
|
||||||
warp client &
|
warp client &
|
||||||
while ! nc -z localhost 8000 ; do sleep 1 ; done
|
while ! nc -z localhost 8000 ; do sleep 1 ; done
|
||||||
warp mixed --host=127.0.0.1:8000 --access-key=some_access_key1 --secret-key=some_secret_key1 --autoterm
|
warp mixed --host=127.0.0.1:8000 --access-key=some_access_key1 --secret-key=some_secret_key1 --autoterm
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ services:
|
|||||||
- 8888:8888
|
- 8888:8888
|
||||||
- 18888:18888
|
- 18888:18888
|
||||||
- 8000:8000
|
- 8000:8000
|
||||||
command: 'filer -master="master:9333" -s3 -s3.config=/etc/seaweedfs/s3.json -s3.port=8000 -s3.allowEmptyFolder=false -s3.allowDeleteBucketNotEmpty=false'
|
command: 'filer -master="master:9333" -s3 -s3.config=/etc/seaweedfs/s3.json -s3.port=8000 -s3.allowDeleteBucketNotEmpty=false'
|
||||||
volumes:
|
volumes:
|
||||||
- ./s3.json:/etc/seaweedfs/s3.json
|
- ./s3.json:/etc/seaweedfs/s3.json
|
||||||
depends_on:
|
depends_on:
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ services:
|
|||||||
|
|
||||||
s3:
|
s3:
|
||||||
image: chrislusf/seaweedfs:local
|
image: chrislusf/seaweedfs:local
|
||||||
command: "server -ip=127.0.0.1 -filer -master.volumeSizeLimitMB=16 -volume.max=0 -volume -volume.preStopSeconds=1 -s3 -s3.config=/etc/seaweedfs/s3.json -s3.port=8000 -s3.allowEmptyFolder=false -s3.allowDeleteBucketNotEmpty=false"
|
command: "server -ip=127.0.0.1 -filer -master.volumeSizeLimitMB=16 -volume.max=0 -volume -volume.preStopSeconds=1 -s3 -s3.config=/etc/seaweedfs/s3.json -s3.port=8000 -s3.allowDeleteBucketNotEmpty=false"
|
||||||
volumes:
|
volumes:
|
||||||
- ./s3.json:/etc/seaweedfs/s3.json
|
- ./s3.json:/etc/seaweedfs/s3.json
|
||||||
environment:
|
environment:
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ services:
|
|||||||
- 8888:8888
|
- 8888:8888
|
||||||
- 8000:8000
|
- 8000:8000
|
||||||
- 18888:18888
|
- 18888:18888
|
||||||
command: "server -ip=s3 -filer -master.volumeSizeLimitMB=16 -volume.max=0 -volume -volume.preStopSeconds=1 -s3 -s3.config=/etc/seaweedfs/s3.json -s3.port=8000 -s3.allowEmptyFolder=false -s3.allowDeleteBucketNotEmpty=false"
|
command: "server -ip=s3 -filer -master.volumeSizeLimitMB=16 -volume.max=0 -volume -volume.preStopSeconds=1 -s3 -s3.config=/etc/seaweedfs/s3.json -s3.port=8000 -s3.allowDeleteBucketNotEmpty=false"
|
||||||
volumes:
|
volumes:
|
||||||
- ./s3.json:/etc/seaweedfs/s3.json
|
- ./s3.json:/etc/seaweedfs/s3.json
|
||||||
environment:
|
environment:
|
||||||
|
|||||||
@@ -246,11 +246,6 @@ spec:
|
|||||||
-s3.cert.file=/usr/local/share/ca-certificates/client/tls.crt \
|
-s3.cert.file=/usr/local/share/ca-certificates/client/tls.crt \
|
||||||
-s3.key.file=/usr/local/share/ca-certificates/client/tls.key \
|
-s3.key.file=/usr/local/share/ca-certificates/client/tls.key \
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if ne .Values.allInOne.s3.allowEmptyFolder nil }}
|
|
||||||
-s3.allowEmptyFolder={{ .Values.allInOne.s3.allowEmptyFolder }} \
|
|
||||||
{{- else if ne .Values.s3.allowEmptyFolder nil }}
|
|
||||||
-s3.allowEmptyFolder={{ .Values.s3.allowEmptyFolder }} \
|
|
||||||
{{- end }}
|
|
||||||
{{- if or .Values.allInOne.s3.enableAuth .Values.s3.enableAuth .Values.filer.s3.enableAuth }}
|
{{- if or .Values.allInOne.s3.enableAuth .Values.s3.enableAuth .Values.filer.s3.enableAuth }}
|
||||||
-s3.config=/etc/sw/s3/seaweedfs_s3_config \
|
-s3.config=/etc/sw/s3/seaweedfs_s3_config \
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|||||||
@@ -213,9 +213,6 @@ spec:
|
|||||||
-s3.cert.file=/usr/local/share/ca-certificates/client/tls.crt \
|
-s3.cert.file=/usr/local/share/ca-certificates/client/tls.crt \
|
||||||
-s3.key.file=/usr/local/share/ca-certificates/client/tls.key \
|
-s3.key.file=/usr/local/share/ca-certificates/client/tls.key \
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if eq (typeOf .Values.filer.s3.allowEmptyFolder) "bool" }}
|
|
||||||
-s3.allowEmptyFolder={{ .Values.filer.s3.allowEmptyFolder }} \
|
|
||||||
{{- end }}
|
|
||||||
{{- if .Values.filer.s3.enableAuth }}
|
{{- if .Values.filer.s3.enableAuth }}
|
||||||
-s3.config=/etc/sw/seaweedfs_s3_config \
|
-s3.config=/etc/sw/seaweedfs_s3_config \
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|||||||
@@ -143,9 +143,6 @@ spec:
|
|||||||
{{- if .Values.s3.domainName }}
|
{{- if .Values.s3.domainName }}
|
||||||
-domainName={{ .Values.s3.domainName }} \
|
-domainName={{ .Values.s3.domainName }} \
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if eq (typeOf .Values.s3.allowEmptyFolder) "bool" }}
|
|
||||||
-allowEmptyFolder={{ .Values.s3.allowEmptyFolder }} \
|
|
||||||
{{- end }}
|
|
||||||
{{- if .Values.s3.enableAuth }}
|
{{- if .Values.s3.enableAuth }}
|
||||||
-config=/etc/sw/seaweedfs_s3_config \
|
-config=/etc/sw/seaweedfs_s3_config \
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|||||||
@@ -856,8 +856,6 @@ filer:
|
|||||||
port: 8333
|
port: 8333
|
||||||
# add additional https port
|
# add additional https port
|
||||||
httpsPort: 0
|
httpsPort: 0
|
||||||
# allow empty folders
|
|
||||||
allowEmptyFolder: false
|
|
||||||
# Suffix of the host name, {bucket}.{domainName}
|
# Suffix of the host name, {bucket}.{domainName}
|
||||||
domainName: ""
|
domainName: ""
|
||||||
# enable user & permission to s3 (need to inject to all services)
|
# enable user & permission to s3 (need to inject to all services)
|
||||||
@@ -885,8 +883,6 @@ s3:
|
|||||||
httpsPort: 0
|
httpsPort: 0
|
||||||
metricsPort: 9327
|
metricsPort: 9327
|
||||||
loggingOverrideLevel: null
|
loggingOverrideLevel: null
|
||||||
# allow empty folders
|
|
||||||
allowEmptyFolder: true
|
|
||||||
# enable user & permission to s3 (need to inject to all services)
|
# enable user & permission to s3 (need to inject to all services)
|
||||||
enableAuth: false
|
enableAuth: false
|
||||||
# set to the name of an existing kubernetes Secret with the s3 json config file
|
# set to the name of an existing kubernetes Secret with the s3 json config file
|
||||||
@@ -1133,7 +1129,6 @@ allInOne:
|
|||||||
port: null # S3 gateway port (null inherits from s3.port)
|
port: null # S3 gateway port (null inherits from s3.port)
|
||||||
httpsPort: null # S3 gateway HTTPS port (null inherits from s3.httpsPort)
|
httpsPort: null # S3 gateway HTTPS port (null inherits from s3.httpsPort)
|
||||||
domainName: null # Suffix of the host name (null inherits from s3.domainName)
|
domainName: null # Suffix of the host name (null inherits from s3.domainName)
|
||||||
allowEmptyFolder: null # Allow empty folders in S3 (null inherits from s3.allowEmptyFolder)
|
|
||||||
enableAuth: false # Enable user & permission to S3
|
enableAuth: false # Enable user & permission to S3
|
||||||
# Set to the name of an existing kubernetes Secret with the s3 json config file
|
# Set to the name of an existing kubernetes Secret with the s3 json config file
|
||||||
# should have a secret key called seaweedfs_s3_config with an inline json config
|
# should have a secret key called seaweedfs_s3_config with an inline json config
|
||||||
|
|||||||
@@ -147,7 +147,7 @@ services:
|
|||||||
- "8888:8888"
|
- "8888:8888"
|
||||||
- "8333:8333"
|
- "8333:8333"
|
||||||
- "18888:18888"
|
- "18888:18888"
|
||||||
command: "server -ip=seaweedfs -filer -master.volumeSizeLimitMB=16 -volume.max=0 -volume -volume.preStopSeconds=1 -s3 -s3.config=/etc/seaweedfs/s3.json -s3.port=8333 -s3.allowEmptyFolder=false -s3.allowDeleteBucketNotEmpty=false"
|
command: "server -ip=seaweedfs -filer -master.volumeSizeLimitMB=16 -volume.max=0 -volume -volume.preStopSeconds=1 -s3 -s3.config=/etc/seaweedfs/s3.json -s3.port=8333 -s3.allowDeleteBucketNotEmpty=false"
|
||||||
volumes:
|
volumes:
|
||||||
- ./s3.json:/etc/seaweedfs/s3.json
|
- ./s3.json:/etc/seaweedfs/s3.json
|
||||||
- ./filer.toml:/etc/seaweedfs/filer.toml
|
- ./filer.toml:/etc/seaweedfs/filer.toml
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ services:
|
|||||||
- WEED_FOUNDATIONDB_MAX_RETRY_DELAY
|
- WEED_FOUNDATIONDB_MAX_RETRY_DELAY
|
||||||
- WEED_MASTER_VOLUME_GROWTH_COPY_1=1
|
- WEED_MASTER_VOLUME_GROWTH_COPY_1=1
|
||||||
- WEED_MASTER_VOLUME_GROWTH_COPY_OTHER=1
|
- WEED_MASTER_VOLUME_GROWTH_COPY_OTHER=1
|
||||||
command: "weed server -ip=seaweedfs -filer -master.volumeSizeLimitMB=16 -volume.max=0 -volume -volume.preStopSeconds=1 -s3 -s3.config=/etc/seaweedfs/s3.json -s3.port=8333 -s3.allowEmptyFolder=false -s3.allowDeleteBucketNotEmpty=false"
|
command: "weed server -ip=seaweedfs -filer -master.volumeSizeLimitMB=16 -volume.max=0 -volume -volume.preStopSeconds=1 -s3 -s3.config=/etc/seaweedfs/s3.json -s3.port=8333 -s3.allowDeleteBucketNotEmpty=false"
|
||||||
|
|
||||||
configs:
|
configs:
|
||||||
fdb.cluster:
|
fdb.cluster:
|
||||||
|
|||||||
@@ -30,7 +30,6 @@ services:
|
|||||||
- -s3=true
|
- -s3=true
|
||||||
- -s3.port=8333
|
- -s3.port=8333
|
||||||
- -webdav=false
|
- -webdav=false
|
||||||
- -s3.allowEmptyFolder=false
|
|
||||||
- -mq.broker=true
|
- -mq.broker=true
|
||||||
- -mq.agent=true
|
- -mq.agent=true
|
||||||
- -ip=seaweedfs
|
- -ip=seaweedfs
|
||||||
|
|||||||
@@ -79,12 +79,11 @@ start-server: check-deps
|
|||||||
@echo "🔍 DEBUG: Creating volume directory..."
|
@echo "🔍 DEBUG: Creating volume directory..."
|
||||||
@mkdir -p ./test-volume-data
|
@mkdir -p ./test-volume-data
|
||||||
@echo "🔍 DEBUG: Launching SeaweedFS server in background..."
|
@echo "🔍 DEBUG: Launching SeaweedFS server in background..."
|
||||||
@echo "🔍 DEBUG: Command: $(WEED_BINARY) server -debug -s3 -s3.port=$(S3_PORT) -s3.allowEmptyFolder=false -s3.allowDeleteBucketNotEmpty=true -s3.config=../../../docker/compose/s3.json -filer -filer.maxMB=64 -master.volumeSizeLimitMB=50 -volume.max=100 -dir=./test-volume-data -volume.preStopSeconds=1 -metricsPort=9324"
|
@echo "🔍 DEBUG: Command: $(WEED_BINARY) server -debug -s3 -s3.port=$(S3_PORT) -s3.allowDeleteBucketNotEmpty=true -s3.config=../../../docker/compose/s3.json -filer -filer.maxMB=64 -master.volumeSizeLimitMB=50 -volume.max=100 -dir=./test-volume-data -volume.preStopSeconds=1 -metricsPort=9324"
|
||||||
@$(WEED_BINARY) server \
|
@$(WEED_BINARY) server \
|
||||||
-debug \
|
-debug \
|
||||||
-s3 \
|
-s3 \
|
||||||
-s3.port=$(S3_PORT) \
|
-s3.port=$(S3_PORT) \
|
||||||
-s3.allowEmptyFolder=false \
|
|
||||||
-s3.allowDeleteBucketNotEmpty=true \
|
-s3.allowDeleteBucketNotEmpty=true \
|
||||||
-s3.config=../../../docker/compose/s3.json \
|
-s3.config=../../../docker/compose/s3.json \
|
||||||
-filer \
|
-filer \
|
||||||
|
|||||||
@@ -81,12 +81,11 @@ start-server: check-deps
|
|||||||
@echo "🔍 DEBUG: Creating volume directory..."
|
@echo "🔍 DEBUG: Creating volume directory..."
|
||||||
@mkdir -p ./test-volume-data
|
@mkdir -p ./test-volume-data
|
||||||
@echo "🔍 DEBUG: Launching SeaweedFS server in background..."
|
@echo "🔍 DEBUG: Launching SeaweedFS server in background..."
|
||||||
@echo "🔍 DEBUG: Command: $(WEED_BINARY) server -debug -s3 -s3.port=$(S3_PORT) -s3.allowEmptyFolder=false -s3.allowDeleteBucketNotEmpty=true -s3.config=../../../docker/compose/s3.json -filer -filer.maxMB=64 -master.volumeSizeLimitMB=50 -volume.max=100 -dir=./test-volume-data -volume.preStopSeconds=1 -metricsPort=9324"
|
@echo "🔍 DEBUG: Command: $(WEED_BINARY) server -debug -s3 -s3.port=$(S3_PORT) -s3.allowDeleteBucketNotEmpty=true -s3.config=../../../docker/compose/s3.json -filer -filer.maxMB=64 -master.volumeSizeLimitMB=50 -volume.max=100 -dir=./test-volume-data -volume.preStopSeconds=1 -metricsPort=9324"
|
||||||
@$(WEED_BINARY) server \
|
@$(WEED_BINARY) server \
|
||||||
-debug \
|
-debug \
|
||||||
-s3 \
|
-s3 \
|
||||||
-s3.port=$(S3_PORT) \
|
-s3.port=$(S3_PORT) \
|
||||||
-s3.allowEmptyFolder=false \
|
|
||||||
-s3.allowDeleteBucketNotEmpty=true \
|
-s3.allowDeleteBucketNotEmpty=true \
|
||||||
-s3.config=../../../docker/compose/s3.json \
|
-s3.config=../../../docker/compose/s3.json \
|
||||||
-filer \
|
-filer \
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ start-server: check-deps
|
|||||||
@echo "🔍 DEBUG: Creating volume directory..."
|
@echo "🔍 DEBUG: Creating volume directory..."
|
||||||
@mkdir -p ./test-volume-data
|
@mkdir -p ./test-volume-data
|
||||||
@echo "🔍 DEBUG: Launching SeaweedFS server in background..."
|
@echo "🔍 DEBUG: Launching SeaweedFS server in background..."
|
||||||
@echo "🔍 DEBUG: Command: $(WEED_BINARY) server -filer -filer.maxMB=64 -s3 -ip.bind 0.0.0.0 -dir=./test-volume-data -master.raftHashicorp -master.electionTimeout 1s -master.volumeSizeLimitMB=100 -volume.max=100 -volume.preStopSeconds=1 -master.port=$(MASTER_PORT) -volume.port=$(VOLUME_PORT) -filer.port=$(FILER_PORT) -s3.port=$(S3_PORT) -metricsPort=9329 -s3.allowEmptyFolder=false -s3.allowDeleteBucketNotEmpty=true -s3.config=../../../docker/compose/s3.json -master.peers=none"
|
@echo "🔍 DEBUG: Command: $(WEED_BINARY) server -filer -filer.maxMB=64 -s3 -ip.bind 0.0.0.0 -dir=./test-volume-data -master.raftHashicorp -master.electionTimeout 1s -master.volumeSizeLimitMB=100 -volume.max=100 -volume.preStopSeconds=1 -master.port=$(MASTER_PORT) -volume.port=$(VOLUME_PORT) -filer.port=$(FILER_PORT) -s3.port=$(S3_PORT) -metricsPort=9329 -s3.allowDeleteBucketNotEmpty=true -s3.config=../../../docker/compose/s3.json -master.peers=none"
|
||||||
@$(WEED_BINARY) server \
|
@$(WEED_BINARY) server \
|
||||||
-filer \
|
-filer \
|
||||||
-filer.maxMB=64 \
|
-filer.maxMB=64 \
|
||||||
@@ -94,7 +94,6 @@ start-server: check-deps
|
|||||||
-filer.port=$(FILER_PORT) \
|
-filer.port=$(FILER_PORT) \
|
||||||
-s3.port=$(S3_PORT) \
|
-s3.port=$(S3_PORT) \
|
||||||
-metricsPort=9329 \
|
-metricsPort=9329 \
|
||||||
-s3.allowEmptyFolder=false \
|
|
||||||
-s3.allowDeleteBucketNotEmpty=true \
|
-s3.allowDeleteBucketNotEmpty=true \
|
||||||
-s3.config=../../../docker/compose/s3.json \
|
-s3.config=../../../docker/compose/s3.json \
|
||||||
-master.peers=none \
|
-master.peers=none \
|
||||||
|
|||||||
@@ -81,12 +81,11 @@ start-server: check-deps
|
|||||||
@echo "🔍 DEBUG: Creating volume directory..."
|
@echo "🔍 DEBUG: Creating volume directory..."
|
||||||
@mkdir -p ./test-volume-data
|
@mkdir -p ./test-volume-data
|
||||||
@echo "🔍 DEBUG: Launching SeaweedFS server in background..."
|
@echo "🔍 DEBUG: Launching SeaweedFS server in background..."
|
||||||
@echo "🔍 DEBUG: Command: $(WEED_BINARY) server -debug -s3 -s3.port=$(S3_PORT) -s3.allowEmptyFolder=false -s3.allowDeleteBucketNotEmpty=true -s3.config=../../../docker/compose/s3.json -filer -filer.maxMB=64 -master.volumeSizeLimitMB=50 -volume.max=100 -dir=./test-volume-data -volume.preStopSeconds=1 -metricsPort=9324"
|
@echo "🔍 DEBUG: Command: $(WEED_BINARY) server -debug -s3 -s3.port=$(S3_PORT) -s3.allowDeleteBucketNotEmpty=true -s3.config=../../../docker/compose/s3.json -filer -filer.maxMB=64 -master.volumeSizeLimitMB=50 -volume.max=100 -dir=./test-volume-data -volume.preStopSeconds=1 -metricsPort=9324"
|
||||||
@$(WEED_BINARY) server \
|
@$(WEED_BINARY) server \
|
||||||
-debug \
|
-debug \
|
||||||
-s3 \
|
-s3 \
|
||||||
-s3.port=$(S3_PORT) \
|
-s3.port=$(S3_PORT) \
|
||||||
-s3.allowEmptyFolder=false \
|
|
||||||
-s3.allowDeleteBucketNotEmpty=true \
|
-s3.allowDeleteBucketNotEmpty=true \
|
||||||
-s3.config=../../../docker/compose/s3.json \
|
-s3.config=../../../docker/compose/s3.json \
|
||||||
-filer \
|
-filer \
|
||||||
@@ -222,7 +221,7 @@ test-with-server: start-server
|
|||||||
test-versioning-with-configs: check-deps
|
test-versioning-with-configs: check-deps
|
||||||
@echo "Testing with different S3 configurations..."
|
@echo "Testing with different S3 configurations..."
|
||||||
@echo "Testing with empty folder allowed..."
|
@echo "Testing with empty folder allowed..."
|
||||||
@$(WEED_BINARY) server -s3 -s3.port=$(S3_PORT) -s3.allowEmptyFolder=true -filer -master.volumeSizeLimitMB=100 -volume.max=100 > weed-test-config1.log 2>&1 & echo $$! > weed-config1.pid
|
@$(WEED_BINARY) server -s3 -s3.port=$(S3_PORT) -filer -master.volumeSizeLimitMB=100 -volume.max=100 > weed-test-config1.log 2>&1 & echo $$! > weed-config1.pid
|
||||||
@sleep 5
|
@sleep 5
|
||||||
@go test -v -timeout=5m -run "TestVersioningBasicWorkflow" . || true
|
@go test -v -timeout=5m -run "TestVersioningBasicWorkflow" . || true
|
||||||
@if [ -f weed-config1.pid ]; then kill -TERM $$(cat weed-config1.pid) 2>/dev/null || true; rm -f weed-config1.pid; fi
|
@if [ -f weed-config1.pid ]; then kill -TERM $$(cat weed-config1.pid) 2>/dev/null || true; rm -f weed-config1.pid; fi
|
||||||
@@ -268,7 +267,6 @@ debug-server:
|
|||||||
-debug \
|
-debug \
|
||||||
-s3 \
|
-s3 \
|
||||||
-s3.port=$(S3_PORT) \
|
-s3.port=$(S3_PORT) \
|
||||||
-s3.allowEmptyFolder=false \
|
|
||||||
-s3.allowDeleteBucketNotEmpty=true \
|
-s3.allowDeleteBucketNotEmpty=true \
|
||||||
-s3.config=../../../docker/compose/s3.json \
|
-s3.config=../../../docker/compose/s3.json \
|
||||||
-filer \
|
-filer \
|
||||||
@@ -317,7 +315,6 @@ start-server-simple: check-deps
|
|||||||
-debug \
|
-debug \
|
||||||
-s3 \
|
-s3 \
|
||||||
-s3.port=$(S3_PORT) \
|
-s3.port=$(S3_PORT) \
|
||||||
-s3.allowEmptyFolder=false \
|
|
||||||
-s3.allowDeleteBucketNotEmpty=true \
|
-s3.allowDeleteBucketNotEmpty=true \
|
||||||
-s3.config=../../../docker/compose/s3.json \
|
-s3.config=../../../docker/compose/s3.json \
|
||||||
-filer \
|
-filer \
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ func init() {
|
|||||||
filerS3Options.tlsCertificate = cmdFiler.Flag.String("s3.cert.file", "", "path to the TLS certificate file")
|
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.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.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.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.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")
|
filerS3Options.tlsCACertificate = cmdFiler.Flag.String("s3.cacert.file", "", "path to the TLS CA certificate file")
|
||||||
|
|||||||
@@ -49,7 +49,6 @@ type S3Options struct {
|
|||||||
tlsVerifyClientCert *bool
|
tlsVerifyClientCert *bool
|
||||||
metricsHttpPort *int
|
metricsHttpPort *int
|
||||||
metricsHttpIp *string
|
metricsHttpIp *string
|
||||||
allowEmptyFolder *bool
|
|
||||||
allowDeleteBucketNotEmpty *bool
|
allowDeleteBucketNotEmpty *bool
|
||||||
auditLogConfig *string
|
auditLogConfig *string
|
||||||
localFilerSocket *string
|
localFilerSocket *string
|
||||||
@@ -80,7 +79,7 @@ func init() {
|
|||||||
s3StandaloneOptions.tlsVerifyClientCert = cmdS3.Flag.Bool("tlsVerifyClientCert", false, "whether to verify the client's certificate")
|
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.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.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.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.localFilerSocket = cmdS3.Flag.String("localFilerSocket", "", "local filer socket path")
|
||||||
s3StandaloneOptions.localSocket = cmdS3.Flag.String("localSocket", "", "default to /tmp/seaweedfs-s3-<port>.sock")
|
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, ","),
|
AllowedOrigins: strings.Split(*s3opt.allowedOrigins, ","),
|
||||||
BucketsPath: filerBucketsPath,
|
BucketsPath: filerBucketsPath,
|
||||||
GrpcDialOption: grpcDialOption,
|
GrpcDialOption: grpcDialOption,
|
||||||
AllowEmptyFolder: *s3opt.allowEmptyFolder,
|
|
||||||
AllowDeleteBucketNotEmpty: *s3opt.allowDeleteBucketNotEmpty,
|
AllowDeleteBucketNotEmpty: *s3opt.allowDeleteBucketNotEmpty,
|
||||||
LocalFilerSocket: localFilerSocket,
|
LocalFilerSocket: localFilerSocket,
|
||||||
DataCenter: *s3opt.dataCenter,
|
DataCenter: *s3opt.dataCenter,
|
||||||
|
|||||||
@@ -166,7 +166,7 @@ func init() {
|
|||||||
s3Options.config = cmdServer.Flag.String("s3.config", "", "path to the config file")
|
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.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.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.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.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.")
|
s3Options.bindIp = cmdServer.Flag.String("s3.ip.bind", "", "ip address to bind to. If empty, default to same as -ip.bind option.")
|
||||||
|
|||||||
@@ -554,15 +554,7 @@ func (s3a *S3ApiServer) doListFilerEntries(client filer_pb.SeaweedFilerClient, d
|
|||||||
}
|
}
|
||||||
// println("doListFilerEntries2 nextMarker", nextMarker)
|
// println("doListFilerEntries2 nextMarker", nextMarker)
|
||||||
} else {
|
} else {
|
||||||
var isEmpty bool
|
eachEntryFn(dir, entry)
|
||||||
if !s3a.option.AllowEmptyFolder && entry.IsOlderDir() {
|
|
||||||
//if isEmpty, err = s3a.ensureDirectoryAllEmpty(client, dir, entry.Name); err != nil {
|
|
||||||
// glog.Errorf("check empty folder %s: %v", dir, err)
|
|
||||||
//}
|
|
||||||
}
|
|
||||||
if !isEmpty {
|
|
||||||
eachEntryFn(dir, entry)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
eachEntryFn(dir, entry)
|
eachEntryFn(dir, entry)
|
||||||
|
|||||||
@@ -43,7 +43,6 @@ type S3ApiServerOption struct {
|
|||||||
AllowedOrigins []string
|
AllowedOrigins []string
|
||||||
BucketsPath string
|
BucketsPath string
|
||||||
GrpcDialOption grpc.DialOption
|
GrpcDialOption grpc.DialOption
|
||||||
AllowEmptyFolder bool
|
|
||||||
AllowDeleteBucketNotEmpty bool
|
AllowDeleteBucketNotEmpty bool
|
||||||
LocalFilerSocket string
|
LocalFilerSocket string
|
||||||
DataCenter string
|
DataCenter string
|
||||||
|
|||||||
Reference in New Issue
Block a user