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

Odo dev on Mac not deploying podman pod for single container Django application #7236

Closed
ucfchandra opened this issue Apr 9, 2024 · 2 comments
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@ucfchandra
Copy link

/kind bug

What versions of software are you using?

Operating System:

Mac (not M1)

Output of odo version:

===============================================
⚠  unable to fetch the cluster server version
===============================================
odo v3.15.0 (10b5e8a8f-Homebrew)

Podman Client: 4.9.3

How did you run odo exactly?

ODO_PUSH_IMAGES=false odo dev --platform=podman

Actual behavior

✗  Deploying pod [4s]
Error occurred on Push - exit status 125: 
Complete Podman output:
Error: playing YAML file: initializing source [image]: pinging container registry localhost: Get "https://localhost/v2/": dial tcp [::1]:443: connect: connection refused

Expected behavior

Running Django container

Any logs, error output, etc?

Podman machine is initialized, started, and running, so that is not the issue. Might be an issue with my devfile. Attached below.

schemaVersion: 2.2.0

components:
  - name: announcements-image
    image:
      dockerfile:
        uri: ./Containerfile
        buildContext: .
      imageName: announcements-image
 
  - name: announcements
    container:
      image: announcements-image
      endpoints:
      - name: http-8000
        targetPort: 8000
      

Thank you :)

@openshift-ci openshift-ci bot added the kind/bug Categorizes issue or PR as related to a bug. label Apr 9, 2024
@github-actions github-actions bot added the needs-triage Indicates an issue or PR lacks a `triage/*` and requires one. label Apr 9, 2024
@rm3l
Copy link
Member

rm3l commented Apr 11, 2024

Hi @ucfchandra ,

Error occurred on Push - exit status 125: 
Complete Podman output:
Error: playing YAML file: initializing source [image]: pinging container registry localhost: Get "https://localhost/v2/": dial > tcp [::1]:443: connect: connection refused

I think this might be because of the image pull policy which is set to Always by default on all container components. In this case, it causes Podman to try to pull the image, and Podman will use localhost as the default search registry for relative image names.
Can you try changing the image pull policy of your announcements container component to IfNotPresent or Never. See https://odo.dev/docs/troubleshooting#recommended-solution-5 or https://odo.dev/docs/troubleshooting#the-image-pull-policy-of-the-dev-container-is-always-and-i-cannot-change-it

Please Let me know if that fixes the issue. Thanks.

@ucfchandra
Copy link
Author

That fixes the issue, thank you!

@github-project-automation github-project-automation bot moved this to Done ✅ in odo Project Apr 11, 2024
@rm3l rm3l removed the needs-triage Indicates an issue or PR lacks a `triage/*` and requires one. label Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
Archived in project
Development

No branches or pull requests

2 participants