gitlab-ctl tail includes the gzipped logs that have been rotated out, dumping garbage to the terminal
Summary: Running "gitlab-ctl tail" dumps both current as well as the rotated+compressed log files to screen.
Steps to reproduce: Simply running "gitlab-ctl tail" on an install that has run long enough for Gitlab's log rotation to run.
Expected behavior: I expect that old, gzipped log files would be excluded.
Observed behavior: Not only are current logs tailed (eg: unicorn_stderr.log) but the rotated+compressed older files (eg: unicorn_stderr.log.1.gz) are also tailed and "garbage" is dumped to the terminal.
==> /var/log/gitlab/unicorn/current <==
==> /var/log/gitlab/unicorn/unicorn_stderr.log <==
W, [2015-03-13T15:50:48.568587 #9897] WARN -- : #<Unicorn::HttpServer:0x00000001a79cb0>: worker (pid: 9897) exceeds memory limit (248958976 bytes > 229846251 bytes)
W, [2015-03-13T15:50:48.568720 #9897] WARN -- : Unicorn::WorkerKiller send SIGQUIT (pid: 9897) alive: 945 sec (trial 1)
I, [2015-03-13T15:50:48.864763 #30571] INFO -- : reaped #<Process::Status: pid 9897 exit 0> worker=1
I, [2015-03-13T15:50:48.870847 #11354] INFO -- : worker=1 spawned pid=11354
I, [2015-03-13T15:50:48.871383 #11354] INFO -- : worker=1 ready
W, [2015-03-13T16:08:57.981838 #11354] WARN -- : #<Unicorn::HttpServer:0x00000001a79cb0>: worker (pid: 11354) exceeds memory limit (247513088 bytes > 232839132 bytes)
W, [2015-03-13T16:08:57.981985 #11354] WARN -- : Unicorn::WorkerKiller send SIGQUIT (pid: 11354) alive: 835 sec (trial 1)
I, [2015-03-13T16:08:58.241683 #30571] INFO -- : reaped #<Process::Status: pid 11354 exit 0> worker=1
I, [2015-03-13T16:08:58.248391 #12595] INFO -- : worker=1 spawned pid=12595
I, [2015-03-13T16:08:58.248948 #12595] INFO -- : worker=1 ready
==> /var/log/gitlab/unicorn/unicorn_stderr.log.1.gz <==
2t1ØIÙzÂÎv]DÓƻN\]LÌ*º ¾&i\ü2&|S a ÌÃ
`Z]Ëé<(ãê,(9 ë|] N¾N@ZÍJe
·&;ÑL²s.شÁ_ڷîôܸ¸/N^/
=ꔑ-uá8ªeø¦Í<TZ¹ßéªÏvÿó犂` $lq=¢
µ#^S5ß<·©(¡Îhbf%7r,¬\ÑY$§ÌB¨u¯̘ÎruÍZE_]Wt3ʢ¡ F xÿ:ÝGË}ëN?s¾@¼$¬£Ë|gnBÀ2Ùi½NٹÂM°i½(¬¯ºȭ;)J/µkn<«ñc¤Ô8î0תUBÇæKP9U@
=~^ÎJ¢ªÎÂÕ¯U2XחsPhK¶¿Â|{B{ôU?¡Ò钷#]аlcòÌNeBÊÎ߬g)tx/:¨=¾Î>«ÑJ>´[Xٮ6l¸$ËÔv&b:+ɝۊ苘ÃÀâ)
VjV¶»
5%+ªǨ½3ö%(ñµĎŋX¬hi>¥a0É-p°´&üV8º4%xâ7ìF³}á¾9<x:ø7«ãÃÆd!§ÉN/¹ewaçofӆBÚ.fä֝
±Ònµ³ º0-0Ç佗ZºhXL þ&Ñ<XNtÑzþû:ó7¬§Ð~j¬=èj>{ÁÌNgmÊÎ[VlÚøÕáµÜb v2Þ'¿~Ë
ùZt1Ð`t|OoºõÀè
XVÎÐÝYnBç;
Ä)$&Ýð.qòhɗ×Å`§I;W8
6m¼ºYÕ6)n0t2a=»hPJñE#.ý͢Ç×[¸åהÎÁâwæÁrÂP@åèÇ5Ûv¯¬³A8ùûY´þàNoeéb8mÙiù{Pv®¹öÄOnϮé"R[Ð'3_Ãèiðé{ÌÓä-Ö·íM`RôÝï9°.´Új)
Äïïu¾.'ï0èôÍÎñu@Áav*î]عBlÚà0Dõð#rûÿLøS¶8¾±Z×À·,SiX ̱÷Ƀeʲ®ý$_c×+ëlaN!à"õà^5|éÆìùùÌN¾|i皛
f×íiQÛݨÁ
ºsx½.¯Åa
4Öñ54õGâ°Óüåy°¤.PPf8[Småü
úÊS"£tW~ÊÎ}³lÚXW¡k)FOæÇÁAUeL46~M7Èô×|
F ®óPQÿ/Ø:Ïc
==> /var/log/gitlab/unicorn/unicorn_stdout.log.1.gz <== ¥lUuÍ=
Â0áÝ_qÅEÁ¦iìÇ&RÁÅBqkéÅ4-mêï·]ܺÏ{ÙÃ=
¹d¡`<º2çq.DÀEr dü¸\Ï%0mG_簵»Éíà־P} «q0@<¡7:XK¼ÌÒ$ùóEUÕ"ã<)ôÔ:x#ٱ7ë©óEKú©z£çíƩvtÞôsý÷XjÍÝ
==> /var/log/gitlab/unicorn/state <==
==> /var/log/gitlab/unicorn/unicorn_stdout.log <==
(and so on)
Results of GitLab Application Check:
Checking Environment ...
Git configured for git user? ... yes
Checking Environment ... Finished
Checking GitLab Shell ...
GitLab Shell version >= 2.5.4 ? ... OK (2.5.4)
Repo base directory exists? ... yes
Repo base directory is a symlink? ... no
Repo base owned by git:git? ... yes
Repo base access is drwxrws---? ... yes
Satellites access is drwxr-x---? ... yes
hooks directories in repos are links: ...
3/4 ... ok
5/5 ... ok
5/6 ... ok
3/7 ... ok
6/8 ... ok
3/9 ... ok
3/10 ... ok
6/11 ... ok
6/12 ... ok
6/13 ... ok
6/14 ... ok
5/15 ... ok
Running /opt/gitlab/embedded/service/gitlab-shell/bin/check
Check GitLab API access: OK
Check directories and files:
/var/opt/gitlab/git-data/repositories: OK
/var/opt/gitlab/.ssh/authorized_keys: OK
Test redis-cli executable: redis-cli 2.8.2
Send ping to redis server: PONG
gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Sidekiq ...
Running? ... yes
Number of Sidekiq processes ... 1
Checking Sidekiq ... Finished
Checking LDAP ...
LDAP is disabled in config/gitlab.yml
Checking LDAP ... Finished
Checking GitLab ...
Database config exists? ... yes
Database is SQLite ... no
All migrations up? ... yes
Database contains orphaned GroupMembers? ... no
GitLab config exists? ... yes
GitLab config outdated? ... no
Log directory writable? ... yes
Tmp directory writable? ... yes
Init script exists? ... skipped (omnibus-gitlab has no init script)
Init script up-to-date? ... skipped (omnibus-gitlab has no init script)
projects have namespace: ...
3/4 ... yes
5/5 ... yes
5/6 ... yes
3/7 ... yes
6/8 ... yes
3/9 ... yes
3/10 ... yes
6/11 ... yes
6/12 ... yes
6/13 ... yes
6/14 ... yes
5/15 ... yes
Projects have satellites? ...
3/4 ... yes
5/5 ... yes
5/6 ... yes
3/7 ... yes
6/8 ... yes
3/9 ... yes
3/10 ... yes
6/11 ... yes
6/12 ... yes
6/13 ... yes
6/14 ... yes
5/15 ... yes
Redis version >= 2.0.0? ... yes
Ruby version >= 2.0.0 ? ... yes (2.1.5)
Your git bin path is "/opt/gitlab/embedded/bin/git"
Git version >= 1.7.10 ? ... yes (2.0.5)
Checking GitLab ... Finished
System/setup description:
System information
System: Debian 7.8
Current User: git
Using RVM: no
Ruby Version: 2.1.5p273
Gem Version: 2.2.1
Bundler Version:1.5.3
Rake Version: 10.3.2
Sidekiq Version:3.3.0
GitLab information
Version: 7.8.4
Revision: 019ffd9
Directory: /opt/gitlab/embedded/service/gitlab-rails
DB Adapter: postgresql
URL: http://gitlab.redacted.tld
HTTP Clone URL: http://gitlab.redacted.tld/some-project.git
SSH Clone URL: git@gitlab.redacted.tld:some-project.git
Using LDAP: no
Using Omniauth: no
GitLab Shell
Version: 2.5.4
Repositories: /var/opt/gitlab/git-data/repositories
Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks/
Git: /opt/gitlab/embedded/bin/git
Debian 7 amd64, base install with nothing but the directions from https://about.gitlab.com/downloads/. Originally installed the 7.8.2 omnibus package, and upgraded to 7.8.4 the next day.
Possible fixes: It looks like the log_exclude pattern in the omnibus-ctl gem (/opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/omnibus-ctl-0.0.7/lib/omnibus-ctl.rb) needs to be extended to exclude *.gz files