Bug 1986338 - error creating list of resources in Import YAML
Summary: error creating list of resources in Import YAML
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 4.9
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 4.10.0
Assignee: Yadan Pei
QA Contact: Yadan Pei
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-07-27 10:07 UTC by Yadan Pei
Modified: 2022-03-10 16:05 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-03-10 16:04:47 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
list resources are created successfully (280.37 KB, image/png)
2021-11-12 03:23 UTC, Yadan Pei
no flags Details
resources are created again (280.37 KB, image/png)
2021-11-12 03:23 UTC, Yadan Pei
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github openshift console pull 9765 0 None open Bug 1986338: Error creating list of resources in Import YAML 2021-09-22 18:28:38 UTC
Red Hat Product Errata RHSA-2022:0056 0 None None None 2022-03-10 16:05:06 UTC

Description Yadan Pei 2021-07-27 10:07:55 UTC
Description of problem:
see steps to reproduce

Version-Release number of selected component (if applicable):
4.9.0-0.nightly-2021-07-26-071921 


How reproducible:
Always

Steps to Reproduce:
1. cluster admin user log into console and click the plus icon(Import YAML) to add resource yaml
2. copy and paste following content and click on 'Create' button
apiVersion: v1
kind: Namespace
metadata:
  name: console-demo-plugin
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: console-demo-plugin
  namespace: console-demo-plugin
  labels:
    app: console-demo-plugin
    app.kubernetes.io/component: console-demo-plugin
    app.kubernetes.io/instance: console-demo-plugin
    app.kubernetes.io/part-of: console-demo-plugin
    app.openshift.io/runtime-namespace: console-demo-plugin
spec:
  replicas: 1
  selector:
    matchLabels:
      app: console-demo-plugin
  template:
    metadata:
      labels:
        app: console-demo-plugin
    spec:
      containers:
        - name: console-demo-plugin
          image: quay.io/yapei/console-demo-plugin-locales:latest
          ports:
            - containerPort: 9001
              protocol: TCP
          imagePullPolicy: Always
          args:
            - '--ssl'
            - '--cert=/var/serving-cert/tls.crt'
            - '--key=/var/serving-cert/tls.key'
          volumeMounts:
            - name: console-serving-cert
              readOnly: true
              mountPath: /var/serving-cert
      volumes:
        - name: console-serving-cert
          secret:
            secretName: console-serving-cert
            defaultMode: 420
      restartPolicy: Always
      dnsPolicy: ClusterFirst
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxUnavailable: 25%
      maxSurge: 25%
---
apiVersion: v1
kind: Service
metadata:
  annotations:
    service.alpha.openshift.io/serving-cert-secret-name: console-serving-cert
  name: console-demo-plugin
  namespace: console-demo-plugin
  labels:
    app: console-demo-plugin
    app.kubernetes.io/component: console-demo-plugin
    app.kubernetes.io/instance: console-demo-plugin
    app.kubernetes.io/part-of: console-demo-plugin
spec:
  ports:
    - name: 9001-tcp
      protocol: TCP
      port: 9001
      targetPort: 9001
  selector:
    app: console-demo-plugin
  type: ClusterIP
  sessionAffinity: None
---
apiVersion: console.openshift.io/v1alpha1
kind: ConsolePlugin
metadata:
  name: console-demo-plugin
spec:
  displayName: 'OpenShift Console Demo Plugin'
  service:
    name: console-demo-plugin
    namespace: console-demo-plugin
    port: 9001
    basePath: '/'


Actual results:
2. console returns an error message
An error occurred
Deployment console-demo-plugin: namespaces "console-demo-plugin" not found
Service console-demo-plugin: namespaces "console-demo-plugin" not found


Expected results:
2. the resources should be created successfully without errors, namespace is created first then create other resources 

Additional info:
If I tries to create via CLI `oc apply -f oc-manifest.yaml` all resources can be successfully created

Request URL: https://console-openshift-console.apps.qe-ui49-0727.qe.devcluster.openshift.com/api/kubernetes/api/v1/namespaces?dryRun=All returns 201 Created 

Request URL: https://console-openshift-console.apps.qe-ui49-0727.qe.devcluster.openshift.com/api/kubernetes/apis/apps/v1/namespaces/console-demo-plugin/deployments?dryRun=All returns 404 Not Found

Request URL: https://console-openshift-console.apps.qe-ui49-0727.qe.devcluster.openshift.com/api/kubernetes/api/v1/namespaces/console-demo-plugin/services?dryRun=All returns 404 Not Found


Request URL: https://console-openshift-console.apps.qe-ui49-0727.qe.devcluster.openshift.com/api/kubernetes/apis/console.openshift.io/v1alpha1/consoleplugins?dryRun=All returns 201 Created

Comment 2 Yadan Pei 2021-11-12 03:23:09 UTC
Created attachment 1841309 [details]
list resources are created successfully

follow the steps in bug description, now list resources can be created successfully, verified on 4.10.0-0.nightly-2021-11-11-170956

Comment 3 Yadan Pei 2021-11-12 03:23:40 UTC
Created attachment 1841310 [details]
resources are created again

Comment 7 errata-xmlrpc 2022-03-10 16:04:47 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 (Moderate: OpenShift Container Platform 4.10.3 security update), 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-2022:0056


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