Separate outputs of kolla_toolbox inner module
Inner modules called by the kolla_toolbox module were returning stdout and stderr as a single output object. This could break JSON parsing if any data was present in stderr, for example warnings such as: [WARNING]: Collection ansible.posix does not support Ansible version 2.14.17 Fix by using demux=True to separate the two streams. The stderr content is logged as it could be useful for troubleshooting or catching deprecation notices. Change-Id: Iad0476d4511f28c837794352c9a3e2f47113d9a1 Closes-Bug: #2080544
This commit is contained in:
parent
753a7e1a12
commit
5407662038
@ -162,7 +162,9 @@ def use_docker(module):
|
||||
"ANSIBLE_LOAD_CALLBACK_PLUGINS": "True"}
|
||||
job = client.exec_create(kolla_toolbox, command_line,
|
||||
environment=environment, **kwargs)
|
||||
json_output = client.exec_start(job)
|
||||
json_output, error = client.exec_start(job, demux=True)
|
||||
if error:
|
||||
module.log(msg='Inner module stderr: %s' % error)
|
||||
|
||||
try:
|
||||
output = json.loads(json_output)
|
||||
|
@ -0,0 +1,6 @@
|
||||
---
|
||||
fixes:
|
||||
- |
|
||||
Fixes parsing of JSON output of inner modules called by ``kolla-toolbox``
|
||||
when data was returned on standard error.
|
||||
`LP#2080544 <https://launchpad.net/bugs/2080544>`__
|
Loading…
Reference in New Issue
Block a user