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

Issues pulling images with similar tags (cannot pull one with a shorter left substring than a pre-existing image) #736

Closed
bar0n36 opened this issue Apr 24, 2024 · 2 comments
Labels
needs_info More information about case is required

Comments

@bar0n36
Copy link

bar0n36 commented Apr 24, 2024

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

/kind bug

Description

When attempting to pull an image with a tag that is a left substring of a pre-existing image using containers.podman.podman_image, the image pull operation fails and returns Error: error inspecting object: no such object.

Steps to reproduce the issue:

Run the below playbook:
`- hosts: target
become: true
gather_facts: true

tasks:
- name: Pull RabbitMQ Image - Management
containers.podman.podman_image:
name: rabbitmq
tag: 3.12-management
become: true
become_user: "usera"

- name: Pull RabbitMQ Image - Standard
  containers.podman.podman_image:
    name: rabbitmq
    tag: 3.12
  become: true
  become_user: "usera"`

Describe the results you received:
PLAY [target] *****************************************************************************************************************************************************************************************************************************

TASK [Gathering Facts] *****************************************************************************************************************************************************************************************************************************
ok: [target]

TASK [Pull RabbitMQ Image - Management] ************************************************************************************************************************************************************************************************************
ok: [target]

TASK [Pull RabbitMQ Image - Standard] **************************************************************************************************************************************************************************************************************
fatal: [target]: FAILED! => {"changed": false, "msg": "Failed to run ['/bin/podman', 'inspect', 'rabbitmq:3.12', '--format', 'json'] ['inspect', 'rabbitmq:3.12', '--format', 'json']: Error: error inspecting object: no such object: "rabbitmq:3.12"\n"}

Describe the results you expected:
I would expect both images to be pulled successfully.
If I remove the first image and then just run the second task, it works as expected. It appears to be an issue with it failing to differentiate between the tags '3.12-management' and '3.12' on whether to pull or not.

Additional information you deem important (e.g. issue happens only occasionally):
I have been able to replicate this consistently with a couple of different images using the collection v1.12.0 and v1.13.0

Version of the containers.podman collection:

 v1.13.0 - installed from Ansible Galaxy

Output of ansible --version:

ansible [core 2.15.9]
python v 3.9.5

Output of podman version:

3.3.1 - I have confirmed that I can perform this task successfully using podman commands natively, so not a podman issue.
@sshnaidm
Copy link
Member

Please supply all required information in the bug - podman version on the host.

@sshnaidm sshnaidm added the needs_info More information about case is required label Apr 24, 2024
@sshnaidm
Copy link
Member

If the issue still happens, please provide all required information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs_info More information about case is required
Projects
None yet
Development

No branches or pull requests

2 participants