Description of problem: oc observe with --resync-period should prompt --names required rather than cause panic Version-Release number of selected component (if applicable): v3.3.0.31 How reproducible: Always Steps to Reproduce: 1. Login to openshift, create project xxia-proj 2. Create sth, e.g. services $ oc new-app -f https://raw.githubusercontent.com/openshift/origin/master/examples/sample-app/application-template-stibuild.json 3. Check --resync-period without --names $ oc observe svc --resync-period=10s -- echo print Actual results: 3. Caused panic: # 2016-09-21T13:17:30+08:00 Sync started # 2016-09-21T13:17:30+08:00 Sync 32365 echo print xxia-proj database print xxia-proj database # 2016-09-21T13:17:30+08:00 Sync 32346 echo print xxia-proj frontend print xxia-proj frontend panic: runtime error: invalid memory address or nil pointer dereference [signal 0xb code=0x1 addr=0x28 pc=0x12f0539] goroutine 30 [running]: panic(0x2488dc0, 0xc82000e0f0) /usr/lib/golang/src/runtime/panic.go:481 +0x3e6 github.com/openshift/origin/vendor/k8s.io/kubernetes/pkg/client/cache.(*DeltaFIFO).Resync(0xc820250d10, 0x0, 0x0) /builddir/build/BUILD/atomic-openshift-git-0.aede597/_output/local/go/src/github.com/openshift/origin/vendor/k8s.io/kubernetes/pkg/client/cache/delta_fifo.go:501 +0xd9 github.com/openshift/origin/vendor/k8s.io/kubernetes/pkg/client/cache.(*Reflector).ListAndWatch.func1(0xc82007e348, 0xc820014cc0, 0xc8207e0c00, 0xc820079c80, 0xc82007e350) /builddir/build/BUILD/atomic-openshift-git-0.aede597/_output/local/go/src/github.com/openshift/origin/vendor/k8s.io/kubernetes/pkg/client/cache/reflector.go:285 +0x1c2 created by github.com/openshift/origin/vendor/k8s.io/kubernetes/pkg/client/cache.(*Reflector).ListAndWatch /builddir/build/BUILD/atomic-openshift-git-0.aede597/_output/local/go/src/github.com/openshift/origin/vendor/k8s.io/kubernetes/pkg/client/cache/reflector.go:292 +0xde3 Expected results: 3. Should prompt --names required, as oc observe -h says for usage of --resync-period. Additional info: If --names and --delete are specified, no panic.
PR: https://github.com/openshift/origin/pull/16474
Upstream PR [1] has merged. Tagging as UpcomingRelease 1. https://github.com/kubernetes/kubernetes/pull/53830
The fix from [1] is now in latest master. 1. https://github.com/kubernetes/kubernetes/pull/53830
Verified in 3.9.3, no panic now, command works well $ oc observe svc --resync-period=10s -- echo print # 2018-03-08T16:57:45+08:00 Sync started # 2018-03-08T16:57:45+08:00 Sync 218204 echo print xxia-proj myapp print xxia-proj myapp # 2018-03-08T16:57:55+08:00 Sync echo print xxia-proj myapp print xxia-proj myapp
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:0403