Description of problem: Show the logs using "--tail",but I use different number for --tail,the logs are same. Check `oc logs -h`: --tail=-1: Lines of recent log file to display. Defaults to -1, showing all log lines. Version-Release number of selected component (if applicable): devenv-rhel_2508 # oc version oc v1.0.6-805-g3f0e8f6 kubernetes v1.2.0-alpha.1-1107-g4c8e6f4 How reproducible: Always Steps to Reproduce: 1.oc logs bc/nd --tail=3 > bc1.log 2.oc logs bc/nd --tail=5 > bc2.log 3.oc logs bc/nd --tail=-1 > bc3.log 4.diff bc1.log bc3.log 5.diff bc1.log bc2.lgo 6.diff bc2.log bc3.log 7.Check bc1.log ,bc2.log and bc3.log (logs have 785 lines) Actual results: 7.They are same Expected results: --tail should work well. Additional info:
I think I'd like to fix this by including the PodLogOptions on the BuildLogOptions. Be sure to keep `Follow` backwards compatible.
Will be fixed post 3.1
Fixed in latest master
Verified in the devenv-rhel7_2619 Result: 1.# oc logs bc/rubytest -n wsuntest --tail=3 I1102 02:24:16.093908 1 sti.go:221] Using provided push secret for pushing 172.30.125.194:5000/wsuntest/rubytest:latest image I1102 02:24:16.093934 1 sti.go:225] Pushing 172.30.125.194:5000/wsuntest/rubytest:latest image ... I1102 02:25:16.835121 1 sti.go:241] Successfully pushed 172.30.125.194:5000/wsuntest/rubytest:latest 2.# oc logs bc/rubytest -n wsuntest --tail=5 I1102 02:24:10.638399 1 sti.go:448] It was installed into ./bundle I1102 02:24:10.653591 1 sti.go:448] ---> Cleaning up unused ruby gems ... I1102 02:24:16.093908 1 sti.go:221] Using provided push secret for pushing 172.30.125.194:5000/wsuntest/rubytest:latest image I1102 02:24:16.093934 1 sti.go:225] Pushing 172.30.125.194:5000/wsuntest/rubytest:latest image ... I1102 02:25:16.835121 1 sti.go:241] Successfully pushed 172.30.125.194:5000/wsuntest/rubytest:latest 3.# oc logs bc/rubytest -n wsuntest --tail=-1 Already on 'master' I1102 02:24:06.247261 1 sti.go:448] ---> Installing application source ... I1102 02:24:06.248976 1 sti.go:448] ---> Building your Ruby application from source ... I1102 02:24:06.249129 1 sti.go:448] ---> Running 'bundle install ' ... I1102 02:24:09.095606 1 sti.go:448] Fetching gem metadata from https://rubygems.org/.......... I1102 02:24:09.459085 1 sti.go:448] Resolving dependencies... I1102 02:24:10.637763 1 sti.go:448] Installing rack (1.6.4) I1102 02:24:10.637857 1 sti.go:448] Using bundler (1.3.5) I1102 02:24:10.638319 1 sti.go:448] Your bundle is complete! I1102 02:24:10.638399 1 sti.go:448] It was installed into ./bundle I1102 02:24:10.653591 1 sti.go:448] ---> Cleaning up unused ruby gems ... I1102 02:24:16.093908 1 sti.go:221] Using provided push secret for pushing 172.30.125.194:5000/wsuntest/rubytest:latest image I1102 02:24:16.093934 1 sti.go:225] Pushing 172.30.125.194:5000/wsuntest/rubytest:latest image ... I1102 02:25:16.835121 1 sti.go:241] Successfully pushed 172.30.125.194:5000/wsuntest/rubytest:latest