Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1523493

Summary: Get duplicated bc/build/is/dc/route by `oc get all`
Product: OpenShift Container Platform Reporter: Junqi Zhao <juzhao>
Component: ocAssignee: Juan Vallejo <jvallejo>
Status: CLOSED CURRENTRELEASE QA Contact: Xingxing Xia <xxia>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.8.0CC: aos-bugs, deads, jokerman, jvallejo, mmccomas, vlaad, weliang, wmeng, xiaocwan, xxia, yanpzhan
Target Milestone: ---Keywords: Regression
Target Release: 3.9.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-09-11 18:19:11 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Junqi Zhao 2017-12-08 07:10:59 UTC
Description of problem:
Deploy metrics and check resources by `oc get all`, get duplicated metrics route.

# oc get all -n openshift-infra
NAME                      HOST/PORT                                       PATH      SERVICES           PORT      TERMINATION   WILDCARD
routes/hawkular-metrics   hawkular-metrics.apps.1208-zm5.qe.rhcloud.com             hawkular-metrics   <all>     reencrypt     None
routes/hawkular-metrics   hawkular-metrics.apps.1208-zm5.qe.rhcloud.com             hawkular-metrics   <all>     reencrypt     None

Note: skipped other items since they are not related to this defect.


# oc get route -n openshift-infra
NAME               HOST/PORT                                       PATH      SERVICES           PORT      TERMINATION   WILDCARD
hawkular-metrics   hawkular-metrics.apps.1208-zm5.qe.rhcloud.com             hawkular-metrics   <all>     reencrypt     None


Version-Release number of selected component (if applicable):
# openshift version
openshift v3.8.11
kubernetes v1.8.1+0d5291c
etcd 3.2.8


How reproducible:
Always

Steps to Reproduce:
1. execute `oc get all` after metrics is deployed
2.
3.

Actual results:
Get duplicated metrics route by `oc get all`

Expected results:


Additional info:

Comment 2 Juan Vallejo 2017-12-08 15:10:18 UTC
This is directly related to https://github.com/openshift/origin/issues/17446

Comment 3 Juan Vallejo 2017-12-08 15:10:47 UTC
Proposed fix in https://github.com/openshift/origin/pull/17583

Comment 4 Juan Vallejo 2018-01-12 15:49:21 UTC
Closed PR from comment 3 in favor of https://github.com/openshift/origin/pull/18085

Comment 5 Juan Vallejo 2018-01-16 21:01:06 UTC
Fixed in https://github.com/openshift/origin/pull/18085

Comment 6 Xingxing Xia 2018-01-17 06:28:41 UTC
PR not come into OCP v3.9.0-0.20.0 yet. Need wait for next puddle to verify

Comment 7 XiaochuanWang 2018-01-19 02:22:22 UTC
Tested on v3.9.0-0.21.0
There are still duplicated resources such as ds(DaemonSet)

$ oc create -f https://raw.githubusercontent.com/openshift-qe/v3-testfiles/master/daemon/daemonset.yaml
daemonset "hello-daemonset" created

$ oc get all
NAME                 DESIRED   CURRENT   READY     UP-TO-DATE   AVAILABLE   NODE SELECTOR   AGE
ds/hello-daemonset   2         2         2         2            2           <none>          22s
ds/hello-daemonset   2         2         2         2            2           <none>          22s

There are duplicated APIs for ds: 
I0119 09:46:56.735195   24375 round_trippers.go:436] GET https://xxx.com:8443/apis/extensions/v1beta1/namespaces/xiaocwan-t/daemonsets?limit=500 200 OK in 266 milliseconds

I0119 09:46:57.534582   24375 round_trippers.go:436] GET https://xxx.com:8443/apis/apps/v1/namespaces/xiaocwan-t/daemonsets?limit=500 200 OK in 266 milliseconds


Please notice it's also duplicated across different sections when using --all-namespaces=true

Comment 8 Juan Vallejo 2018-01-19 17:02:32 UTC
I am unable to replicate this with latest version of server:

```
$ oc version
oc v3.9.0-alpha.2+0f43934-137-dirty
kubernetes v1.9.1+a0ce1bc657
features: Basic-Auth GSSAPI Kerberos SPNEGO

Server https://127.0.0.1:8443
openshift v3.9.0-alpha.3+78ddc10
kubernetes v1.9.1+a0ce1bc657
```

Maybe we need to wait for the next puddle?

Comment 9 Xingxing Xia 2018-01-22 05:41:23 UTC
*** Bug 1533559 has been marked as a duplicate of this bug. ***

Comment 10 Yanping Zhang 2018-01-22 07:01:29 UTC
Tested against OCP v3.9.0-0.22.0, the issue in Comment 7 still exists.
oc v3.9.0-0.22.0
kubernetes v1.9.1+a0ce1bc657
features: Basic-Auth GSSAPI Kerberos SPNEGO

Server https://*****:8443
openshift v3.9.0-0.22.0
kubernetes v1.9.1+a0ce1bc657

# oc get all -n kube-service-catalog
NAME                    DESIRED   CURRENT   READY     UP-TO-DATE   AVAILABLE   NODE SELECTOR               AGE
ds/apiserver            1         1         1         1            1           openshift-infra=apiserver   12m
ds/controller-manager   1         1         1         1            1           openshift-infra=apiserver   12m
ds/apiserver            1         1         1         1            1           openshift-infra=apiserver   12m
ds/controller-manager   1         1         1         1            1           openshift-infra=apiserver   12m


When will the fix be available in OCP?

Comment 11 Juan Vallejo 2018-01-22 19:38:37 UTC
@david looking at comment 10, and from local testing, daemonsets are being displayed twice. (Origin-specific resources such as DCs, BCs, etc display once as expected).

Looking at requests made in `oc get all`, we are hitting both
`/apis/apps/v1/namespaces/<project>/daemonsets`
and
`/apis/extensions/v1beta1/namespaces/<project>/daemonsets`

Comment 12 David Eads 2018-01-22 20:34:45 UTC
Take a look at https://github.com/openshift/origin/pull/18219

Comment 13 Juan Vallejo 2018-01-23 16:04:06 UTC
Fixed in https://github.com/openshift/origin/pull/18219, moving to ON_QA

Comment 14 Xingxing Xia 2018-01-25 09:46:36 UTC
Checked in v3.9.0-0.23.0, all resources bc/.../route, ds/deploy/rs in above comments are not duplicated in `oc get all`, moving to VERIFIED