Red Hat Fuse spring boot runtime could not start on OpenShift due to unresolved environemnt variable
Issue
To make a unique gc log file or each runtime pod, how to use the environment variables like "HOSTNAME" to the Deployment Config?
With the following settings, spring boot runtime could not start.
Part of Deployment Config
- env:
- name: JAVA_OPTIONS
value: -Xloggc:/tmp/${${HOSTNAME}_gc.log
Part of start up log
Error: Could not create the java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Invalid file name for use with -Xloggc: Filename can only contain the characters [A-Z][a-z][0-9]-_.%[p|t] but it has been /tmp/${HOSTNAME}_gc.log
Note %p or %t can only be used once
Environment
- Red Hat Fuse
- 7
- Open Shift Container Platform
- 3.x
- 4.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.