-
Notifications
You must be signed in to change notification settings - Fork 25
[molecule 3.2.0a1] vagrant.py: MODULE FAILURE See stdout/stderr for the exact error
#84
Comments
MODULE FAILURE See stdout/stderr for the exact error
MODULE FAILURE See stdout/stderr for the exact error
sounds weird. The module is returning 0, vagrant is showing the VM as up and still, things are failing. I can reproduce it here but I won't have time to look at it over the week end. |
I've yet to understand why but the output of the module get limited to 80 columns (I guess) and this leads to fields like the IdentityFile having a '\n' inside them:
and when ansible tries to interpret that as JSON it fails. That's why we're getting a failure. |
Ok. Found it. The vagrant module is using utility functions from molecule and when the split was done, instead of copying them, we're still importing them. With newer molecule, the imported modules are now configuring the module output to use enrich:
And enrich is doing soft wrap by default. So, the module output gets wrapped to 80 columns when ansible is running it, breaking the module output.
@ssbarnea What's the best option ? Copying the needed functions from molecule.util into vagrant.py module or changing console.py as I'm proposing here ? |
+1 for changing console.py as I'm proposing here, since this should be the original expected behavior? If the |
The output soft wrapping with python enrich is enabled for all terminals. This means that lines are wrapped to 80 when molecule is run from tox or when a module ends importing this console module. In the later case, this will wrap its output to 80 columns and possibly break it, since the output won't be valid JSON as found in ansible-community/molecule-vagrant#84. As a possible solution, enable the soft wrapping on the same condition as for the force_terminal terminal. Signed-off-by: Arnaud Patard <apatard@hupstream.com>
I'm not sure what are the exact consequences of this change. I've done a PR to molecule. I hope it'll allow to get more input from knowledgeable people on the issue |
@apatard as per ansible/molecule#2993, upgrade
|
I confirm that enrich 1.2.3 fixes the issue
|
Overview
When running with molecule 3.2.0a1 + molecule-vagrant 0.5, when running
TASK [Create molecule instance(s)]
it coming with following error and stopped, even tough vagrant instance IS successfully created + up + vagrant ssh successfully:@ssbarnea any idea if it is related to ansible/molecule#2929?
How to Reproduce the Error
Expected Result
When running with molecule 3.2.0a0 + molecule-vagrant 0.5, everything looks normal:
The text was updated successfully, but these errors were encountered: