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

generate kube should use tag #7838

Closed
langdon opened this issue Sep 29, 2020 · 7 comments · Fixed by #8641
Closed

generate kube should use tag #7838

langdon opened this issue Sep 29, 2020 · 7 comments · Fixed by #8641
Assignees
Labels
Good First Issue This issue would be a good issue for a first time contributor to undertake. kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@langdon
Copy link

langdon commented Sep 29, 2020

Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)

/kind bug

Description

When you use podman generate kube you expect to be able to run the result immediately. However, possibly depending on how you created the pod, you generate a yaml file that uses :latest for the tag. If you turn around and try to play kube that file, it fails trying to pull container images that the user has because it can't pull something with a :latest tag. generate kube should create yaml that is immediately runnable. To top it off, there is no indication of the issue being the tag unless you search and find #5186

Steps to reproduce the issue:

  1. manually create containers in a pod called my-pod
  2. podman generate kube my-pod > my-pod.yaml
  3. podman pod rm -f my-pod
  4. podman play kube my-pod.yaml

Describe the results you received:

Trying to pull registry.access.redhat.com/simpler-tools:latest...
  name unknown: Repo not found
</snip>

Describe the results you expected:

Pod: <UUID>
Containers: 
<UUID>
<UUID>

Additional information you deem important (e.g. issue happens only occasionally):

To make matters a bit more annoying, it does, in fact, create the pod with no UUID in the output or any indication it did so. Which, in order to do further testing/debugging, you have to manually remove.

Output of podman version:

F32: 2.0.6
RHEL8: 1.9.3

Package info (e.g. output of rpm -q podman or apt list podman):

podman-2.0.6-1.fc32.x86_64
podman-1.9.3-2.module+el8.2.1+6867+366c07d6.x86_64

Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide?

Yes

Additional environment details (AWS, VirtualBox, physical, etc.):

@openshift-ci-robot openshift-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Sep 29, 2020
@rhatdan rhatdan added the Good First Issue This issue would be a good issue for a first time contributor to undertake. label Oct 1, 2020
@rhatdan
Copy link
Member

rhatdan commented Oct 1, 2020

@ashley-cui PTAL

@umohnani8
Copy link
Member

Tried this with podman master and it works fine for me. I created a pod with a fedora container running in it and was able to podman play kube <yaml-file>

podman play kube mypod.yaml
Trying to pull registry.fedoraproject.org/fedora:latest...
Getting image source signatures
Copying blob 22cef3226003 [--------------------------------------] 0.0b / 0.0b
Copying config e6b57c0d9f done  
Writing manifest to image destination
Storing signatures
Pod:
9e6ceeada01e996cd2cd28ec782e1ba3b6f31f0c4c71ea3e1138b182fd9cff2b
Container:
c41014d9cacf072abc42f63657bffb9d69ea34c7cc5a2fd204887f60b2a054f0

podman pod ps
POD ID        NAME    STATUS   CREATED        INFRA ID      # OF CONTAINERS
9e6ceeada01e  mypod   Running  5 minutes ago  696d1aca49a5  2
podman ps
CONTAINER ID  IMAGE                                     COMMAND     CREATED        STATUS            PORTS   NAMES
c41014d9cacf  registry.fedoraproject.org/fedora:latest  sleep 1000  5 minutes ago  Up 5 minutes ago          mypod-myctr
696d1aca49a5  k8s.gcr.io/pause:3.2

Snippet of the pod yaml file generated shows the image has the :latest tag.

spec:
  containers:
  - command:
    - sleep
    - "1000"
    env:
    - name: PATH
      value: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
    - name: TERM
      value: xterm
    - name: container
      value: oci
    - name: DISTTAG
      value: f32container
    - name: FGC
      value: f32
    - name: HOSTNAME
      value: mypod
    image: registry.fedoraproject.org/fedora:latest
    name: myctr

@langdon is there a specific image you were using that for some reason was not being pulled? I will try out the podman version you stated in your description as well.

@langdon
Copy link
Author

langdon commented Oct 27, 2020

so, I think i discovered that this only happens if it is a container you built yourself.

@github-actions
Copy link

A friendly reminder that this issue had no activity for 30 days.

@rhatdan
Copy link
Member

rhatdan commented Nov 27, 2020

@langdon Can we close this issue, or do you believe it is something we need to fix?

@langdon
Copy link
Author

langdon commented Nov 27, 2020

It's a UX thing, and kinda minor, but I still think it's a barrier to adoption

@rhatdan
Copy link
Member

rhatdan commented Dec 1, 2020

@umohnani8 PTAL

@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 22, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Good First Issue This issue would be a good issue for a first time contributor to undertake. kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants