Skip to content

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

@JohanLorenzo

Description

@JohanLorenzo

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    affects-0.3Issues related to 0.3.X Mitogen releases

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions