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

When upgrading to 2.7 Errors in apply-config-from-env.py prevent configuration files updates. #8704

Closed
klwilson227 opened this issue Nov 25, 2020 · 1 comment · Fixed by #8709
Labels
type/bug The PR fixed a bug or issue reported a bug

Comments

@klwilson227
Copy link
Contributor

Describe the bug
The zookeeper configuration is applied into the config files via the apply-config-from-env.py. This process run into a error when processing the pulsar_env.sh that now contains lines other than value assignments and receives a fatal error, leaving the configurations in a unwritten state.

In addition the following additional bugs/enhancements will be fixed.

  1. If environment variable values contain spaces (as in java parameters), the resulting value is not properly written into the updated file with quotes. So the resulting value may not be interpreted correctly.
  2. The logging should not log the values of passwords. These values should be redacted.

To Reproduce
Steps to reproduce the behavior:

  1. Start the docker image from a chart using helm. The chart configuration must run: bin/apply-config-from-env.py when starting the chart. StreamNative/chart project was used as a model in this case.

  2. Review the log files. When processing the pulsar_env.sh the following lines are written.

itomdipulsar-zookeeper Traceback (most recent call last):
itomdipulsar-zookeeper File "bin/apply-config-from-env.py", line 50, in
itomdipulsar-zookeeper k,v = line.split('=', 1)
itomdipulsar-zookeeper ValueError: not enough values to unpack (expected 2, got 1)

Expected behavior
Errors in parsing any lines should be ignored and the original line should be written out. The lines with values should be modified when there is a new value to insert.

Screenshots
N/A

Desktop (please complete the following information):

  • OS: [e.g. iOS]

Additional context
Add any other context about the problem here.

@klwilson227 klwilson227 added the type/bug The PR fixed a bug or issue reported a bug label Nov 25, 2020
@klwilson227
Copy link
Contributor Author

I will post a PR for this shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug The PR fixed a bug or issue reported a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant