Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Console Devfile Import Dev Preview broken #8729

Closed
maysunfaisal opened this issue Apr 21, 2021 · 2 comments
Closed

Console Devfile Import Dev Preview broken #8729

maysunfaisal opened this issue Apr 21, 2021 · 2 comments
Labels
component/dev-console Related to dev-console kind/bug Categorizes issue or PR as related to a bug.

Comments

@maysunfaisal
Copy link
Member

maysunfaisal commented Apr 21, 2021

When I use the sample repository from the Devfile Import Form, the pod never comes up:

NAME                                  READY   STATUS             RESTARTS   AGE     LABELS
pod/devfile-sample-1-build            0/1     Completed          0          9m20s   openshift.io/build.name=devfile-sample-1
pod/devfile-sample-54794cb986-g5g5g   1/2     ImagePullBackOff   0          8m23s   app=devfile-sample,deploymentconfig=devfile-sample,pod-template-hash=54794cb986

When I describe the pod, there are two containers, one of them being invalid:

Containers:
  buildguidance:
    Container ID:   
    Image:          buildguidanceimage-placeholder
    Image ID:       
    Port:           3001/TCP
    Host Port:      0/TCP
    State:          Waiting
      Reason:       ImagePullBackOff
    Ready:          False
    Restart Count:  0
    Limits:
      memory:  1Gi
    Requests:
      memory:  1Gi
    Environment:
      PROJECTS_ROOT:   /projects
      PROJECT_SOURCE:  /projects
    Mounts:
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-bgqxs (ro)
  devfile-sample:
    Container ID:   cri-o://f4f4eed3105233ac5e2a2b115a5b499496684886145561e9fb3f011a14b99980
    Image:          image-registry.openshift-image-registry.svc:5000/mjf/devfile-sample@sha256:f4c7d9b18328b1b722885c4ddce77f4dd15a9f031d513626e5d5786cbf2c602e
    Image ID:       image-registry.openshift-image-registry.svc:5000/mjf/devfile-sample@sha256:f4c7d9b18328b1b722885c4ddce77f4dd15a9f031d513626e5d5786cbf2c602e
    Port:           <none>
    Host Port:      <none>
    State:          Running
      Started:      Wed, 21 Apr 2021 12:15:55 -0400
    Ready:          True
    Restart Count:  0
    Environment:    <none>
    Mounts:
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-bgqxs (ro)
Conditions:
  Type              Status
  Initialized       True 
  Ready             False 
  ContainersReady   False 
  PodScheduled      True 
Volumes:
  default-token-bgqxs:
    Type:        Secret (a volume populated by a Secret)
    SecretName:  default-token-bgqxs
    Optional:    false
QoS Class:       Burstable
Node-Selectors:  <none>
Tolerations:     node.kubernetes.io/memory-pressure:NoSchedule
                 node.kubernetes.io/not-ready:NoExecute for 300s
                 node.kubernetes.io/unreachable:NoExecute for 300s
Events:
  Type     Reason          Age               From                                                 Message
  ----     ------          ----              ----                                                 -------
  Normal   Scheduled       <unknown>                                                              Successfully assigned mjf/devfile-sample-54794cb986-g5g5g to ip-xx-x-xxx-xxx.us-east-2.compute.internal
  Normal   AddedInterface  10m               multus                                               Add eth0 [10.131.0.60/23]
  Normal   Pulling         10m               kubelet, ip-xx-x-xxx-xxx.us-east-2.compute.internal  Pulling image "image-registry.openshift-image-registry.svc:5000/mjf/devfile-sample@sha256:f4c7d9b18328b1b722885c4ddce77f4dd15a9f031d513626e5d5786cbf2c602e"
  Normal   Started         10m               kubelet, ip-xx-x-xxx-xxx.us-east-2.compute.internal  Started container devfile-sample
  Normal   Pulled          10m               kubelet, ip-xx-x-xxx-xxx.us-east-2.compute.internal  Successfully pulled image "image-registry.openshift-image-registry.svc:5000/mjf/devfile-sample@sha256:f4c7d9b18328b1b722885c4ddce77f4dd15a9f031d513626e5d5786cbf2c602e" in 6.226576202s
  Normal   Created         10m               kubelet, ip-xx-x-xxx-xxx.us-east-2.compute.internal  Created container devfile-sample
  Normal   Pulling         9m (x3 over 10m)  kubelet, ip-xx-x-xxx-xxx.us-east-2.compute.internal  Pulling image "buildguidanceimage-placeholder"
  Warning  Failed          9m (x3 over 10m)  kubelet, ip-xx-x-xxx-xxx.us-east-2.compute.internal  Failed to pull image "buildguidanceimage-placeholder": rpc error: code = Unknown desc = Error reading manifest latest in docker.io/library/buildguidanceimage-placeholder: errors:
denied: requested access to the resource is denied
unauthorized: authentication required
  Warning  Failed   9m (x3 over 10m)    kubelet, ip-xx-x-xxx-xxx.us-east-2.compute.internal  Error: ErrImagePull
  Normal   BackOff  8m (x6 over 10m)    kubelet, ip-xx-x-xxx-xxx.us-east-2.compute.internal  Back-off pulling image "buildguidanceimage-placeholder"
  Warning  Failed   11s (x43 over 10m)  kubelet, ip-xx-x-xxx-xxx.us-east-2.compute.internal  Error: ImagePullBackOff

The buildguidanceimage-placeholder container isn't to be be created, its only a placeholder in the devfile.yaml sample https://github.com/redhat-developer/devfile-sample/blob/master/devfile.yaml#L13 for the dev preview. Console is supposed to just read the information from devfile or /api/devfile/ endpoint and create Kubernetes resource within the existing Console framework ie, there should be one container in the pod with the necessary ports defined for accessing the application.

IMO this notion of retrofitting the devfile import within the existing system caused it to break when the code was modified (I think its createDevfileResources() in frontend/packages/dev-console/src/components/import/import-submit-utils.ts)

I've tried this on OpenShift 4.7.6 and OpenShift 4.8.x/master

@christianvogt
Copy link
Contributor

created a bugzilla to track: https://bugzilla.redhat.com/show_bug.cgi?id=1952214

@spadgett spadgett added component/dev-console Related to dev-console kind/bug Categorizes issue or PR as related to a bug. labels Apr 22, 2021
@spadgett
Copy link
Member

Closing this issue since it is now tracked in Bugzilla. Please follow the Bugzilla bug for updates. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/dev-console Related to dev-console kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

3 participants