Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1476166 - CLI returned the clusterrole was created, but actually it did not
CLI returned the clusterrole was created, but actually it did not
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Command Line Interface (Show other bugs)
3.6.0
Unspecified Unspecified
medium Severity low
: ---
: 3.7.0
Assigned To: Fabiano Franz
Junqi Zhao
:
Depends On:
Blocks: 1440970 1479989
  Show dependency treegraph
 
Reported: 2017-07-28 03:57 EDT by Junqi Zhao
Modified: 2018-05-10 02:12 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-11-28 17:05:56 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2017:3188 normal SHIPPED_LIVE Moderate: Red Hat OpenShift Container Platform 3.7 security, bug, and enhancement update 2017-11-28 21:34:54 EST

  None (edit)
Description Junqi Zhao 2017-07-28 03:57:33 EDT
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 16:44:44 EDT
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 18:06:15 EDT
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 05:05:25 EDT
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 17:05:56 EST
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.