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

Test and exit for jq error before domain loop #4347

Merged
merged 2 commits into from Jan 7, 2019

Conversation

muhlemmer
Copy link
Contributor

What does this PR do?

In contrib/scripts/dumpcerts.sh: Test and exit for jq error before domain loop

Motivation

In an automated (inotify) environment, there are cases where this script gets executed before Traefik actually finishes all writes to acme.json. This can result in jq errors when it's called in the the domain loop. The script did not check the jq return code and subsequently exited with return code 0.

Original jq error:

jq: error (at /traefik/acme.json:18): Cannot iterate over null (null)

More

Test and docs are not applicable in this case.

Additional Notes

Nope

contrib/scripts/dumpcerts.sh Outdated Show resolved Hide resolved
Copy link
Member

@ldez ldez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@mmatur mmatur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@dtomcej dtomcej left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
:shipit:

muhlemmer and others added 2 commits January 7, 2019 17:34
In an automated (inotify) environment, there are cases where this script gets executed before Traefik actually finishes all writes to `acme.json`. This can result in `jq` errors when it's called in the the `domain` loop. The script did not check the `jq` return code and subsequently exited with return code `0`. This commit improves that behavior.
Co-Authored-By: muhlemmer <muhlemmer@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants