Skip to content

Remove glog prefix from build log messages by default - #321

Merged
openshift-bot merged 1 commit into
openshift:masterfrom
mfojtik:remove-glog-prefix
Oct 29, 2015
Merged

openshift-bot merged 1 commit into
openshift:masterfrom
mfojtik:remove-glog-prefix

Conversation

@mfojtik

@mfojtik mfojtik commented Oct 29, 2015

Copy link
Copy Markdown
Contributor

This patch will strip the glog prefix from the assemble script that run in container. It should make the logs in OpenShift much cleaner.

I also preserved an option to enable the glog programmatically and the glog is on by default for log levels greater than 3.

@mfojtik

mfojtik commented Oct 29, 2015

Copy link
Copy Markdown
Contributor Author

@bparees PTAL

@bparees

bparees commented Oct 29, 2015

Copy link
Copy Markdown
Contributor

hm, I was going to ask if this fixes openshift/origin#1647 ?

but i'm actually looking at a current build log right now and i don't see any duplicated timestamps, either of the form shown in 1647 , or as described by you:

I1029 21:04:18.490470       1 sti.go:115] The value of ALLOWED_UIDS is [1-]
I1029 21:04:18.490652       1 cfg.go:44] Locating docker auth for image openshift/ruby-20-centos7@sha256:1b449d62d5c731b50f0a1466e1971104225314a9f4a023af4b5e417530c628f5 and type PULL_DOCKERCFG_PATH
I1029 21:04:18.490728       1 cfg.go:80] Using Docker authentication configuration in '/root/.docker/config.json'
I1029 21:04:18.490800       1 cfg.go:52] Problem accessing /root/.docker/config.json: stat /root/.docker/config.json: no such file or directory
I1029 21:04:18.490821       1 cfg.go:44] Locating docker auth for image 172.30.162.144:5000/test/origin-ruby-sample:latest and type PUSH_DOCKERCFG_PATH
I1029 21:08:17.061603       1 docker.go:520] Attaching to container
I1029 21:08:17.063269       1 docker.go:526] Starting container
I1029 21:08:17.230912       1 docker.go:460] Waiting for container
I1029 21:08:17.320978       1 sti.go:430] ---> Installing application source ...
I1029 21:08:17.323377       1 sti.go:430] ---> Building your Ruby application from source ...
I1029 21:08:17.323514       1 sti.go:430] ---> Running 'bundle install --deployment' ...
I1029 21:08:21.193087       1 sti.go:430] Fetching gem metadata from https://rubygems.org/..........
I1029 21:08:23.909732       1 sti.go:430] Installing rake (10.3.2) 

@mfojtik

mfojtik commented Oct 29, 2015

Copy link
Copy Markdown
Contributor Author

this is not fixing duplicated timestamps, just making the log in web
console or CLI prettier by default.
On Oct 29, 2015 10:12 PM, "Ben Parees" [email protected] wrote:

hm, I was going to ask if this fixes openshift/origin#1647
openshift/origin#1647 ?

but i'm actually looking at a current build log right now and i don't see
any duplicated timestamps, either of the form shown in 1647 , or as
described by you:

I1029 21:04:18.490470 1 sti.go:115] The value of ALLOWED_UIDS is [1-]
I1029 21:04:18.490652 1 cfg.go:44] Locating docker auth for image openshift/ruby-20-centos7@sha256:1b449d62d5c731b50f0a1466e1971104225314a9f4a023af4b5e417530c628f5 and type PULL_DOCKERCFG_PATH
I1029 21:04:18.490728 1 cfg.go:80] Using Docker authentication configuration in '/root/.docker/config.json'
I1029 21:04:18.490800 1 cfg.go:52] Problem accessing /root/.docker/config.json: stat /root/.docker/config.json: no such file or directory
I1029 21:04:18.490821 1 cfg.go:44] Locating docker auth for image 172.30.162.144:5000/test/origin-ruby-sample:latest and type PUSH_DOCKERCFG_PATH

I1029 21:08:17.061603 1 docker.go:520] Attaching to container
I1029 21:08:17.063269 1 docker.go:526] Starting container
I1029 21:08:17.230912 1 docker.go:460] Waiting for container
I1029 21:08:17.320978 1 sti.go:430] ---> Installing application source ...
I1029 21:08:17.323377 1 sti.go:430] ---> Building your Ruby application from source ...
I1029 21:08:17.323514 1 sti.go:430] ---> Running 'bundle install --deployment' ...
I1029 21:08:21.193087 1 sti.go:430] Fetching gem metadata from https://rubygems.org/..........
I1029 21:08:23.909732 1 sti.go:430] Installing rake (10.3.2)

—
Reply to this email directly or view it on GitHub
#321 (comment)
.

@bparees

bparees commented Oct 29, 2015

Copy link
Copy Markdown
Contributor

hmm. can you show a sample of the before and after output?

@bparees

bparees commented Oct 29, 2015

Copy link
Copy Markdown
Contributor

nm, i think i get it...should just be these lines:

I1029 21:08:23.909732       1 sti.go:430] Installing rake (10.3.2) 
I1029 21:08:24.456723       1 sti.go:430] Installing i18n (0.6.11) 
I1029 21:08:26.081164       1 sti.go:430] Installing json (1.8.3) 
I1029 21:08:26.627653       1 sti.go:430] Installing minitest (5.4.2) 
I1029 21:08:27.613724       1 sti.go:430] Installing thread_safe (0.3.4) 
I1029 21:08:28.376710       1 sti.go:430] Installing tzinfo (1.2.2) 
I1029 21:08:29.478069       1 sti.go:430] Installing activesupport (4.1.7) 
I1029 21:08:29.951318       1 sti.go:430] Installing builder (3.2.2) 
I1029 21:08:30.449114       1 sti.go:430] Installing activemodel (4.1.7) 
I1029 21:08:30.984709       1 sti.go:430] Installing arel (5.0.1.20140414130214)

and everything up to "sti.go:430]" will be removed?

@mfojtik

mfojtik commented Oct 29, 2015

Copy link
Copy Markdown
Contributor Author
$ s2i build --force-pull=false git://github.com/pmorie/simple-ruby openshift/ruby-22-centos7 test-ruby-app
---> Installing application source ...
---> Building your Ruby application from source ...
---> Running 'bundle install --deployment' ...
Fetching gem metadata from https://rubygems.org/..........
Installing rake 10.1.1
Installing coderay 1.1.0
Installing method_source 0.8.2
Installing slop 3.4.7
Installing pry 0.9.12.6
Installing rack 1.5.2
Using bundler 1.7.8
Your bundle is complete!
It was installed into ./bundle
---> Cleaning up unused ruby gems ...

@mfojtik

mfojtik commented Oct 29, 2015

Copy link
Copy Markdown
Contributor Author

@bparees correct, alternatively I can put some timing information there in some nicer form than default glog... We now display the logs in web UI and my concern is that we should make them as much clean as possible :-)

@bparees

bparees commented Oct 29, 2015

Copy link
Copy Markdown
Contributor

@mfojtik no, definitely don't add timestamps or we'll be back to the duplicate timestamps problem when running in openshift.
this lgtm. [merge]

@mfojtik

mfojtik commented Oct 29, 2015

Copy link
Copy Markdown
Contributor Author

@bparees will do rebase in openshift tomorrow to pick this up.

@openshift-bot

Copy link
Copy Markdown
Contributor

@bparees

bparees commented Oct 29, 2015

Copy link
Copy Markdown
Contributor

[merge]

@openshift-bot

Copy link
Copy Markdown
Contributor

Evaluated for source to image merge up to 5e6e40e

openshift-bot pushed a commit that referenced this pull request Oct 29, 2015
@openshift-bot
openshift-bot merged commit d58a629 into openshift:master Oct 29, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants