You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "navinko (via GitHub)" <gi...@apache.org> on 2026/03/15 16:39:49 UTC
[PR] HDDS-14805. Escape log4j variables in docker-compose templates [ozone]
navinko opened a new pull request, #9930:
URL: https://github.com/apache/ozone/pull/9930
## What changes were proposed in this pull request?
This PR fixes an issue in the Ozone docker-compose templates where ${} patterns inside Log4j configuration were interpreted by docker-compose as environment variable substitutions.This change escapes the Log4j variable expressions in the docker-compose templates so that they are preserved and correctly interpreted by Log4j at runtime instead of being processed by docker-compose.
As per docker doc: https://github.com/docker/docs/blob/3c79e7c2ac175507a245f55602549e8cecc1b6e1/content/reference/compose-file/interpolation.md?plain=1#L38
## What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-14805
## How was this patch tested?
CI : https://github.com/navinko/ozone/actions/runs/23108826668
#Before fix (Broken)
> % docker-compose up -d
WARN[0000] The "hostName" variable is not set. Defaulting to a blank string.
Invalid template: "${sys:hadoop.log.dir}/om-audit-${hostName}.log"
#After fix (Working)
> % docker-compose up -d
[+] Running 6/6
✔ Network ozone-om-ha_default Created 0.0s
✔ Container ozone-om-ha-scm-1 Started 0.6s
✔ Container ozone-om-ha-om2-1 Started 0.6s
✔ Container ozone-om-ha-om3-1 Started 0.6s
✔ Container ozone-om-ha-datanode-1 Started 0.6s
✔ Container ozone-om-ha-om1-1 Started 0.5s
nakumar@FQV6LJQVJC ozone-om-ha % docker-compose exec -it om1 bash
bash-5.1$ cd /var/log/hadoop
bash-5.1$ ls -lart
total 12
drwxr-xr-x 1 root root 4096 Feb 6 11:50 ..
-rw-r--r-- 1 hadoop hadoop 0 Mar 15 16:36 om-audit-96bc0c52e252.log
-rw-r--r-- 1 hadoop hadoop 0 Mar 15 16:36 om-sys-audit-96bc0c52e252.log
drwxrwxrwt 1 root root 4096 Mar 15 16:36 .
bash-5.1$
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-14805. Escape log4j variables in docker-compose templates [ozone]
Posted by "priyeshkaratha (via GitHub)" <gi...@apache.org>.
priyeshkaratha commented on PR #9930:
URL: https://github.com/apache/ozone/pull/9930#issuecomment-4072245872
I can see similar entries at hadoop-ozone/fault-injection-test/network-tests/src/test/compose/docker-config also. Can you check whether this change require here too?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-14805. Escape log4j variables in docker-compose templates [ozone]
Posted by "navinko (via GitHub)" <gi...@apache.org>.
navinko commented on PR #9930:
URL: https://github.com/apache/ozone/pull/9930#issuecomment-4089417631
Thanks @priyeshkaratha @adoroszlai for reviewing and merging.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org