Bug 1943743 - "ansible-test --docker" fails on second run and afterwards with podman-docker
Summary: "ansible-test --docker" fails on second run and afterwards with podman-docker
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: ansible
Version: 32
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Kevin Fenzi
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-03-27 01:29 UTC by Tim Landscheidt
Modified: 2021-05-04 11:27 UTC (History)
4 users (show)

Fixed In Version: ansible-2.9.20-1.fc32
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-05-03 02:12:17 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Tim Landscheidt 2021-03-27 01:29:46 UTC
With ansible-2.9.18-1.fc32.noarch and podman-docker-2.2.1-1.fc32.noarch, when running "ansible-test integration --docker default -v git_config", on the first run the Docker image is downloaded and the test suite is run.

On subsequent runs, i. e. when the container image is already present, ansible-test fails with:

| [tim@passepartout ~/var/tmp/ansible_collections/community/general]$ ansible-test integration --docker default -v git_config
| Falling back to tests in "tests/integration/targets/" because "roles/test/" was not found.
| Run command: docker images quay.io/ansible/default-test-container:1.10.1 --format '{{json .}}'
| Traceback (most recent call last):
|   File "/usr/bin/ansible-test", line 28, in <module>
|     main()
|   File "/usr/bin/ansible-test", line 24, in main
|     cli_main()
|   File "/usr/lib/python3.8/site-packages/ansible_test/_internal/cli.py", line 135, in main
|     delegate(config, *delegate_args)
|   File "/usr/lib/python3.8/site-packages/ansible_test/_internal/delegation.py", line 132, in delegate
|     return delegate_command(args, exclude, require, integration_targets)
|   File "/usr/lib/python3.8/site-packages/ansible_test/_internal/delegation.py", line 156, in delegate_command
|     delegate_docker(args, exclude, require, integration_targets)
|   File "/usr/lib/python3.8/site-packages/ansible_test/_internal/delegation.py", line 309, in delegate_docker
|     docker_pull(args, test_image)
|   File "/usr/lib/python3.8/site-packages/ansible_test/_internal/docker_util.py", line 180, in docker_pull
|     if ('@' in image or ':' in image) and docker_images(args, image):
|   File "/usr/lib/python3.8/site-packages/ansible_test/_internal/docker_util.py", line 270, in docker_images
|     results = [json.loads(line) for line in stdout.splitlines()]
|   File "/usr/lib/python3.8/site-packages/ansible_test/_internal/docker_util.py", line 270, in <listcomp>
|     results = [json.loads(line) for line in stdout.splitlines()]
|   File "/usr/lib64/python3.8/json/__init__.py", line 357, in loads
|     return _default_decoder.decode(s)
|   File "/usr/lib64/python3.8/json/decoder.py", line 337, in decode
|     obj, end = self.raw_decode(s, idx=_w(s, 0).end())
|   File "/usr/lib64/python3.8/json/decoder.py", line 355, in raw_decode
|     raise JSONDecodeError("Expecting value", s, err.value) from None
| json.decoder.JSONDecodeError: Expecting value: line 1 column 2 (char 1)
| [tim@passepartout ~/var/tmp/ansible_collections/community/general]$

This is due to podman-docker's "docker images quay.io/ansible/default-test-container:1.10.1 --format '{{json .}}'" outputting pretty-printed, multiline JSON.

Backporting 03320466995a91f8a4d311e66cdf3eaee3f44934 to /usr/lib/python3.8/site-packages/ansible_test/_internal/docker_util.py fixes the issue.

Comment 1 Fedora Program Management 2021-04-29 16:46:41 UTC
This message is a reminder that Fedora 32 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 32 on 2021-05-25.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '32'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 32 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 2 Kevin Fenzi 2021-05-02 18:06:55 UTC
This should be fixed in 2.9.20 (in updates-testing) can you confirm?

Comment 3 Fedora Update System 2021-05-02 18:07:35 UTC
FEDORA-2021-c1116fb75e has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2021-c1116fb75e

Comment 4 Fedora Update System 2021-05-03 02:12:17 UTC
FEDORA-2021-c1116fb75e has been pushed to the Fedora 32 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 5 Tim Landscheidt 2021-05-04 11:27:52 UTC
Yes, it works for me now.  Thanks!


Note You need to log in before you can comment on or make changes to this bug.