Bug 1365803 - [infrastructure_public_227]Idle a rc will get panic
Summary: [infrastructure_public_227]Idle a rc will get panic
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Node
Version: 3.3.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Solly Ross
QA Contact: DeShuai Ma
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-10 08:57 UTC by DeShuai Ma
Modified: 2016-09-19 15:17 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-09-19 15:17:13 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1933 normal SHIPPED_LIVE Red Hat OpenShift Container Platform 3.3 Release Advisory 2016-09-27 13:24:36 UTC

Description DeShuai Ma 2016-08-10 08:57:38 UTC
Description of problem:
When idle a rc, will get panic error.

Version-Release number of selected component (if applicable):
openshift v1.3.0-alpha.3+56df4f9
kubernetes v1.3.0+507d3a7
etcd 2.3.0+git

How reproducible:
Always

Steps to Reproduce:
1.Create a rc and then idle it.
$ oc create -f https://raw.githubusercontent.com/mdshuai/testfile-openshift/master/k8s/hello-rc.yaml
[root@ip-172-18-12-44 ~]# oc get rc -n dma
NAME        DESIRED   CURRENT   AGE
hello-pod   1         1         4m
[root@ip-172-18-12-44 ~]# oc idle rc/hello-pod -n dma
panic: interface conversion: runtime.Object is *api.ReplicationController, not *api.Endpoints

goroutine 1 [running]:
panic(0x24092c0, 0xc820846bc0)
    /usr/local/go/src/runtime/panic.go:481 +0x3e6
github.com/openshift/origin/pkg/cmd/cli/cmd.(*IdleOptions).calculateIdlableAnnotationsByService.func3(0xc820896b00, 0x0, 0x0, 0x0, 0x0)
    /data/src/github.com/openshift/origin/_output/local/go/src/github.com/openshift/origin/pkg/cmd/cli/cmd/idle.go:256 +0x60a
github.com/openshift/origin/vendor/k8s.io/kubernetes/pkg/kubectl/resource.ContinueOnErrorVisitor.Visit.func1(0xc820896b00, 0x0, 0x0, 0x0, 0x0)
    /data/src/github.com/openshift/origin/_output/local/go/src/github.com/openshift/origin/vendor/k8s.io/kubernetes/pkg/kubectl/resource/visitor.go:340 +0x152
github.com/openshift/origin/vendor/k8s.io/kubernetes/pkg/kubectl/resource.DecoratedVisitor.Visit.func1(0xc820896b00, 0x0, 0x0, 0x0, 0x0)
    /data/src/github.com/openshift/origin/_output/local/go/src/github.com/openshift/origin/vendor/k8s.io/kubernetes/pkg/kubectl/resource/visitor.go:316 +0x137
github.com/openshift/origin/vendor/k8s.io/kubernetes/pkg/kubectl/resource.FlattenListVisitor.Visit.func1(0xc820896b00, 0x0, 0x0, 0x0, 0x0)
    /data/src/github.com/openshift/origin/_output/local/go/src/github.com/openshift/origin/vendor/k8s.io/kubernetes/pkg/kubectl/resource/visitor.go:377 +0x9e
github.com/openshift/origin/vendor/k8s.io/kubernetes/pkg/kubectl/resource.EagerVisitorList.Visit.func1(0xc820896b00, 0x0, 0x0, 0x0, 0x0)
    /data/src/github.com/openshift/origin/_output/local/go/src/github.com/openshift/origin/vendor/k8s.io/kubernetes/pkg/kubectl/resource/visitor.go:195 +0x152
github.com/openshift/origin/vendor/k8s.io/kubernetes/pkg/kubectl/resource.(*Info).Visit(0xc820896b00, 0xc8208f3ee0, 0x0, 0x0)
    /data/src/github.com/openshift/origin/_output/local/go/src/github.com/openshift/origin/vendor/k8s.io/kubernetes/pkg/kubectl/resource/visitor.go:106 +0x3e
github.com/openshift/origin/vendor/k8s.io/kubernetes/pkg/kubectl/resource.EagerVisitorList.Visit(0xc82091e600, 0x1, 0x1, 0xc8204c4540, 0x0, 0x0)
    /data/src/github.com/openshift/origin/_output/local/go/src/github.com/openshift/origin/vendor/k8s.io/kubernetes/pkg/kubectl/resource/visitor.go:190 +0x12c
github.com/openshift/origin/vendor/k8s.io/kubernetes/pkg/kubectl/resource.(*EagerVisitorList).Visit(0xc8208f3e00, 0xc8204c4540, 0x0, 0x0)
    <autogenerated>:124 +0xb7
github.com/openshift/origin/vendor/k8s.io/kubernetes/pkg/kubectl/resource.FlattenListVisitor.Visit(0x7f519e903280, 0xc8208f3e00, 0xc8206be6c0, 0xc820846d40, 0x0, 0x0)
    /data/src/github.com/openshift/origin/_output/local/go/src/github.com/openshift/origin/vendor/k8s.io/kubernetes/pkg/kubectl/resource/visitor.go:409 +0xaa
github.com/openshift/origin/vendor/k8s.io/kubernetes/pkg/kubectl/resource.(*FlattenListVisitor).Visit(0xc8208f3e20, 0xc820846d40, 0x0, 0x0)
    <autogenerated>:140 +0xb7
github.com/openshift/origin/vendor/k8s.io/kubernetes/pkg/kubectl/resource.DecoratedVisitor.Visit(0x7f519e9032a8, 0xc8208f3e20, 0xc8208f3e60, 0x3, 0x4, 0xc8208f3ea0, 0x0, 0x0)
    /data/src/github.com/openshift/origin/_output/local/go/src/github.com/openshift/origin/vendor/k8s.io/kubernetes/pkg/kubectl/resource/visitor.go:317 +0xf0
github.com/openshift/origin/vendor/k8s.io/kubernetes/pkg/kubectl/resource.(*DecoratedVisitor).Visit(0xc8204c4510, 0xc8208f3ea0, 0x0, 0x0)
    <autogenerated>:160 +0xae
github.com/openshift/origin/vendor/k8s.io/kubernetes/pkg/kubectl/resource.ContinueOnErrorVisitor.Visit(0x7f519e9032d0, 0xc8204c4510, 0xc820846d00, 0x0, 0x0)
    /data/src/github.com/openshift/origin/_output/local/go/src/github.com/openshift/origin/vendor/k8s.io/kubernetes/pkg/kubectl/resource/visitor.go:335 +0x12f
github.com/openshift/origin/vendor/k8s.io/kubernetes/pkg/kubectl/resource.(*ContinueOnErrorVisitor).Visit(0xc82091e620, 0xc820846d00, 0x0, 0x0)
    <autogenerated>:155 +0xae
github.com/openshift/origin/vendor/k8s.io/kubernetes/pkg/kubectl/resource.(*Result).Visit(0xc8200c2a10, 0xc820846d00, 0x0, 0x0)
    /data/src/github.com/openshift/origin/_output/local/go/src/github.com/openshift/origin/vendor/k8s.io/kubernetes/pkg/kubectl/resource/result.go:80 +0x6d
github.com/openshift/origin/pkg/cmd/cli/cmd.(*IdleOptions).calculateIdlableAnnotationsByService(0xc8204ff320, 0xc82025cf40, 0x3dc63e0, 0x1, 0x0, 0x0)
    /data/src/github.com/openshift/origin/_output/local/go/src/github.com/openshift/origin/pkg/cmd/cli/cmd/idle.go:278 +0x410
github.com/openshift/origin/pkg/cmd/cli/cmd.(*IdleOptions).RunIdle(0xc8204ff320, 0xc82025cf40, 0x0, 0x0)
    /data/src/github.com/openshift/origin/_output/local/go/src/github.com/openshift/origin/pkg/cmd/cli/cmd/idle.go:508 +0x168
github.com/openshift/origin/pkg/cmd/cli/cmd.NewCmdIdle.func1(0xc820203a00, 0xc8205f3230, 0x1, 0x3)
    /data/src/github.com/openshift/origin/_output/local/go/src/github.com/openshift/origin/pkg/cmd/cli/cmd/idle.go:65 +0xa2
github.com/openshift/origin/vendor/github.com/spf13/cobra.(*Command).execute(0xc820203a00, 0xc8205f3170, 0x3, 0x3, 0x0, 0x0)
    /data/src/github.com/openshift/origin/_output/local/go/src/github.com/openshift/origin/vendor/github.com/spf13/cobra/command.go:565 +0x85a
github.com/openshift/origin/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0xc8201c4800, 0xc820203a00, 0x0, 0x0)
    /data/src/github.com/openshift/origin/_output/local/go/src/github.com/openshift/origin/vendor/github.com/spf13/cobra/command.go:651 +0x55c
github.com/openshift/origin/vendor/github.com/spf13/cobra.(*Command).Execute(0xc8201c4800, 0x0, 0x0)
    /data/src/github.com/openshift/origin/_output/local/go/src/github.com/openshift/origin/vendor/github.com/spf13/cobra/command.go:610 +0x2d
main.main()
    /data/src/github.com/openshift/origin/_output/local/go/src/github.com/openshift/origin/cmd/oc/oc.go:29 +0x180

Actual results:

Expected results:

Additional info:

Comment 1 Solly Ross 2016-08-10 14:50:09 UTC
https://github.com/openshift/origin/pull/10335

Comment 2 Troy Dawson 2016-08-12 19:10:19 UTC
This has been merged and is in OSE v3.3.0.19 or newer.

Comment 4 DeShuai Ma 2016-08-15 06:44:32 UTC
Test on v3.3.0.19
[root@dhcp-128-7 Desktop]# oc idle rc/hello-pod -n dma
error: no valid scalable resources found to idle: User "dma" cannot get replicationcontrollers in project "dma"


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