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

UI job logs has excess new line on each tasks #6357

Closed
ryan012880 opened this issue Mar 20, 2020 · 16 comments
Closed

UI job logs has excess new line on each tasks #6357

ryan012880 opened this issue Mar 20, 2020 · 16 comments

Comments

@ryan012880
Copy link

ISSUE TYPE
  • Bug Report
SUMMARY

In the UI each line in the task job log has an additional newline.

ENVIRONMENT
  • AWX version: 9.3.0
  • AWX install method: docker on linux
  • Ansible version: 2.9.5
  • Operating System: RHEL7
  • Web Browser: Chrome
STEPS TO REPRODUCE

Launch a JT for multiple targets

EXPECTED RESULTS

Screen Shot 2020-03-20 at 9 00 59 AM

ACTUAL RESULTS

Screen Shot 2020-03-20 at 9 01 37 AM

ADDITIONAL INFORMATION

Downloading the logs shows

Screen Shot 2020-03-20 at 9 04 57 AM

@ryanpetrello
Copy link
Contributor

@ryan012880,

Are you running 9.3.0, or devel (with the new redis changes)?

@ryanpetrello
Copy link
Contributor

I think this might be a change/regression in Ansible itself. Here's a video that shows a difference in behavior between Ansible 2.9.0 and 2.9.6:

http://ryanpetrello.com/ansible-callback-bug.mp4

@ryanpetrello
Copy link
Contributor

Here's what we're getting in Ansible 2.9.6 for a job that exhibits this behavior:

bash-4.4$ cd /tmp/awx_31_ojeomhuq/artifacts/31/
bash-4.4$ pwd
^M
PLAY [Hello World Sample] ******************************************************
^M
TASK [Gathering Facts] *********************************************************
^[[0;32mok: [localhost]^[[0m^M
^[[0;32m^[[
^M
TASK [Hello Message] ***********************************************************
^[[0;32mok: [localhost] => {^[[0m^M
^[[0;32m    "msg": "Hello World!"^[[0m^M
^[[0;32m}^[[0m^M
^[[0;32m^[[
^M
PLAY RECAP *********************************************************************^M
^[[0;32mlocalhost^[[0m                  : ^[[0;32mok=2   ^[[0m changed=0    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   ^M

@ryanpetrello
Copy link
Contributor

Here's what we're getting in Ansible 2.9.0 for a job that does not exhibit this behavior:

bash-4.4$ cd /tmp/awx_29_gzj9pk0v/artifacts/29/
bash-4.4$ pwd
^M
PLAY [Hello World Sample] ******************************************************
^M
TASK [Gathering Facts] *********************************************************
^[[0;32mok: [localhost]^[[0m
^M
TASK [Hello Message] ***********************************************************
^[[0;32mok: [localhost] => {^[[0m^M
^[[0;32m    "msg": "Hello World!"^[[0m^M
^[[0;32m}^[[0m
^M
PLAY RECAP *********************************************************************^M
^[[0;32mlocalhost^[[0m                  : ^[[0;32mok=2   ^[[0m changed=0    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   ^M

@ryanpetrello
Copy link
Contributor

I think this change is responsible for the regression:

ansible/ansible#65199

If I install 2.9.6, I see the behavior. If I edit my ansible 2.9.6 source code and undo that change, the problem goes away.

cc @samdoran

@ryanpetrello
Copy link
Contributor

@ryan012880 I've opened a PR to roll back this change to ansible, in case you want to give it a whirl:

ansible/ansible#68375

@ryan012880
Copy link
Author

@ryan012880,

Are you running 9.3.0, or devel (with the new redis changes)?

running devel

@ryan012880
Copy link
Author

@ryan012880 I've opened a PR to roll back this change to ansible, in case you want to give it a whirl:

ansible/ansible#68375

@ryanpetrello noted, thank you

@ryanpetrello
Copy link
Contributor

New approach to address this in Ansible, courtesy of @ghjm:

ansible/ansible#68375

@ryanpetrello
Copy link
Contributor

ryanpetrello commented Mar 28, 2020

This will be resolved in the next version of Ansible (and I believe it's being backported to the next 2.9.x). Until then, it looks like older versions of 2.9.x don't have this issue:

ansible/ansible#68517

@ghjm
Copy link
Contributor

ghjm commented Mar 28, 2020

ansible/ansible#68517 is merged into Ansible devel. The 2.9 backport,
ansible/ansible#68520, will be reviewed at the next backport review, and is expected to land before the next Ansible 2.9.x release.

@squidboylan squidboylan self-assigned this Apr 1, 2020
@squidboylan
Copy link
Contributor

squidboylan commented Apr 1, 2020

I confirmed that devel and ansible/ansible#68520 both work using a custom_virtualenv for a job template

@dsesami
Copy link
Contributor

dsesami commented Apr 8, 2020

@squidboylan mentioned that this is waiting on ansible/ansible#68520 to merge. @ryanpetrello

@ryanpetrello
Copy link
Contributor

@one-t @squidboylan @dsesami the relevant Ansible change was merged into the 2.9 branch and this is ready for verification.

@squidboylan
Copy link
Contributor

I just tested this with 3 hosts in an inventory using latest 2.9 and it worked as expected

@ryan012880
Copy link
Author

I can confirm also all is good thank you.

AlanCoding pushed a commit to AlanCoding/awx that referenced this issue Jul 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants