Bug 1476166 - CLI returned the clusterrole was created, but actually it did not
Summary: CLI returned the clusterrole was created, but actually it did not
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: oc
Version: 3.6.0
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ---
: 3.7.0
Assignee: Fabiano Franz
QA Contact: Junqi Zhao
URL:
Whiteboard:
Depends On:
Blocks: 1440970 1479989
TreeView+ depends on / blocked
 
Reported: 2017-07-28 07:57 UTC by Junqi Zhao
Modified: 2018-05-10 06:12 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-11-28 22:05:56 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2017:3188 0 normal SHIPPED_LIVE Moderate: Red Hat OpenShift Container Platform 3.7 security, bug, and enhancement update 2017-11-29 02:34:54 UTC

Description Junqi Zhao 2017-07-28 07:57:33 UTC
Description of problem:
Try to create clusterrole by command: 
oc create clusterrole hawkular-metrics --verb=get,list,watch --resource=namespaces

the command retruned the clusterrole was created, but actually it did not.

# oc create clusterrole hawkular-metrics --verb=get,list,watch --resource=namespaces
clusterrole "hawkular-metrics" created

# oc get clusterrole hawkular-metrics -o yaml
Error from server (NotFound): clusterrole.authorization.openshift.io "hawkular-metrics" not found


Version-Release number of selected component (if applicable):
# openshift version
openshift v3.6.172.0.0
kubernetes v1.6.1+5115d708d7
etcd 3.2.1

How reproducible:
Always

Steps to Reproduce:
1. oc create clusterrole hawkular-metrics --verb=get,list,watch --resource=namespaces
2. oc get clusterrole hawkular-metrics -o yaml
3.

Actual results:
clusterrole "hawkular-metrics" did not create actually.

Expected results:
clusterrole "hawkular-metrics" should be created.

Additional info:

Comment 2 Juan Vallejo 2017-08-17 20:44:44 UTC
I was able to reproduce this bug using commit https://github.com/openshift/origin/commit/70ec58fe94923d8eba45fdeaa7abea147576086a

At least as of https://github.com/openshift/origin/commit/edf3ff5d466a3ffd2f99e9929952d285822443b9 (or latest master) this issue appears to be fixed.

```
$ oc version
oc v3.7.0-alpha.0+60f92ee-347-dirty
kubernetes v1.7.0+695f48a16f
features: Basic-Auth

Server https://10.13.137.206:8443
openshift v3.7.0-alpha.0+60f92ee-347-dirty
kubernetes v1.7.0+695f48a16f
```

Adding Mo to cc list

Comment 3 Mo 2017-08-17 22:06:15 UTC
These commands will be disabled in 3.6 once https://github.com/openshift/origin/pull/15618 merges.  They worked as expected in 3.7 as of https://github.com/openshift/origin/pull/15021

Comment 5 Junqi Zhao 2017-10-09 09:05:25 UTC
Issue is fixed now, see the following output.

# oc create clusterrole hawkular-metrics --verb=get,list,watch --resource=namespaces
clusterrole "hawkular-metrics" created

# oc get clusterrole hawkular-metrics -o yaml
apiVersion: v1
kind: ClusterRole
metadata:
  creationTimestamp: 2017-10-09T08:57:05Z
  name: hawkular-metrics
  resourceVersion: "16895"
  selfLink: /oapi/v1/clusterroles/hawkular-metrics
  uid: d31ce3c4-accf-11e7-b2b5-fa163e3f2b53
rules:
- apiGroups:
  - ""
  attributeRestrictions: null
  resources:
  - namespaces
  verbs:
  - get
  - list
  - watch


# openshift version
openshift v3.7.0-0.126.6
kubernetes v1.7.0+80709908fd
etcd 3.2.1

Comment 8 errata-xmlrpc 2017-11-28 22:05:56 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/RHSA-2017:3188


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