[Bug] sbin/replace-conf-from-env.sh word-splits the whole environment and corrupts iotdb-system.properties
Mantenedores costumam responder em até 1 dia
Avaliação
- Dificuldade
- 2/5
- Tempo estimado
- 1-3 horas
- Facilidade para iniciantes
- 82/100
Direção de pesquisa
Leia sbin/replace-conf-from-env.sh por volta das linhas 56-58, depois execute a reprodução fornecida com docker e inspecione o final de conf/iotdb-system.properties. A correção estará concluída quando os valores de ambiente com várias palavras não forem divididos em linhas inúteis, as variáveis internas forem ignoradas e dn_rpc_address=0.0.0.0 continuar sendo aplicado de forma confiável.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Search before asking
- I searched in the issues and found nothing similar.
Version
- IoTDB Version 2.0.11
- Containerized deployment
Describe the bug and provide the minimal reproduce step
At container startup, replace-conf-from-env.sh regenerates iotdb-system.properties from the live environment. It iterates over env unquoted (for v in $(env), ~line 56), so any variable whose value contains spaces gets word-split into individual tokens. Every lowercase token then passes the key filter and is appended as a junk line, which shifts the script's delete-line-N / append-after-N sed math and can displace or drop legitimate overrides such as dn_rpc_address.
Minimal reproduce:
docker run --rm \
-e "SOME_VAR=this is a multi word value" \
-e "dn_rpc_address=0.0.0.0" \
apache/iotdb:2.0.11-standalone
Then inspect the tail of the generated config inside the container:
tail conf/iotdb-system.properties
What did you expect to see?
- Only real config keys patched from the environment.
- Multi-word env values ignored (or handled intact), never split and appended as junk.
dn_rpc_address=0.0.0.0reliably applied, so the DataNode binds0.0.0.0and accepts network connections.
What did you see instead?
The multi-word value was split and appended to iotdb-system.properties as separate lines, one word per line:
# dn_metric_reporter_list=
dn_metric_prometheus_reporter_port=9092
is
a
multi
word
value
_=/usr/bin/env
- Multi-word env values split into word-tokens, each appended as a junk property line (log symptoms: stray
append …lines andgrep: Unmatched [errors). - The trailing
_=/usr/bin/envline shows the internal-var guard is dead (see "Anything else?"). - The
sedline math shifted by the junk, dropping thedn_rpc_addressoverride so the DataNode fell back to the packaged default127.0.0.1and bound loopback-only. - Nondeterministic output: the same intended config produces different files depending on unrelated env values (and even
envordering).
Anything else?
Second bug in the same loop: the internal-var guard ! 2w$key_name =~ ^_ (~line 58) has a 2w typo, so the "skip internal vars" check never fires (e.g. append _=/usr/bin/env).
Suggested fix:
- Iterate with
env -0+read -r -d ''(or equivalent) so values are never word-split. - Restrict patching to an allowlist of known keys (
dn_*/cn_*/wal_*). - Fix the
2wtypo in the internal-var guard.
Are you willing to submit a PR?
- I'm willing to submit a PR!
- Linguagem predominante
- Java
- Estrelas
- 6.4k
- Forks
- 1.2k
- Merge médio
- 1d 18h
- PRs com merge (30d)
- 145
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de apache/iotdb
-
IoTDB Edge: stop-edge.sh does not stop its own process when IOTDB_HOME is set, and reports successTalvez já em andamento @PDGGK assumiu há 41 dias. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Mantenedores costumam responder em até 1 dia
-
[Bug] findColumn throws NullPointerException instead of SQLException for an unknown column nameTalvez já em andamento @PDGGK assumiu há 83 dias. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Mantenedores costumam responder em até 1 dia
-
[Bug] ResultSetMetaData.getCatalogName throws IndexOutOfBoundsException instead of SQLException for out-of-range columnsTalvez já em andamento @PDGGK assumiu há 85 dias. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Mantenedores costumam responder em até 1 dia
-
[Bug] health_check.bat creates a stray empty directory (e.g. C:\Program) when the install path contains a spaceTalvez já em andamento @wallner-avat assumiu há 94 dias. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Mantenedores costumam responder em até 1 dia
Todas as issues de apache/iotdb
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 66/100
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 64/100
utopia-rise/godot-jvm#1004 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
spring-projects/spring-grpc#442 ·
-
Expose numberOfPermits in RateLimiterEvent.toString() and the ratelimiterevents actuator DTOTalvez já em andamento Um pull request vinculado a esta issue está aberto ou já foi mesclado. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
resilience4j/resilience4j#2547 ·
Mantenedores costumam responder em até 9 dias
-
Clock.MakeDate continues execution and returns a rolled-over instant after dispatching error on invalid dateTalvez já em andamento Um pull request vinculado a esta issue está aberto ou já foi mesclado. Aberta
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 82/100
mit-cml/appinventor-sources#4155 ·
Mantenedores costumam responder em até 1 dia