1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/bin
Ganesh Nalawade 90cd87f950
Fix debug logs failing with persistent connection (#33049)
* Fix debug logs failing with persistent connection

Fixes #33047

*  As debug logs are written on stdout, it interrupts
   the communication between ansible-connection(background)
   process and main process. To avoid this add a string similar
   to exactly identify the response string.

*  Remove unwanted code in ansible-connection

*  Fix review comments

* Fix spurious log emitted on ansible-connection stdout issue

*  ansible-connection which runs as a background process sends a
   json string (contains response received from remote device)
   to foreground ansible-playbook process over stdout.

*  If in case debug flag is enabled the connection_loader api
   invoked from ansible-connection `ssh = connection_loader.get('ssh', class_only=True)`
   results in emitting debug logs on stdout. This  spurious log
   interfere with the actual response and results in failure while
   reading json string in ansible-playbook process

* To avoid this save stdout of ansible-connection and redirect it string
  buffer to accumulate all the logs emitted by core API's

* Add these logs in `result['messages']` which is send a json string after reinstating saved stdout

*  Remove unwanted code in ansible-connection

* Fix review comment
2018-01-25 02:48:45 +05:30
..
ansible Error early if executing python version doesn't meet documented minimums (#34655) 2018-01-09 16:17:55 -06:00
ansible-config 1st part of ansible config, adds ansible-config to view/manage configs (#12797) 2017-06-14 11:08:34 -04:00
ansible-connection Fix debug logs failing with persistent connection (#33049) 2018-01-25 02:48:45 +05:30
ansible-console draft 1st release of ansible-console 2016-03-07 20:25:21 -05:00
ansible-doc Making the switch to v2 2015-05-03 21:47:26 -05:00
ansible-galaxy Making the switch to v2 2015-05-03 21:47:26 -05:00
ansible-inventory ansible-inventory cli tool (#22477) 2017-08-15 16:45:54 -04:00
ansible-playbook Making the switch to v2 2015-05-03 21:47:26 -05:00
ansible-pull Making the switch to v2 2015-05-03 21:47:26 -05:00
ansible-vault Making the switch to v2 2015-05-03 21:47:26 -05:00