Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Complement test image: capture logs from nginx #14063

Merged
merged 3 commits into from
Oct 5, 2022

Conversation

richvdh
Copy link
Member

@richvdh richvdh commented Oct 5, 2022

Have nginx send its logs to stderr/out, so that we can debug #13334.

Have nginx send its logs to stderr/out, so that we can debug
#13334.
@richvdh richvdh requested a review from a team as a code owner October 5, 2022 14:01
Copy link
Contributor

@DMRobertson DMRobertson left a comment

Choose a reason for hiding this comment

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

Many thanks! (Sorry, I kicked off the conversation in the complement room and then completely forgot about it.)

@richvdh
Copy link
Member Author

richvdh commented Oct 5, 2022

Many thanks! (Sorry, I kicked off the conversation in the complement room and then completely forgot about it.)

Thanks for the review, but it didn't work :/. Hopefully this time round will be better.

@richvdh richvdh requested a review from a team October 5, 2022 14:43
@DMRobertson
Copy link
Contributor

What went wrong? I guess stdout/stderr that nginx sees isn't the stdout/err of configure_workers_and_start.py, and it's the latter which forms the docker logging output?

@richvdh
Copy link
Member Author

richvdh commented Oct 5, 2022

What went wrong? I guess stdout/stderr that nginx sees isn't the stdout/err of configure_workers_and_start.py, and it's the latter which forms the docker logging output?

It was malformed nginx config. Turns out docker/conf-workers/nginx.conf.j2 doesn't end up as top-level nginx config; rather it is included into the top-level config under the http section.

According to the lazyweb, the symlink hack is what the nginx docker container does.

@richvdh
Copy link
Member Author

richvdh commented Oct 5, 2022

I guess stdout/stderr that nginx sees isn't the stdout/err of configure_workers_and_start.py, and it's the latter which forms the docker logging output?

That wasn't the problem. configure_workers_and_start replaces itself with supervisord, which is configured to pipe the stdout of its nginx to its own stdout, so that bit does work.

Copy link
Contributor

@DMRobertson DMRobertson left a comment

Choose a reason for hiding this comment

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

Thanks for explaining. SGTM, let's try it!

@richvdh richvdh merged commit 51436c8 into develop Oct 5, 2022
@richvdh richvdh deleted the rav/nginx_log_to_stdout branch October 5, 2022 16:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants