Bug 1231862 - [RFE] php image doesn't seem to log access to stdout
Summary: [RFE] php image doesn't seem to log access to stdout
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: ImageStreams
Version: 3.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: ---
Assignee: Honza Horak
QA Contact: XiuJuan Wang
URL:
Whiteboard:
Depends On: 1277835 1277836
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-06-15 13:58 UTC by Erik M Jacobs
Modified: 2015-11-23 14:44 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1277835 1277836 (view as bug list)
Environment:
Last Closed: 2015-11-23 14:44:07 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Erik M Jacobs 2015-06-15 13:58:10 UTC
I built an app with the php builder, but it doesn't appear to log accesses:

[joe@ose3-master ~]$ osc logs upload-2-1miom
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 10.1.0.10. Set the 'ServerName' directive globally to suppress this message

Comment 4 Ben Parees 2015-06-16 21:27:24 UTC
access logs are in /tmp/access_log, you can exec into the container and view them.

Comment 5 Erik M Jacobs 2015-06-17 12:10:28 UTC
If the access logs are not being logged to stdout then what is expected to be logged to stdout by the PHP image?

Comment 6 Erik M Jacobs 2015-08-10 15:35:34 UTC
Another user just hit this issue.

I think the "problem" is that, unlike other builders where the runtime is also the server, in the case of the php builder the runtime (apache) is not sending its logs directly to stdout, which is why you don't see them with "oc log".

I would think that most people are going to expect that all of the Apache log output goes to stdout, but I don't know for sure. A happy medium might be making this configurable via the repo or something?

Comment 7 Dan McPherson 2015-08-15 16:47:54 UTC
Can we get this added to the docs?

Raising sev to bring attention.

Comment 8 Ben Parees 2015-08-15 19:25:42 UTC
doc PR: https://github.com/openshift/openshift-docs/pull/887

Comment 9 Ben Parees 2015-08-17 15:34:51 UTC
documented.  lowering sev for remaining issue of making the access log location/output configurable.

Comment 10 Slava Semushin 2015-10-09 12:51:25 UTC
Pull request has been created: https://github.com/openshift/sti-php/pull/64

Comment 11 Slava Semushin 2015-10-09 13:27:25 UTC
Now access logs are streamed to stdout instead of /tmp/access_log file.

Comment 12 Wenjing Zheng 2015-10-10 11:17:40 UTC
Access log displays with latest php image:
[wzheng@openshiftqe test]$ oc logs cakephp-example-1-29a85
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 172.17.0.19. Set the 'ServerName' directive globally to suppress this message
172.17.42.1 - - [10/Oct/2015:11:07:34 +0000] "GET / HTTP/1.1" 200 63365 "-" "curl/7.37.0"

Will move the bug to verified till verified in ose env.

Comment 13 Slava Semushin 2015-10-12 12:10:38 UTC
JFYI: I've applied similar change to the perl image (https://github.com/openshift/sti-perl/pull/53).

Comment 14 XiuJuan Wang 2015-10-21 06:55:56 UTC
Works for php-55-rhel7(b8d96657ee16) and perl-516-rhel7(dddacd1007ae)

But still could reproduce this issue for php-56-rhel7(057b1c7fdae1) and perl-520-rhel7(f3ed77ae8490)

Comment 15 Scott Dodson 2015-10-21 13:42:24 UTC
I've rebuilt the existing S2I images, however I've not re-built those owned by the SCL teams.

Honza, do you know when you guys will build new versions of the scl images to pick up this change?

Comment 16 Honza Horak 2015-10-22 05:44:43 UTC
We don't have an explicit deadline for rebuild, but it must be soon (next week at latest).

Comment 17 Ben Parees 2015-10-26 20:05:31 UTC
assigning to Honza as his team needs to do the rebuild for php-56 now that the changes are in github.

Comment 18 Honza Horak 2015-11-04 08:26:19 UTC
I've created separate bug reports for both images so we can track that it is fixed.

Comment 19 Honza Horak 2015-11-08 07:40:46 UTC
Both depending bugs are now on QE, so moving to QE as well.

Comment 20 XiuJuan Wang 2015-11-09 11:49:21 UTC
Works with perl-520-rhel7(imageid:076ec56d14b1)
Works on php-56-rhel7(imageid:f03be54af158)

$oc logs dancer-example-1-h47bi
[Mon Nov 09 06:42:04.666644 2015] [so:warn] [pid 1] AH01574: module perl_module is already loaded, skipping
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 10.1.3.56. Set the 'ServerName' directive globally to suppress this message
10.1.3.1 - - [09/Nov/2015:06:46:04 -0500] "GET / HTTP/1.1" 200 42325 "-" "curl/7.29.0"
10.1.3.1 - - [09/Nov/2015:06:46:10 -0500] "GET / HTTP/1.1" 200 42325 "-" "curl/7.29.0"
10.1.3.1 - - [09/Nov/2015:06:46:12 -0500] "GET / HTTP/1.1" 200 42325 "-" "curl/7.29.0"

$ oc  logs cakephp-example-1-584jx
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 10.1.0.41. Set the 'ServerName' directive globally to suppress this message
10.1.0.1 - - [09/Nov/2015:06:38:39 -0500] "GET / HTTP/1.1" 200 63468 "-" "curl/7.29.0"
10.1.0.1 - - [09/Nov/2015:06:38:47 -0500] "GET / HTTP/1.1" 200 63671 "-" "curl/7.29.0"

Move bug to verified


Note You need to log in before you can comment on or make changes to this bug.