Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1822437

Summary: Instances tab of a CRD will try to load with an API version that is not served
Product: OpenShift Container Platform Reporter: bpeterse
Component: Management ConsoleAssignee: Joe Caiani <jcaiani>
Status: CLOSED ERRATA QA Contact: Yadan Pei <yapei>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.4CC: aos-bugs, hasha, jcaiani, jforrest, jokerman, nagrawal, spadgett, yapei
Target Milestone: ---   
Target Release: 4.4.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: used deprecated version api Consequence: caused instances tab of crd to load with a version thats not the latest Fix: use versions array api instead Result: get the latest version instances for a crd
Story Points: ---
Clone Of: 1819028 Environment:
Last Closed: 2020-07-06 20:47:16 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: 1819028    
Bug Blocks:    

Description bpeterse 2020-04-09 01:54:39 UTC
+++ This bug was initially created as a clone of Bug #1819028 +++

Create a CRD with multiple versions, the oldest of which has served:false, and going to the CRD's Instances tab will result in nothing in the tab and dev tools console showing:

kindObj: no model for kind autoscaling.k8s.io~v1beta1~VerticalPodAutoscaler
No model registered for autoscaling.k8s.io~v1beta1~VerticalPodAutoscaler

The error also impacts the CRD UI within the Operator details page. However, if I go to the API Explorer and find one of the versions of the object that is served, I can go to its Instances tab successfully.

Example of a CRD that causes the failure:



---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
  name: verticalpodautoscalers.autoscaling.k8s.io
spec:
  group: autoscaling.k8s.io
  scope: Namespaced
  names:
    plural: verticalpodautoscalers
    singular: verticalpodautoscaler
    kind: VerticalPodAutoscaler
    shortNames:
      - vpa
  version: v1beta1
  versions:
    - name: v1beta1
      served: false
      storage: false
    - name: v1beta2
      served: true
      storage: true
    - name: v1
      served: true
      storage: false
  validation:
    # openAPIV3Schema is the schema for validating custom objects.
    openAPIV3Schema:
      properties:
        spec:
          type: object
          required: []
          properties:
            targetRef:
              type: object
            updatePolicy:
              type: object
              properties:
                updateMode:
                  type: string
            resourcePolicy:
              type: object
              properties:
                containerPolicies:
                  type: array
                  items:
                    type: object

Comment 3 Joe Caiani 2020-05-08 17:01:29 UTC
moving to upcoming sprint: the fix for this is currently in code review for 4.5. that will be merged and cherry picked to the 4.4.z stream in the upcoming sprint.

Comment 8 shahan 2020-06-28 06:40:17 UTC
1. Create CRD using the YAML in description
2. Goes to Instances tab, now it shows 'No VerticalPodAutoscalers Found' and a 'Create VerticalPodAutoscaler' button

loaded autoscaling.k8s.io~v1~VerticalPodAutoscaler is shown in JS console, no warnings

4.4.0-0.nightly-2020-06-27-171816

Comment 10 errata-xmlrpc 2020-07-06 20:47:16 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:2786