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

st2clientConfig issue with jobs.extra_hooks #370

Closed
cars opened this issue Aug 21, 2023 · 1 comment · Fixed by #371
Closed

st2clientConfig issue with jobs.extra_hooks #370

cars opened this issue Aug 21, 2023 · 1 comment · Fixed by #371
Labels
bug Something isn't working

Comments

@cars
Copy link
Contributor

cars commented Aug 21, 2023

We're trying to use extra_hooks in a k8s deployment and running into an issue where the additional jobs we define get run. But we find as we try to run additional st2 commands that we're seeing an error along the lines of:

configparser.DuplicateSectionError: While reading from '/root/.st2/config' [line 2]: section 'credentials' already exists

In looking into this issue I see that at

stackstorm-k8s/values.yaml

Lines 925 to 928 in 415e3a6

st2clientConfig: |
[credentials]
username = ${ST2_AUTH_USERNAME}
password = ${ST2_AUTH_PASSWORD}
creating a st2clientConfig value that [credentials] is included in the config value.
But in the jobs template '[credentials]' is being pre-prended to the st2clientConfig value:
cat <<EOT > /root/.st2/config
[credentials]
{{- tpl $.Values.jobs.st2clientConfig $ | nindent 12 }}
EOT

resulting in a config file that looks like:

[credentials]
[credentials]
username=st2admin
password=fred
@arm4b arm4b added the bug Something isn't working label Aug 23, 2023
@arm4b
Copy link
Member

arm4b commented Aug 23, 2023

Good find!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants