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
${prompt.text} and ${prompt.secret} double prompting #11564
Comments
@jaymode please could you take a look |
We allow setting the node's name a few different ways: the `name` system property, the setting `name`, and the setting `node.name`. There is an order of preference to these settings that gets applied, which can copy values from the system property or `node.name` setting to the `name` setting. When setting only `node.name` to one of the prompt placeholders, the user would be prompted twice as the value of `node.name` is copied to `name` prior to prompting for input. Additionally, the value entered by the user for `node.name` would not be used and only the value entered for `name` would be used. This fix changes the behavior to only prompt once when `node.name is set` and `name` is not set. This is accomplished by waiting until all values have been prompted and replaced, then the logic for determining the node's name is executed. Closes elastic#11564
We allow setting the node's name a few different ways: the `name` system property, the setting `name`, and the setting `node.name`. There is an order of preference to these settings that gets applied, which can copy values from the system property or `node.name` setting to the `name` setting. When setting only `node.name` to one of the prompt placeholders, the user would be prompted twice as the value of `node.name` is copied to `name` prior to prompting for input. Additionally, the value entered by the user for `node.name` would not be used and only the value entered for `name` would be used. This fix changes the behavior to only prompt once when `node.name is set` and `name` is not set. This is accomplished by waiting until all values have been prompted and replaced, then the logic for determining the node's name is executed. Closes #11564
We allow setting the node's name a few different ways: the `name` system property, the setting `name`, and the setting `node.name`. There is an order of preference to these settings that gets applied, which can copy values from the system property or `node.name` setting to the `name` setting. When setting only `node.name` to one of the prompt placeholders, the user would be prompted twice as the value of `node.name` is copied to `name` prior to prompting for input. Additionally, the value entered by the user for `node.name` would not be used and only the value entered for `name` would be used. This fix changes the behavior to only prompt once when `node.name is set` and `name` is not set. This is accomplished by waiting until all values have been prompted and replaced, then the logic for determining the node's name is executed. Closes #11564
We allow setting the node's name a few different ways: the `name` system property, the setting `name`, and the setting `node.name`. There is an order of preference to these settings that gets applied, which can copy values from the system property or `node.name` setting to the `name` setting. When setting only `node.name` to one of the prompt placeholders, the user would be prompted twice as the value of `node.name` is copied to `name` prior to prompting for input. Additionally, the value entered by the user for `node.name` would not be used and only the value entered for `name` would be used. This fix changes the behavior to only prompt once when `node.name is set` and `name` is not set. This is accomplished by waiting until all values have been prompted and replaced, then the logic for determining the node's name is executed. Closes elastic#11564
Looks to be still a problem on 2.1. Regression here? @GlenRSmith and I can confirm this occurs with the 2.1 release archive. |
It seems to be independent of which config item you want to prompt for:
|
Just confirmed on 2.1.1. |
This is different than the original issue. I think what is happening is we first initialize the settings/environment in bootstrap so that we can eg init logging, but then when bootstrap creates the node, it passes in a fresh Settings, and the Node constructor again initializes settings/environment. |
@jaymode could you take a look at this please? |
As @rjernst said, this is a different issue that the original. Part of the issue is that the
@spinscale @rjernst any thoughts? |
I would say preparing the environment once would be the best option, it will just take some refactoring to pass it through. Running prepare already creates Environment twice (the first time so it can try and load the config file, which might have other paths like plugin path or data path). Really I think we should simply not allow paths to be configured in elasticsearch.yml, instead it should only be through sysprops. It might be something that could simplify the settings/env prep, to make this a little easier. |
I have a fix for this that will come as part of #16579. |
Closed by #17024. |
With the following configuration
Elasticsearch 1.6.0 prompts you twice. Once for "node.name" and "name". Ultimately it uses the second one for the value of the configuration item:
The text was updated successfully, but these errors were encountered: