Bug 1656759

Summary: Nginx:1.12 image has no stdout logs
Product: Red Hat Software Collections Reporter: Abhishek <aabhishe>
Component: rh-nginx112-containerAssignee: Luboš Uhliarik <luhliari>
Status: CLOSED ERRATA QA Contact: BaseOS QE - Apps <qe-baseos-apps>
Severity: urgent Docs Contact:
Priority: high    
Version: rh-nginx112CC: aos-bugs, bperkins, csekar, hgomes, jokerman, jorton, luhliari, mmccomas, pkubat
Target Milestone: ---Keywords: Reopened
Target Release: 3.3   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rh-nginx112-container-1-45 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-04-29 10:51:09 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Abhishek 2018-12-06 09:33:42 UTC
Description of problem: Nginx:1.12 image build on rhel base image is not showing stdout logs output.


How reproducible:
Always

Steps to Reproduce:
1. oc new-app --template=nginx-example
2. oc logs <nginx-pod-name>

Actual results:
Nothing

Expected results:
It should show nginx log:
Like nginx server is running on a particular port

Additional info:
https://github.com/sclorg/nginx-container/tree/master/1.12
For rhel image there is no soft link created to redirect the access.log file content from inside the container to stdout
Difference between centos and rhel base nginx image

https://github.com/sclorg/nginx-container/blob/ce0192c1ef4174097084f769c64ad9c56207dbf0/1.12/Dockerfile#L66
https://github.com/sclorg/nginx-container/blob/ce0192c1ef4174097084f769c64ad9c56207dbf0/1.12/Dockerfile#L67

Above 2 lines are not in rhel base nginx image

Comment 1 K Chandra Sekar 2018-12-20 04:41:21 UTC
Any updates on this one?

Comment 9 Joe Orton 2019-03-18 14:44:39 UTC
Thanks for the report.  We're working on updating the image to fix this.

https://github.com/sclorg/nginx-container/pull/76

Comment 10 Joe Orton 2019-03-19 13:00:55 UTC
This is now fixed for the next update to the containers.  By default the nginx images will produce access logs on stdout and error logs on stderr, both of which should be available via "oc logs".  Alternatively, if the NGINX_LOG_TO_VOLUME environment variable is set when running the container, the logs are available at /var/log/nginx/access.log and /var/log/nginx/error.log inside the filesystem.

Comment 18 errata-xmlrpc 2019-04-25 17:21:49 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2019:0893