Bug 1658860 - [4.0]Some resource cann't be used the explain command in nextgen env
Summary: [4.0]Some resource cann't be used the explain command in nextgen env
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: oc
Version: 4.1.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.1.0
Assignee: Maciej Szulik
QA Contact: zhou ying
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-12-13 03:24 UTC by zhou ying
Modified: 2019-06-04 10:41 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: OpenShift api did not have proper wiring for open api. Consequence: oc explain was not working with openshift resources. Fix: Properly wire openapi aggregation for openshift api server. Result: oc explain works as expected for openshift types.
Clone Of:
Environment:
Last Closed: 2019-06-04 10:41:14 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:0758 0 None None None 2019-06-04 10:41:20 UTC

Description zhou ying 2018-12-13 03:24:13 UTC
Description of problem:
In nextgen env, Use `oc explain dc` met error:  Couldn't find resource for "apps.openshift.io/v1, Kind=DeploymentConfig"
The same like : bc , scc , project and so on.
Ansible-installed BRYO env doesn't have the issue.

Version-Release number of selected component (if applicable):
oc v4.0.0-alpha.0+231d012-769
kubernetes v1.11.0+231d012


How reproducible:
always

Steps to Reproduce:
1. Login openshift,and create project;
2. Use command : `oc explain dc`



Actual results:
2. Met error: Couldn't find resource for "apps.openshift.io/v1, Kind=DeploymentConfig"


Expected results:
2. Should works well


Additional info:

Comment 1 W. Trevor King 2018-12-18 05:46:19 UTC
'explain' doesn't currently work for custom resources like many 4.0 configuration types.  There's work upstream to address this [1,2,3].

[1]: https://github.com/kubernetes/kube-openapi/issues/97
[2]: https://github.com/kubernetes/kubernetes/issues/71142
[3]: https://github.com/kubernetes/kubernetes/pull/71192

Comment 2 Juan Vallejo 2018-12-18 12:49:48 UTC
Additionally, there is a PR open [1] to address openshift-specific types.


1. https://github.com/openshift/origin/pull/21448

Comment 3 Juan Vallejo 2019-02-04 15:35:18 UTC
Origin PR [1] has merged.

1. https://github.com/openshift/origin/pull/21739

Comment 4 zhou ying 2019-02-12 09:05:31 UTC
Confirmed with latest version, the issue has fixed:
[root@dhcp-140-138 ~]# oc get clusterversion
NAME      VERSION                           AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.0.0-0.alpha-2019-02-11-201342   True        False         5m10s   Cluster version is 4.0.0-0.alpha-2019-02-11-201342

[root@dhcp-140-138 ~]# oc explain dc
KIND:     DeploymentConfig
VERSION:  apps.openshift.io/v1

DESCRIPTION:
     Deployment Configs define the template for a pod and manages deploying new
     images or configuration changes. A single deployment configuration is
     usually analogous to a single micro-service. Can support many different
     deployment patterns, including full restart, customizable rolling updates,
     and fully custom behaviors, as well as pre- and post- deployment hooks.
     Each individual deployment is represented as a replication controller. A
     deployment is "triggered" when its configuration is changed or a tag in an
     Image Stream is changed. Triggers can be disabled to allow manual control
     over a deployment. The "strategy" determines how the deployment is carried
     out and may be changed at any time. The `latestVersion` field is updated
     when a new deployment is triggered by any means.

FIELDS:
   apiVersion	<string>
     APIVersion defines the versioned schema of this representation of an
     object. Servers should convert recognized schemas to the latest internal
     value, and may reject unrecognized values. More info:
     https://git.k8s.io/community/contributors/devel/api-conventions.md#resources

   kind	<string>
     Kind is a string value representing the REST resource this object
     represents. Servers may infer this from the endpoint the client submits
     requests to. Cannot be updated. In CamelCase. More info:
     https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds

   metadata	<Object>
     Standard object's metadata.

   spec	<Object> -required-
     Spec represents a desired deployment state and how to deploy to it.

   status	<Object>
     Status represents the current deployment state.

Comment 8 errata-xmlrpc 2019-06-04 10:41:14 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


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