Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Env variables used in JAVA_OPTIONS are not expanded #78

Open
cescoffier opened this issue Jul 12, 2017 · 2 comments
Open

Env variables used in JAVA_OPTIONS are not expanded #78

cescoffier opened this issue Jul 12, 2017 · 2 comments

Comments

@cescoffier
Copy link

For example, if I pass -Dsome-property=${CONTAINER_CORE_LIMIT:-1} in the JAVA_OPTIONS, the env variable is not expanded.

@rhuss
Copy link
Contributor

rhuss commented Jul 12, 2017

You mean for the variables set by the script itself ?

When calling a unix command / shell it's always the caller that expand the env var, so it should arrive already resolved when evaluated by the script. It is a very common convention that you do not an extra evaluation on the values of provided arguments or values of environment variables (which can lead to nasty side effects, too).

However for the variables determined and set by script itself I see your point (like CONTAINER_CORE_LIMIT etc) as it cannot expanded from the outside of course.

I agreed that we should allow a special treatment for these variables.

@cescoffier
Copy link
Author

Typically, I need to configure the number of Vert.x event loop based on the container core limit (not necessary set, so my default value). So, my approach was to extend the Vert.x generator (from the fabric8 mavne plugin) with -Dvertx.options.eventLoopPoolSize=${CONTAINER_CORE_LIMT:-2} but it does not get expanded.

Actually, the computation should be 2 * CONTAINER_CORE_LIMIT. So I probably would have to use expr which may lead to another issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants