Bug 1812746

Summary: [4.3] `oc explain egressnetworkpolicy` returns empty description
Product: OpenShift Container Platform Reporter: Liang Xia <lxia>
Component: NetworkingAssignee: Aniket Bhat <anbhat>
Networking sub component: openshift-sdn QA Contact: zhaozhanqi <zzhao>
Status: CLOSED DUPLICATE Docs Contact:
Severity: unspecified    
Priority: urgent CC: aconstan, bbennett, huirwang, zzhao
Version: 4.3.z   
Target Milestone: ---   
Target Release: 4.3.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1812745 Environment:
Last Closed: 2020-03-31 21:57:01 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1812745    
Bug Blocks:    

Description Liang Xia 2020-03-12 03:32:07 UTC
+++ This bug was initially created as a clone of Bug #1812745 +++

Description of problem:
`oc explain egressnetworkpolicy` returns empty description


Version-Release number of selected component (if applicable):
openshift-clients-4.4.0-202003060720.git.0.f2e420d.el7.x86_64
$ oc version --client -o yaml
clientVersion:
  buildDate: "2020-03-06T07:29:25Z"
  compiler: gc
  gitCommit: 2576e482bf003e34e67ba3d69edcf5d411cfd6f3
  gitTreeState: clean
  gitVersion: 4.4.0-202003060720-2576e48
  goVersion: go1.13.4
  major: ""
  minor: ""
  platform: linux/amd64


How reproducible:
Always

Steps to Reproduce:
1. oc explain egressnetworkpolicy


Actual results:
$ oc explain egressnetworkpolicy
KIND:     EgressNetworkPolicy
VERSION:  network.openshift.io/v1

DESCRIPTION:
     <empty>


Expected results:
Output the explanation of the resources.

Comment 1 zhaozhanqi 2020-03-12 06:46:31 UTC
I checked it's working well with openshift-clients-4.4.0-202002120246.git.1.e93a139.el7.x86_64

#oc explain egressnetworkpolicy
KIND:     EgressNetworkPolicy
VERSION:  network.openshift.io/v1

DESCRIPTION:
     EgressNetworkPolicy describes the current egress network policy for a
     Namespace. When using the 'redhat/openshift-ovs-multitenant' network
     plugin, traffic from a pod to an IP address outside the cluster will be
     checked against each EgressNetworkPolicyRule in the pod's namespace's
     EgressNetworkPolicy, in order. If no rule matches (or no
     EgressNetworkPolicy is present) then the traffic will be allowed by
     default.

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/sig-architecture/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/sig-architecture/api-conventions.md#types-kinds

   metadata	<Object>
     Standard object's metadata. More info:
     https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata

   spec	<Object> -required-
     spec is the specification of the current egress network policy

[zzhao@dhcp-140-240 ~]$ oc version
Client Version: v4.4.0
Server Version: 4.4.0-0.nightly-2020-03-09-205007
Kubernetes Version: v1.17.1

Comment 2 Liang Xia 2020-03-12 07:50:16 UTC
$ oc explain egressnetworkpolicy
KIND:     EgressNetworkPolicy
VERSION:  network.openshift.io/v1

DESCRIPTION:
     <empty>


$ oc version
Client Version: 4.4.0-202003060720-2576e48
Server Version: 4.3.5
Kubernetes Version: v1.16.2
[lxia@ocp tierN]$ oc explain egressnetworkpolicy
KIND:     EgressNetworkPolicy
VERSION:  network.openshift.io/v1

DESCRIPTION:
     <empty>

Comment 3 huirwang 2020-03-12 09:21:18 UTC
Retested it, it is working.

[fedora@preserved-huirwang ~]$ oc version
Client Version: 4.4.0-rc.0
Server Version: 4.4.0-0.nightly-2020-03-10-194324
Kubernetes Version: v1.17.1
[fedora@preserved-huirwang ~]$ oc explain egressnetworkpolicy
KIND:     EgressNetworkPolicy
VERSION:  network.openshift.io/v1

DESCRIPTION:
     EgressNetworkPolicy describes the current egress network policy for a
     Namespace. When using the 'redhat/openshift-ovs-multitenant' network
     plugin, traffic from a pod to an IP address outside the cluster will be
     checked against each EgressNetworkPolicyRule in the pod's namespace's
     EgressNetworkPolicy, in order. If no rule matches (or no
     EgressNetworkPolicy is present) then the traffic will be allowed by
     default.

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/sig-architecture/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/sig-architecture/api-conventions.md#types-kinds

   metadata	<Object>
     Standard object's metadata. More info:
     https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata

   spec	<Object> -required-
     spec is the specification of the current egress network policy

Comment 4 Liang Xia 2020-03-12 10:25:48 UTC
Move it to 4.3 as I can reproduce with oc client 4.2/4.3/4.4 on a 4.3 cluster.


$ oc/oc-4.2.20-202002140432.git.1.5dc67c9.el7 explain egressnetworkpolicy
KIND:     EgressNetworkPolicy
VERSION:  network.openshift.io/v1

DESCRIPTION:
     <empty>


$ oc/oc-4.3.6-202003090404.git.0.ee3be2a.el7 explain egressnetworkpolicy
KIND:     EgressNetworkPolicy
VERSION:  network.openshift.io/v1

DESCRIPTION:
     <empty>


$ oc/oc-4.4.0-202003060720.git.0.f2e420d.el7 explain egressnetworkpolicy
KIND:     EgressNetworkPolicy
VERSION:  network.openshift.io/v1

DESCRIPTION:
     <empty>

Comment 5 Liang Xia 2020-03-12 10:30:03 UTC
The server info (installer-provisioned infrastructure on OpenStack),

$ oc get clusterversion
NAME      VERSION   AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.3.5     True        False         3d2h    Cluster version is 4.3.5


$ oc version -o yaml
......
openshiftVersion: 4.3.5
serverVersion:
  buildDate: "2020-03-02T08:50:52Z"
  compiler: gc
  gitCommit: b3bfb5a
  gitTreeState: clean
  gitVersion: v1.16.2
  goVersion: go1.12.12
  major: "1"
  minor: "16"
  platform: linux/amd64

Comment 6 zhaozhanqi 2020-03-13 02:18:36 UTC
thanks liang xia found this issue, this is known issue but seems have not backport to 4.3, actually it's not only 'egressnetworkpolicy', but also other crd. see bug https://bugzilla.redhat.com/show_bug.cgi?id=1777707.