Bug 1809282 - Missing properties in Etcd OpenSpec API
Summary: Missing properties in Etcd OpenSpec API
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Etcd Operator
Version: 4.4
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.5.0
Assignee: Dan Mace
QA Contact: ge liu
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-03-02 19:04 UTC by Jason Boxman
Modified: 2020-07-13 17:17 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: Missing properties in etcd spec Consequence: The command `oc explain etcd` doesn't list properties typically seen with specs. Fix: Fill out the CRD to describe the properties. Result: The explain command fully describes the properities of etcd.
Clone Of:
Environment:
Last Closed: 2020-07-13 17:17:25 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Github openshift cluster-etcd-operator pull 359 None closed Bug 1809282: regenerate the CRD from the latest types 2020-08-11 04:42:31 UTC
Red Hat Product Errata RHBA-2020:2409 None None None 2020-07-13 17:17:44 UTC

Description Jason Boxman 2020-03-02 19:04:07 UTC
Hi,

For some reason, the OpenAPI spec for Etcd does not have a `properties` key:

```
    "io.openshift.operator.v1.Etcd": {
      "type": "object",
      "x-kubernetes-group-version-kind": [
        {
          "group": "operator.openshift.io",
          "kind": "Etcd",
          "version": "v1"
        }
      ]
    },
```

This spec is part of the output from `oc get —raw /apis`. I’ve been using the OpenAPI spec file as the basis for the OpenShift API documentation on docs.openshift.com.

The fix may be to include `preserveUnknownFields: false` CRD[0].


How reproducible:


Steps to Reproduce:
1. Run `oc get —raw /apis`

Typically, they look like this:

```
    "io.k8s.api.extensions.v1beta1.NetworkPolicy": {
      "description": "DEPRECATED 1.9 - This group version of NetworkPolicy is deprecated by networking/v1/NetworkPolicy. NetworkPolicy describes what network traffic is allowed for a set of Pods",
      "type": "object",
      "properties": {
        "apiVersion": {
          "description": "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",
          "type": "string"
        },
        "kind": {
          "description": "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",
          "type": "string"
        },
        "metadata": {
          "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata",
          "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta"
        },
        "spec": {
          "description": "Specification of the desired behavior for this NetworkPolicy.",
          "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.NetworkPolicySpec"
        }
      },
```

[0] https://github.com/openshift/cluster-network-operator/pull/458

Comment 4 Michal Fojtik 2020-05-12 10:32:49 UTC
This bug hasn't had any activity in the last 30 days. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

As such, we're marking this bug as "LifecycleStale" and decreasing severity from "medium" to "low".

If you have further information on the current state of the bug, please update it, otherwise this bug will be automatically closed in 7 days. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

Comment 5 Jason Boxman 2020-05-12 16:03:24 UTC
Hi, this is still an issue in 4.4.3, assuming we want output for `oc explain`.

```
oc explain Etcd
KIND:     Etcd
VERSION:  operator.openshift.io/v1

DESCRIPTION:
     <empty>
```

```
oc version
Client Version: 4.4.3
Server Version: 4.4.3
Kubernetes Version: v1.17.1
```

Comment 6 Michal Fojtik 2020-05-20 10:58:20 UTC
I’m adding UpcomingSprint, because the team occupied by fixing bugs with higher priority/severity, developing new features with higher priority, or developing new features to improve stability at a macro level. We will revisit this bug next sprint.

Comment 7 Dan Mace 2020-05-20 15:09:00 UTC
I think the CRD[1] probably needs moved to openshift/api and cleaned up. This would include adding the preserveUnknownFields property.

[1] https://github.com/openshift/cluster-etcd-operator/blob/master/manifests/0000_12_etcd-operator_01_config.crd.yaml

Comment 10 Roshni 2020-05-26 15:34:23 UTC
# oc get clusterversions.config.openshift.io 
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE     STATUS
version   4.5.0-0.nightly-2020-05-26-112702   True        False         78m       Cluster version is 4.5.0-0.nightly-2020-05-26-112702

# oc explain Etcd
KIND:     Etcd
VERSION:  operator.openshift.io/v1

DESCRIPTION:
     Etcd provides information to configure an operator to manage
     kube-apiserver.

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-

   status	<Object>

Comment 12 errata-xmlrpc 2020-07-13 17:17:25 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-2020:2409


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