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

podman_image *requires* namespace path in ee_registry_dest var #165

Open
pcunning-rh opened this issue Jul 31, 2024 · 0 comments
Open

podman_image *requires* namespace path in ee_registry_dest var #165

pcunning-rh opened this issue Jul 31, 2024 · 0 comments
Labels
bug Something isn't working new

Comments

@pcunning-rh
Copy link

pcunning-rh commented Jul 31, 2024

Summary

Changes in containers.podman:1.14.0 require images be pushed to a namespace. Using this collection, images cannot reside in the root of a PAH or Registry.

https://github.com/containers/ansible-podman-collections/blob/1.14.0/plugins/modules/podman_image.py#L801

The requirements.yml for this collection should either be version pinned to <1.14.0, or examples updated to indicate registry namespaces are required. However this is a breaking change for users and organizations not currently using registry namespaces for EEs.

Issue Type

  • Bug Report

Ansible, Collection, Docker/Podman details

ansible [core 2.15.12]
  config file = /runner/project/ansible.cfg
  configured module search path = ['/home/runner/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.9/site-packages/ansible
  ansible collection location = /runner/requirements_collections:/home/runner/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible
  python version = 3.9.19 (main, May 16 2024, 08:45:40) [GCC 8.5.0 20210514 (Red Hat 8.5.0-22)] (/usr/bin/python3.9)
  jinja version = 3.1.4
  libyaml = True

# /runner/requirements_collections/ansible_collections
Collection                      Version
------------------------------- -------
ansible.controller              4.5.8  
containers.podman               1.15.4 
infra.ee_utilities              3.2.0  

podman version 4.9.4-rhel
  • ansible installation method: EE

OS / ENVIRONMENT

RHEL 8.10, AAP 2.4.7

Desired Behavior

EE Build Role should function as normal using this role with an image destination such as: pah.local/custom_ee:latest

Actual Behavior

Without specifying any additional registry destination paths/variables, error Destination must be a full URL or path to a directory.

TASK [infra.ee_utilities.ee_builder : Create ansible.cfg file if requested.] ***
changed: [node-1.{{ internal_cluster_fqdn }}.redhat.com]
TASK [infra.ee_utilities.ee_builder : Create EE definition file] ***************
changed: [node-1.{{ internal_cluster_fqdn }}.redhat.com]
TASK [infra.ee_utilities.ee_builder : Run the Ansible Builder Program] *********
changed: [node-1.{{ internal_cluster_fqdn }}.redhat.com]
TASK [infra.ee_utilities.ee_builder : Push image to registry] ******************
fatal: [node-1.{{ internal_cluster_fqdn }}.redhat.com]: FAILED! => {"changed": false, "msg": "Destination must be a full URL or path to a directory."}

STEPS TO REPRODUCE

Using default example from this repository.

  vars:
    # For controller configuration definition
    ee_builder_dir_clean: false
    builder_dir: .
    ee_update_base_images: false
    ee_reg_credential: Automation Hub Container Registry
    ee_base_image: node-2.{{ internal_cluster_fqdn }}.redhat.com/ee-minimal-rhel8
    ee_pull_collections_from_hub: true
    ah_host: node-2.{{ internal_cluster_fqdn }}.redhat.com
    ah_token: {{ token }}
    ee_registry_dest: node-2.{{ internal_cluster_fqdn }}.redhat.com
    ee_registry_username: {{ admin }}
    ee_registry_password: {{ pass }}
    ee_verbosity: 3
    ee_list:
      - name: custom_ee
        alt_name: Custom EE
        tag: 1-11-21-2
        dependencies:
          system:
            - python38-requests
            - python38-pyyaml
          python:
            - pytz # for schedule_rrule lookup plugin
            - python-dateutil>=2.7.0 # schedule_rrule
            - awxkit # For import and export modules
          galaxy:
            collections:
              - name: awx.awx
                version: 22.4.0
              - infra.controller_configuration
              - ansible.controller
              - infra.ah_configuration
        build_steps:
          prepend_final:
            - RUN whoami
            - RUN cat /etc/os-release
          append_final:
            - RUN echo This is a post-install command!
        images:
          base_image:
            name: node-2.{{ internal_cluster_fqdn }}.redhat.com/ee-minimal-rhel8:latest

To use the above vars with containers.podman > 1.13.0 you must change ee_registry_dest from:

ee_registry_dest: node-2.{{ internal_cluster_fqdn }}.redhat.com

to:

ee_registry_dest: node-2.{{ internal_cluster_fqdn }}.redhat.com/ees

... or any other repository/namespace other than ees

@pcunning-rh pcunning-rh added bug Something isn't working new labels Jul 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working new
Projects
None yet
Development

No branches or pull requests

1 participant