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

Image inspection fails in actions workflow #1642

Open
cloin opened this issue Nov 29, 2023 · 2 comments
Open

Image inspection fails in actions workflow #1642

cloin opened this issue Nov 29, 2023 · 2 comments
Labels
bug Researched, reproducible, committed to fix

Comments

@cloin
Copy link

cloin commented Nov 29, 2023

ISSUE TYPE
  • Bug Report
SUMMARY

I am using github actions to build images and want to use ansible-navigator images to create a build artifact. When I try to do this, I get an error:

Image introspection failed, please check the logs and log an issue. 
Error: Process completed with exit code 1.
ANSIBLE-NAVIGATOR VERSION
ansible-navigator 3.5.0
CONFIGURATION

No valid settings file found, using all default values for settings.

I'm using a github actions workflow to successfully build the images and I'm using the following step to try to inspect the built images:

      - name: test ansible-navigator command
        run: |
          ansible-navigator --version
          podman images
          ansible-navigator images -m stdout
          ansible-navigator images localhost/${{ env.EE }}:${{ github.sha }} -d ansible_collections -m stdout --ll debug --ee false

podman images:

 REPOSITORY                                                          TAG                                       IMAGE ID      CREATED             SIZE
localhost/base-de                                                   pr-57-f8fd330                             6af975125f84  3 seconds ago       786 MB
localhost/base-de                                                   f8fd330d74ef744730f2f73ba904a6a552c18ff6  6af975125f84  3 seconds ago       786 MB

tail end of log file:

2023-11-29T18:04:52.272557+00:00 DEBUG 'ansible_navigator.runner.base.generate_run_command_args' Runner arg: cmdline_args:['/home/runner/.cache/ansible-navigator/image_introspect.py']
2023-11-29T18:04:52.273584+00:00 DEBUG 'ansible-runner._handle_command_wrap' containerization enabled
2023-11-29T18:04:52.273835+00:00 DEBUG 'ansible-runner.wrap_args_for_containerization' container engine invocation: podman run --rm --tty --interactive --workdir /runner/project -v /etc/ssh/:/etc/ssh/ --group-add=root --ipc=host -v /tmp/ansible-navigator__4dxq8t4/artifacts/:/runner/artifacts/:Z -v /tmp/ansible-navigator__4dxq8t4/:/runner/:Z -v /home/runner/.cache/ansible-navigator/:/home/runner/.cache/ansible-navigator/ --env-file /tmp/ansible-navigator__4dxq8t4/artifacts/7c140b66-c952-4ae4-8e5c-e7e721cb6b44/env.list --quiet --name ansible_runner_7c140b66-c952-4ae4-8e5c-e7e721cb6b44 --user=root ghcr.io/ansible/creator-ee:v0.20.0 /usr/bin/python3 /home/runner/.cache/ansible-navigator/image_introspect.py
2023-11-29T18:04:52.273877+00:00 DEBUG 'ansible-runner._handle_command_wrap' command: podman run --rm --tty --interactive --workdir /runner/project -v /etc/ssh/:/etc/ssh/ --group-add=root --ipc=host -v /tmp/ansible-navigator__4dxq8t4/artifacts/:/runner/artifacts/:Z -v /tmp/ansible-navigator__4dxq8t4/:/runner/:Z -v /home/runner/.cache/ansible-navigator/:/home/runner/.cache/ansible-navigator/ --env-file /tmp/ansible-navigator__4dxq8t4/artifacts/7c140b66-c952-4ae4-8e5c-e7e721cb6b44/env.list --quiet --name ansible_runner_7c140b66-c952-4ae4-8e5c-e7e721cb6b44 --user=root ghcr.io/ansible/creator-ee:v0.20.0 /usr/bin/python3 /home/runner/.cache/ansible-navigator/image_introspect.py
2023-11-29T18:05:10.450010+00:00 ERROR 'ansible_navigator.actions.images._parse' Unable to extract introspection from stdout
2023-11-29T18:05:10.450189+00:00 DEBUG 'ansible_navigator.actions.images._parse' error json loading output: 'not enough values to unpack (expected 2, got 1)'
2023-11-29T18:05:10.450249+00:00 DEBUG 'ansible_navigator.actions.images._parse' 
2023-11-29T18:05:10.450286+00:00 ERROR 'ansible_navigator.actions.images._parse' Image introspection failed (parsed), the return value was: 
2023-11-29T18:05:10.459746+00:00 DEBUG 'ansible_navigator.runner.base.__del__' delete temporary ansible-runner private_data_dir at path /tmp/ansible-navigator__4dxq8t4
LOG FILE

ansible-navigator.log: https://gist.github.com/cloin/25d534f57f6261a8656c6663ba500b17
github action step output: https://gist.github.com/cloin/1e21b21aee3f903816ebcb912915766d

STEPS TO REPRODUCE

Build definitions for this EE, base-de, available here: https://github.com/cloin/ee-builds/tree/main/base-de

Also occurs with other EE buids. I haven't gotten any to work yet.

@cloin cloin added bug Researched, reproducible, committed to fix new New issues and PRs to triaged labels Nov 29, 2023
@cloin
Copy link
Author

cloin commented Nov 29, 2023

As an alternative, I'm just using podman commands:

podman run -it ${{ env.EE }}:${{ env.IMAGE_TAG }} ansible --version  >> $COMMANDS_FILE
podman run -it ${{ env.EE }}:${{ env.IMAGE_TAG }} ansible-galaxy collection list  >> $COMMANDS_FILE

@Qalthos Qalthos removed the new New issues and PRs to triaged label Dec 6, 2023
@Qalthos
Copy link

Qalthos commented Dec 6, 2023

Have you tried building the image directly with ansible-builder instead? This seems like it is likely to be an issue in builder and not navigator's wrapping of it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Researched, reproducible, committed to fix
Projects
Status: No status
Development

No branches or pull requests

2 participants