Bug 1609731

Summary: Create etcd-cluster in admin console got unexpected 404 Error
Product: OpenShift Container Platform Reporter: ge liu <geliu>
Component: Management ConsoleAssignee: Alec Merdler <amerdler>
Status: CLOSED ERRATA QA Contact: Yadan Pei <yapei>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.11.0CC: amerdler, aos-bugs, ecordell, geliu, htariq, jhadvig, jiazha, jokerman, juzhao, mmccomas, spadgett, ssadeghi
Target Milestone: ---   
Target Release: 4.1.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-04 10:40:22 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 ge liu 2018-07-30 09:54:06 UTC
Description of problem:
as title, installed ocp 3.11 with olm enabled, after installation,and create subscription for etcd-operator, login admin console: https://console.apps.0729-9gn.qe.rhcloud.com, Operators-->Cluster Service Versions, click etcd-operator->Instance, there is blue button "Create new", 
choose 'etcd operator', got unexpected error: Error 404: Page Not Found, choose 'etcd Backup' or 'etcd Restore', got same error.

ocp version: v3.11.0-0.9.0

How reproducible:
Always

Steps to Reproduce:
As description.


Actual results:

as title

Expected results:
create etcd-cluster in admin console should not get unexpected error

Comment 1 Evan Cordell 2018-08-22 15:30:42 UTC
Can you try with a more recent OCP release? I can't reproduce off of master.

Comment 2 ge liu 2018-08-23 07:01:43 UTC
@ecordell, I tried with latest ocp version, still reproduce this error:

# openshift version
openshift v3.11.0-0.20.0
# oc get pods etcd-operator-7b49974f5b-dmsnz -o yaml|grep image
    image: quay.io/coreos/etcd-operator@sha256:c0301e4686c3ed4206e370b42de5a3bd2229b9fb4906cf85f3f30650424abec2
    imagePullPolicy: IfNotPresent
    image: quay.io/coreos/etcd-operator@sha256:c0301e4686c3ed4206e370b42de5a3bd2229b9fb4906cf85f3f30650424abec2
    imagePullPolicy: IfNotPresent
    image: quay.io/coreos/etcd-operator@sha256:c0301e4686c3ed4206e370b42de5a3bd2229b9fb4906cf85f3f30650424abec2
    imagePullPolicy: IfNotPresent
  imagePullSecrets:
    image: sha256:10639c807879e82aa694ca1189c8fd06844fcdc7120ecf15cc367021bd392d84
    imageID: docker-pullable://quay.io/coreos/etcd-operator@sha256:c0301e4686c3ed4206e370b42de5a3bd2229b9fb4906cf85f3f30650424abec2
    image: quay.io/coreos/etcd-operator@sha256:c0301e4686c3ed4206e370b42de5a3bd2229b9fb4906cf85f3f30650424abec2
    imageID: docker-pullable://quay.io/coreos/etcd-operator@sha256:c0301e4686c3ed4206e370b42de5a3bd2229b9fb4906cf85f3f30650424abec2
    image: sha256:10639c807879e82aa694ca1189c8fd06844fcdc7120ecf15cc367021bd392d84
    imageID: docker-pullable://quay.io/coreos/etcd-operator@sha256:c0301e4686c3ed4206e370b42de5a3bd2229b9fb4906cf85f3f30650424abec2

Comment 3 Junqi Zhao 2018-09-03 09:12:37 UTC
Issue is reproduced
# openshift version
openshift v3.11.0-0.25.0

ose-console image
ose-console-v3.11.0-0.25.0.0

Comment 4 Evan Cordell 2018-09-04 14:38:48 UTC
Tagged Haseeb - Do you know the status of the downstream etcd operator images?

Comment 6 ge liu 2018-09-07 10:29:30 UTC
This problem still exist in latest ocp: openshift v3.11.0-0.28.0

Comment 7 Evan Cordell 2018-09-10 12:19:14 UTC
I believe I know the source of this issue.

When you install a new operator, OLM installs CRDs for you. In this case, EtcdCluster. The UI knows which resources it can display based on the discovery endpoint in kube. Unfortunately, there's no way to watch the discovery endpoint (like you can actual kube resources) and we have to rely on polling to find the new types.

This problem is solved in the UI by refreshing the page. I'll try to find out what the latest solution for this is in the UI. If it's polling discovery or manual refreshing, I'm wondering if the 404 page should just include language for that ("if you just installed a new operator / CRD / API Type, you may need to refresh")

Comment 8 Samuel Padgett 2018-09-12 11:05:52 UTC
Alec has a PR that should fix this:

https://github.com/openshift/console/pull/497

Comment 9 Samuel Padgett 2018-09-12 11:20:19 UTC
Note that the PR relies on polling for non-admin users, so this might still be a problem. I wonder if we should perform discovery again if the user navigates to a resource we don't recognize. The CLI does something similar.

Comment 10 ge liu 2018-09-17 10:06:18 UTC
I tried with non-admin user, and in ui,  operator section, got unexpected error: configmaps is forbidden: User "jianzhangbjz" cannot list configmaps in the namespace "operator-lifecycle-manager": no RBAC policy matched

Comment 11 Samuel Padgett 2018-09-17 14:21:12 UTC
(In reply to ge liu from comment #10)
> I tried with non-admin user, and in ui,  operator section, got unexpected
> error: configmaps is forbidden: User "jianzhangbjz" cannot list configmaps
> in the namespace "operator-lifecycle-manager": no RBAC policy matched

This specific problem is tracked by bug 1625996

The following PR has merged to 4.0, which should make the problem better. It will watch or poll for APIs depending on your RBAC permissions, and in cases where we still don't have the resource, it will show an error message asking the user to refresh.

https://github.com/openshift/console/pull/497

Comment 12 ge liu 2018-09-18 05:48:03 UTC
The bug:1625996 have been fixed and verified in openshift v3.11.7, and I tried non-admin user: "# oc adm policy add-cluster-role-to-user edit geliu" following the bug:1625996 comment, the error reported in comment 10 disappears, but 404 error still exist when create "etcd clster"/"etcd backup/restore".

Comment 13 Jian Zhang 2018-09-19 09:16:19 UTC
I also encounter this issue when creating the Couchbase cluster.
Workaround: refresh this page

Comment 16 Jian Zhang 2018-10-15 01:56:59 UTC
*** Bug 1638705 has been marked as a duplicate of this bug. ***

Comment 17 Samuel Padgett 2019-01-23 14:24:52 UTC
(In reply to ge liu from comment #12)
> The bug:1625996 have been fixed and verified in openshift v3.11.7, and I
> tried non-admin user: "# oc adm policy add-cluster-role-to-user edit geliu"
> following the bug:1625996 comment, the error reported in comment 10
> disappears, but 404 error still exist when create "etcd clster"/"etcd
> backup/restore".

This bug was fixed in 4.0, and it looks like you've tried to verify in 3.11. Can you confirm you tested a 4.0 build? If not, can you try this in 4.0?

Comment 18 ge liu 2019-03-11 03:09:05 UTC
Verified with 4.0.0-0.nightly-2019-03-06-074438.

Comment 21 errata-xmlrpc 2019-06-04 10:40:22 UTC
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:0758