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

docker_compose_v2: : Cannot parse event from line #787

Closed
thvd opened this issue Feb 2, 2024 · 9 comments · Fixed by #811
Closed

docker_compose_v2: : Cannot parse event from line #787

thvd opened this issue Feb 2, 2024 · 9 comments · Fixed by #811
Labels
bug Something isn't working docker-compose-v2 Docker Compose v2

Comments

@thvd
Copy link

thvd commented Feb 2, 2024

SUMMARY

When using docker_compose_v2 i get the warning: Cannot parse event from line.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

Command: docker_compose_v2

ANSIBLE VERSION
ansible [core 2.14.9]
  config file = /home/theodoor/workspace/docker-at-home/ansible.cfg
  configured module search path = ['/home/theodoor/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3/dist-packages/ansible
  ansible collection location = /home/theodoor/.ansible/collections:/usr/share/ansible/collections
  executable location = /home/theodoor/.local/bin/ansible
  python version = 3.11.6 (main, Oct  8 2023, 05:06:43) [GCC 13.2.0] (/usr/bin/python3)
  jinja version = 3.1.2
  libyaml = True

COLLECTION VERSION
# /home/theodoor/.ansible/collections/ansible_collections
Collection        Version
----------------- -------
community.general 8.3.0  

# /usr/lib/python3/dist-packages/ansible_collections
Collection        Version
----------------- -------
community.general 6.6.2 
CONFIGURATION
CALLBACKS_ENABLED(/home/theodoor/workspace/docker-at-home/ansible.cfg) = ['ansible.posix.profile_tasks']
CONFIG_FILE() = /home/theodoor/workspace/docker-at-home/ansible.cfg

OS / ENVIRONMENT
STEPS TO REPRODUCE

Have an external network in your docker compose yaml config, that's not created within the same yaml project file, you will get the warning described below. (#ACTUAL RESULTS)

My docker compose yaml file contains this part:

networks:
  influxNetwork:
    name: influxNetwork
    driver: bridge
EXPECTED RESULTS

No warnings/errors

ACTUAL RESULTS
TASK [influx : Start Influxdb] *************************************************************************************************************************************************************************************************************************
vrijdag 02 februari 2024  08:14:10 +0100 (0:00:00.995)       0:00:13.492 ****** 
[WARNING]: Cannot parse event from line: 'time="2024-02-02T08:14:10+01:00" level=warning msg="a network with name influxNetwork exists but was not created for project \\"influxdb\\".\\nSet `external: true` to use an existing network"'. Please
report this at https://github.com/ansible-collections/community.docker/issues/new?assignees=&labels=&projects=&template=bug_report.md
changed: [192.168.1.2]

@thvd
Copy link
Author

thvd commented Feb 2, 2024

My docker compose version is:

Docker Compose version v2.20.3

@felixfontein felixfontein added bug Something isn't working docker-compose-v2 Docker Compose v2 labels Feb 2, 2024
@felixfontein
Copy link
Collaborator

Hmm, I think to properly handle this I need more information from the stderr (or stderr_lines) output. Can you provide more of it than the single line time="2024-02-02T08:14:10+01:00" level=warning msg="a network with name influxNetwork exists but was not created for project \"influxdb\".\nSet external: true to use an existing network"?

@felixfontein
Copy link
Collaborator

(Sorry, I already wrote that on Friday, but due to the shitty internet connection I had it probably didn't make it, and I only noticed now...)

@felixfontein
Copy link
Collaborator

@thvd ping

@felixfontein
Copy link
Collaborator

@thvd ping, without further information I cannot fix this. Thanks.

@mabeett
Copy link

mabeett commented Feb 25, 2024

Hello @felixfontein ,
I've just reported #807 as thoroughly as I could as n independient ticket because I am not plenty sure if this issue is the same problem of the situation described there.
Le me know if you need more information or the information written here.
Regards,

@jdomarin
Copy link

Hello @felixfontein ,

As you can see from attached images below, I am also facing the same warning, with a slightly different message.
Below you will find the task and the handler triggered by the task that produces the warning.
Please note it is just a warning, which does not interrupt Ansible playbook execution.
It looks like the community.docker.docker_compose_v2_pull module tries to parse docker pull output and fails to do so.

Additional details:

Task and handler from the mentioned Ansible playbook runs in a Gitlab runner, triggered by a CI job.

  • community.docker version: "3.7.0"
  • docker_compose_v2_version: 2.24.5-1~ubuntu.22.04~jammy
  • docker_ce_version: "5:25.0.3"
  • ansible version: 2.15

copy_docker_compose_file_task
pull_docker_images_handler
cannot_parse_event_from_line

Hoping the above will help you in your investigations.
Regards.

@felixfontein
Copy link
Collaborator

@jdomarin thanks! That specific message was fixed in 7b55408, the fix is included in community.docker 3.8.0.

@felixfontein
Copy link
Collaborator

The remaining cases from this issue are fixed by #811.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working docker-compose-v2 Docker Compose v2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants