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

Cannot use community.docker.docker_compose => Error: Module unable to decode valid JSON on stdin #823

Open
JohanLorenzo opened this issue Mar 26, 2021 · 1 comment
Labels
affects-0.3 Issues related to 0.3.X Mitogen releases bug Code feature that hinders desired execution outcome

Comments

@JohanLorenzo
Copy link

Hello there!

Thank you for this tool! A colleague of mine introduced me to it a month ago, and I find it amazing! I found a bug that I don't think many people get. I was able to narrow it down to mitogen so I think it's nice to document what I saw in an issue 🙂

Basically, I'm not able to use mitogen alongside docker_compose. Here's the top-level error I got:

fatal: [localhost]: FAILED! => {
    "changed": false,
    "msg": "Error: Module unable to decode valid JSON on stdin.  Unable to figure out what parameters were passed"
}

docker-compose works nicely when falling back to the regular SSH strategy. I got a minimal set of steps to reproduce in this repository: https://github.com/JohanLorenzo/bug-ansible-mitogen-docker-compose. Feel free to clone it, read it, and try it! I stripped it to the minimum required config. Moreover dependencies are pinned in there, so I believe there's little chance that repo bitrots. I'm happy to provide more details if you wish!

  • Which version of Ansible are you running? 3.1.0

  • Is your version of Ansible patched in any way? No, it's the regular Python one

  • Are you running with any custom modules, or module_utils loaded? No.

  • Have you tried the latest master version from Git? No, I tried 0.3.0rc1

  • Do you have some idea of what the underlying problem may be? Yes, logs show the mitogen planner rejects the JsonArgsPlanner, which seems related to the the error I get.

  • Mention your host and target OS and versions => Debian testing on both

  • Mention your host and target Python versions => 3.9.2 on both

  • If reporting a performance issue, mention the number of targets and a rough
    description of your workload (lots of copies, lots of tiny file edits, etc.) => N/A

  • If reporting a crash or hang in Ansible, please rerun with -vvv and include
    200 lines of output around the point of the error, along with a full copy of
    any traceback or error text in the log. Beware "-vvv" may include secret
    data! Edit as necessary before posting. => See
    extract.log

  • If reporting any kind of problem with Ansible, please include the Ansible
    version along with output of "ansible-config dump --only-changed".

$ ansible-config dump --only-changed
DEFAULT_STRATEGY(/home/JohanLorenzo/bug-ansible-mitogen-docker-compose/ansible.cfg) = mitogen_linear
@JohanLorenzo JohanLorenzo added affects-0.3 Issues related to 0.3.X Mitogen releases bug Code feature that hinders desired execution outcome labels Mar 26, 2021
@anxstj
Copy link

anxstj commented Apr 15, 2021

This is probably related to #819

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-0.3 Issues related to 0.3.X Mitogen releases bug Code feature that hinders desired execution outcome
Projects
None yet
Development

No branches or pull requests

2 participants