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

Error when building with ODC #1

Open
maysunfaisal opened this issue Apr 28, 2021 · 1 comment
Open

Error when building with ODC #1

maysunfaisal opened this issue Apr 28, 2021 · 1 comment

Comments

@maysunfaisal
Copy link

I am pasting the pod describe and pod log:

Maysuns-MacBook-Pro:openshift-install-mac maysun$ oc describe po devfile-sample-python-basic-66b96fcb96-x459t 
Name:               devfile-sample-python-basic-66b96fcb96-x459t
Namespace:          mjf
Priority:           0
PriorityClassName:  <none>
Node:               ip-10-0-138-26.us-east-2.compute.internal/10.0.138.26
Start Time:         Wed, 28 Apr 2021 16:47:42 -0400
Labels:             app=devfile-sample-python-basic
                    deploymentconfig=devfile-sample-python-basic
                    pod-template-hash=66b96fcb96
Annotations:        k8s.v1.cni.cncf.io/network-status=[{
    "name": "",
    "interface": "eth0",
    "ips": [
        "10.129.2.68"
    ],
    "default": true,
    "dns": {}
}]
  k8s.v1.cni.cncf.io/networks-status=[{
    "name": "",
    "interface": "eth0",
    "ips": [
        "10.129.2.68"
    ],
    "default": true,
    "dns": {}
}]
                openshift.io/scc=restricted
Status:         Running
IP:             10.129.2.68
Controlled By:  ReplicaSet/devfile-sample-python-basic-66b96fcb96
Containers:
  devfile-sample-python-basic:
    Container ID:   cri-o://6cf7d6162671506aac535efb4bf02441c1e1c4b5443a0d84acba989d12cce7c3
    Image:          image-registry.openshift-image-registry.svc:5000/mjf/devfile-sample-python-basic@sha256:894c79c9aa4d145faceafc217f0046c373b36826189d4630929f44f92e00ec53
    Image ID:       image-registry.openshift-image-registry.svc:5000/mjf/devfile-sample-python-basic@sha256:894c79c9aa4d145faceafc217f0046c373b36826189d4630929f44f92e00ec53
    Port:           8080/TCP
    Host Port:      0/TCP
    State:          Waiting
      Reason:       CrashLoopBackOff
    Last State:     Terminated
      Reason:       Error
      Exit Code:    1
      Started:      Wed, 28 Apr 2021 16:48:04 -0400
      Finished:     Wed, 28 Apr 2021 16:48:04 -0400
    Ready:          False
    Restart Count:  2
    Limits:
      memory:  1Gi
    Requests:
      memory:  1Gi
    Environment:
      PROJECTS_ROOT:   /projects
      PROJECT_SOURCE:  /projects
    Mounts:
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-66q2s (ro)
Conditions:
  Type              Status
  Initialized       True 
  Ready             False 
  ContainersReady   False 
  PodScheduled      True 
Volumes:
  default-token-66q2s:
    Type:        Secret (a volume populated by a Secret)
    SecretName:  default-token-66q2s
    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-python-basic-66b96fcb96-x459t to ip-10-0-138-26.us-east-2.compute.internal
  Normal   AddedInterface  48s                multus                                              Add eth0 [10.129.2.68/23]
  Normal   Pulled          45s                kubelet, ip-10-0-138-26.us-east-2.compute.internal  Successfully pulled image "image-registry.openshift-image-registry.svc:5000/mjf/devfile-sample-python-basic@sha256:894c79c9aa4d145faceafc217f0046c373b36826189d4630929f44f92e00ec53" in 2.7506209s
  Normal   Pulled          44s                kubelet, ip-10-0-138-26.us-east-2.compute.internal  Successfully pulled image "image-registry.openshift-image-registry.svc:5000/mjf/devfile-sample-python-basic@sha256:894c79c9aa4d145faceafc217f0046c373b36826189d4630929f44f92e00ec53" in 81.271439ms
  Normal   Pulling         27s (x3 over 47s)  kubelet, ip-10-0-138-26.us-east-2.compute.internal  Pulling image "image-registry.openshift-image-registry.svc:5000/mjf/devfile-sample-python-basic@sha256:894c79c9aa4d145faceafc217f0046c373b36826189d4630929f44f92e00ec53"
  Normal   Created         27s (x3 over 44s)  kubelet, ip-10-0-138-26.us-east-2.compute.internal  Created container devfile-sample-python-basic
  Normal   Started         27s (x3 over 44s)  kubelet, ip-10-0-138-26.us-east-2.compute.internal  Started container devfile-sample-python-basic
  Normal   Pulled          27s                kubelet, ip-10-0-138-26.us-east-2.compute.internal  Successfully pulled image "image-registry.openshift-image-registry.svc:5000/mjf/devfile-sample-python-basic@sha256:894c79c9aa4d145faceafc217f0046c373b36826189d4630929f44f92e00ec53" in 78.973057ms
  Warning  BackOff         11s (x4 over 43s)  kubelet, ip-10-0-138-26.us-east-2.compute.internal  Back-off restarting failed container
Maysuns-MacBook-Pro:openshift-install-mac maysun$ 
Maysuns-MacBook-Pro:openshift-install-mac maysun$ 
Maysuns-MacBook-Pro:openshift-install-mac maysun$ 
Maysuns-MacBook-Pro:openshift-install-mac maysun$ 
Maysuns-MacBook-Pro:openshift-install-mac maysun$ oc logs -f devfile-sample-python-basic-66b96fcb96-x459t 
Traceback (most recent call last):
  File "/projects/app.py", line 1, in <module>
    from flask import Flask
ModuleNotFoundError: No module named 'flask'
@maysunfaisal
Copy link
Author

Build Config build says build is successful:

Cloning "https://github.com/elsony/devfile-sample-python-basic" ...
	Commit:	c8ad2caf48743afceb9ddbca24474e2256c1210c (Move icon to .devfile folder)
	Author:	eyuen <[email protected]>
	Date:	Wed Apr 28 15:53:07 2021 -0400
Caching blobs under "/var/cache/blobs".

Pulling image python:slim ...
Getting image source signatures
Copying blob sha256:f7ec5a41d630a33a2d1db59b95d89d93de7ae5a619a3a8571b78457e48266eba
Copying blob sha256:7e166269edc8a525496ddb8b8da9d24e14e86023909bdd8a8071286248000429
Copying blob sha256:ac4bddc73958ff36b2c0655c1a22b9f272f2e1ba1fe13a3e1087d7bdb3cfe470
Copying blob sha256:388aab6f395415d7b5f9dcb43e1358fc58c8c6d611abe54624a573b652ae9411
Copying blob sha256:9501c65d3a7f8312515595d4925124500458e4e8bcc20ef26759b83daa16f0a2
Copying config sha256:ec4ebd7d6bf5328c7d6aefb67270515592e87554ca65f1d738fc4c4cd35cecfa
Writing manifest to image destination
Storing signatures
Adding transient rw bind mount for /run/secrets/rhsm
STEP 1: FROM python:slim
STEP 2: WORKDIR /projects
--> 69d64d4c01b
STEP 3: COPY . .
--> b458e09e3bb
STEP 4: RUN pip install --user -r requirements.txt
Collecting Flask==1.1.2
  Downloading Flask-1.1.2-py2.py3-none-any.whl (94 kB)
Collecting Jinja2>=2.10.1
  Downloading Jinja2-2.11.3-py2.py3-none-any.whl (125 kB)
Collecting click>=5.1
  Downloading click-7.1.2-py2.py3-none-any.whl (82 kB)
Collecting Werkzeug>=0.15
  Downloading Werkzeug-1.0.1-py2.py3-none-any.whl (298 kB)
Collecting itsdangerous>=0.24
  Downloading itsdangerous-1.1.0-py2.py3-none-any.whl (16 kB)
Collecting MarkupSafe>=0.23
  Downloading MarkupSafe-1.1.1-cp39-cp39-manylinux2010_x86_64.whl (32 kB)
Installing collected packages: MarkupSafe, Werkzeug, Jinja2, itsdangerous, click, Flask
  WARNING: The script flask is installed in '/root/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
WARNING: Value for scheme.headers does not match. Please report this to <https://github.com/pypa/pip/issues/9617>
distutils: /root/.local/include/python3.9/UNKNOWN
sysconfig: /root/.local/include/python3.9
WARNING: Additional context:
user = True
home = None
root = None
prefix = None
WARNING: Running pip as root will break packages and permissions. You should install packages reliably by using venv: https://pip.pypa.io/warnings/venv
Successfully installed Flask-1.1.2 Jinja2-2.11.3 MarkupSafe-1.1.1 Werkzeug-1.0.1 click-7.1.2 itsdangerous-1.1.0
--> 1d0baa05b17
STEP 5: EXPOSE 8080
--> ae89528fa37
STEP 6: CMD ["python","app.py"]
--> 81c7d92740d
STEP 7: ENV "OPENSHIFT_BUILD_NAME"="devfile-sample-python-basic-1" "OPENSHIFT_BUILD_NAMESPACE"="mjf" "OPENSHIFT_BUILD_SOURCE"="https://github.com/elsony/devfile-sample-python-basic" "OPENSHIFT_BUILD_COMMIT"="c8ad2caf48743afceb9ddbca24474e2256c1210c"
--> b1e1327306d
STEP 8: LABEL "io.openshift.build.commit.author"="eyuen <[email protected]>" "io.openshift.build.commit.date"="Wed Apr 28 15:53:07 2021 -0400" "io.openshift.build.commit.id"="c8ad2caf48743afceb9ddbca24474e2256c1210c" "io.openshift.build.commit.message"="Move icon to .devfile folder" "io.openshift.build.commit.ref"="main" "io.openshift.build.name"="devfile-sample-python-basic-1" "io.openshift.build.namespace"="mjf" "io.openshift.build.source-location"="https://github.com/elsony/devfile-sample-python-basic"
STEP 9: COMMIT temp.builder.openshift.io/mjf/devfile-sample-python-basic-1:fa8c53b5
--> 03fb579f748
03fb579f7480565657b621a6a8645a335c1c9a253a478b63c262b17a37c390fa

Pushing image image-registry.openshift-image-registry.svc:5000/mjf/devfile-sample-python-basic:latest ...
Getting image source signatures
Copying blob sha256:ac4bddc73958ff36b2c0655c1a22b9f272f2e1ba1fe13a3e1087d7bdb3cfe470
Copying blob sha256:388aab6f395415d7b5f9dcb43e1358fc58c8c6d611abe54624a573b652ae9411
Copying blob sha256:9501c65d3a7f8312515595d4925124500458e4e8bcc20ef26759b83daa16f0a2
Copying blob sha256:7e166269edc8a525496ddb8b8da9d24e14e86023909bdd8a8071286248000429
Copying blob sha256:e2e0d8af363b54f45ee1a7786a1b5d908bb79862d649e4d123e6bd2ed74a8388
Copying blob sha256:f7ec5a41d630a33a2d1db59b95d89d93de7ae5a619a3a8571b78457e48266eba
Copying blob sha256:4d93c240e9ae36504e6702266c07b495183f2a9a67e7b963017a568e7571e1f6
Copying config sha256:03fb579f7480565657b621a6a8645a335c1c9a253a478b63c262b17a37c390fa
Writing manifest to image destination
Storing signatures
Successfully pushed image-registry.openshift-image-registry.svc:5000/mjf/devfile-sample-python-basic@sha256:894c79c9aa4d145faceafc217f0046c373b36826189d4630929f44f92e00ec53
Push successful

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant