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

Remove ansi escape sequences #1768

Closed
wants to merge 7 commits into from

Conversation

richardsonky
Copy link

@richardsonky richardsonky commented Apr 11, 2023

Depends-On: #1793

SUMMARY

Fixes #1756. Amazon Linux 2003 and others have issue where the ansi color text is showing up in the output causing ansible to not be able to process the stdout correctly. this adds a regex to remove those ansi escape sequences.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

aws_ssm

ADDITIONAL INFORMATION

@softwarefactory-project-zuul
Copy link
Contributor

Build failed.
https://ansible.softwarefactory-project.io/zuul/buildset/2d890e5150a44a428ed42af42a009d93

ansible-galaxy-importer FAILURE in 4m 04s
✔️ build-ansible-collection SUCCESS in 13m 48s
ansible-test-sanity-docker-devel FAILURE in 14m 35s (non-voting)
ansible-test-sanity-docker-milestone FAILURE in 11m 18s (non-voting)
ansible-test-sanity-docker-stable-2.12 FAILURE in 10m 33s
ansible-test-sanity-docker-stable-2.13 FAILURE in 10m 22s
ansible-test-sanity-docker-stable-2.14 FAILURE in 10m 28s
✔️ ansible-test-units-amazon-aws-python36 SUCCESS in 6m 44s
✔️ ansible-test-units-amazon-aws-python38 SUCCESS in 6m 00s
ansible-test-units-amazon-aws-python39 RETRY_LIMIT in 4m 40s
✔️ ansible-test-units-amazon-aws-python310 SUCCESS in 8m 10s
✔️ ansible-test-changelog SUCCESS in 4m 38s
✔️ ansible-test-splitter SUCCESS in 5m 13s
✔️ integration-community.aws-1 SUCCESS in 10m 55s
✔️ integration-community.aws-2 SUCCESS in 8m 36s
✔️ integration-community.aws-3 SUCCESS in 10m 39s
✔️ integration-community.aws-4 SUCCESS in 9m 39s
✔️ integration-community.aws-5 SUCCESS in 9m 21s
✔️ integration-community.aws-6 SUCCESS in 9m 40s
✔️ integration-community.aws-7 SUCCESS in 9m 14s
✔️ integration-community.aws-8 SUCCESS in 10m 15s
✔️ integration-community.aws-9 SUCCESS in 8m 57s
✔️ integration-community.aws-10 SUCCESS in 9m 11s
integration-community.aws-11 FAILURE in 13m 57s
Skipped 11 jobs

@softwarefactory-project-zuul
Copy link
Contributor

Build failed.
https://ansible.softwarefactory-project.io/zuul/buildset/4cfb9590d09241b1ad814ee223d89f9a

✔️ ansible-galaxy-importer SUCCESS in 4m 26s
✔️ build-ansible-collection SUCCESS in 12m 22s
ansible-test-sanity-docker-devel FAILURE in 12m 05s (non-voting)
ansible-test-sanity-docker-milestone FAILURE in 12m 04s (non-voting)
ansible-test-sanity-docker-stable-2.12 FAILURE in 12m 00s
ansible-test-sanity-docker-stable-2.13 FAILURE in 12m 08s
ansible-test-sanity-docker-stable-2.14 FAILURE in 11m 52s
✔️ ansible-test-units-amazon-aws-python36 SUCCESS in 8m 22s
✔️ ansible-test-units-amazon-aws-python38 SUCCESS in 8m 01s
✔️ ansible-test-units-amazon-aws-python39 SUCCESS in 7m 33s
✔️ ansible-test-units-amazon-aws-python310 SUCCESS in 5m 42s
✔️ ansible-test-changelog SUCCESS in 4m 31s
✔️ ansible-test-splitter SUCCESS in 4m 39s
✔️ integration-community.aws-1 SUCCESS in 9m 17s
✔️ integration-community.aws-2 SUCCESS in 10m 45s
✔️ integration-community.aws-3 SUCCESS in 11m 58s
✔️ integration-community.aws-4 SUCCESS in 11m 58s
✔️ integration-community.aws-5 SUCCESS in 13m 06s
✔️ integration-community.aws-6 SUCCESS in 29m 13s
✔️ integration-community.aws-7 SUCCESS in 9m 02s
✔️ integration-community.aws-8 SUCCESS in 11m 24s
✔️ integration-community.aws-9 SUCCESS in 8m 47s
✔️ integration-community.aws-10 SUCCESS in 12m 07s
integration-community.aws-11 FAILURE in 14m 15s
Skipped 11 jobs

@softwarefactory-project-zuul
Copy link
Contributor

Build failed.
https://ansible.softwarefactory-project.io/zuul/buildset/0a78f7b5218741808ea68d5065f4b809

ansible-galaxy-importer FAILURE in 4m 12s
✔️ build-ansible-collection SUCCESS in 12m 37s
✔️ ansible-test-sanity-docker-devel SUCCESS in 8m 53s (non-voting)
✔️ ansible-test-sanity-docker-milestone SUCCESS in 10m 59s (non-voting)
✔️ ansible-test-sanity-docker-stable-2.12 SUCCESS in 15m 57s
✔️ ansible-test-sanity-docker-stable-2.13 SUCCESS in 9m 16s
✔️ ansible-test-sanity-docker-stable-2.14 SUCCESS in 10m 59s
✔️ ansible-test-units-amazon-aws-python36 SUCCESS in 6m 23s
✔️ ansible-test-units-amazon-aws-python38 SUCCESS in 5m 37s
✔️ ansible-test-units-amazon-aws-python39 SUCCESS in 5m 43s
✔️ ansible-test-units-amazon-aws-python310 SUCCESS in 8m 09s
✔️ ansible-test-changelog SUCCESS in 4m 32s
✔️ ansible-test-splitter SUCCESS in 4m 41s
✔️ integration-community.aws-1 SUCCESS in 11m 15s
integration-community.aws-2 RETRY_LIMIT in 1m 32s
✔️ integration-community.aws-3 SUCCESS in 11m 36s
✔️ integration-community.aws-4 SUCCESS in 10m 27s
integration-community.aws-5 RETRY_LIMIT in 1m 33s
✔️ integration-community.aws-6 SUCCESS in 10m 18s
✔️ integration-community.aws-7 SUCCESS in 9m 46s
✔️ integration-community.aws-8 SUCCESS in 10m 53s
✔️ integration-community.aws-9 SUCCESS in 9m 56s
✔️ integration-community.aws-10 SUCCESS in 10m 30s
✔️ integration-community.aws-11 SUCCESS in 33m 23s
Skipped 11 jobs

@markuman
Copy link
Member

recheck

@softwarefactory-project-zuul
Copy link
Contributor

Build failed.
https://ansible.softwarefactory-project.io/zuul/buildset/63fc57e817194edabd21ccc4e0a9d224

✔️ ansible-galaxy-importer SUCCESS in 3m 58s
✔️ build-ansible-collection SUCCESS in 13m 29s
✔️ ansible-test-sanity-docker-devel SUCCESS in 23m 19s (non-voting)
✔️ ansible-test-sanity-docker-milestone SUCCESS in 14m 28s (non-voting)
✔️ ansible-test-sanity-docker-stable-2.12 SUCCESS in 15m 15s
✔️ ansible-test-sanity-docker-stable-2.13 SUCCESS in 12m 37s
✔️ ansible-test-sanity-docker-stable-2.14 SUCCESS in 13m 57s
✔️ ansible-test-units-amazon-aws-python36 SUCCESS in 6m 00s
✔️ ansible-test-units-amazon-aws-python38 SUCCESS in 7m 54s
✔️ ansible-test-units-amazon-aws-python39 SUCCESS in 5m 50s
✔️ ansible-test-units-amazon-aws-python310 SUCCESS in 9m 04s
✔️ ansible-test-changelog SUCCESS in 4m 29s
✔️ ansible-test-splitter SUCCESS in 4m 58s
✔️ integration-community.aws-1 SUCCESS in 11m 49s
✔️ integration-community.aws-2 SUCCESS in 8m 16s
✔️ integration-community.aws-3 SUCCESS in 9m 41s
✔️ integration-community.aws-4 SUCCESS in 11m 12s
✔️ integration-community.aws-5 SUCCESS in 10m 15s
✔️ integration-community.aws-6 SUCCESS in 9m 09s
✔️ integration-community.aws-7 SUCCESS in 10m 07s
✔️ integration-community.aws-8 SUCCESS in 9m 01s
✔️ integration-community.aws-9 SUCCESS in 8m 40s
integration-community.aws-10 RETRY_LIMIT in 1m 29s
✔️ integration-community.aws-11 SUCCESS in 10m 33s
Skipped 11 jobs

@richardsonky
Copy link
Author

i'm not sure what is failing here. can someone help explain where i can find the logs for the integration-community.aws-10 test is located so i can figure out how to fix it?

@alinabuzachis
Copy link
Contributor

recheck

@softwarefactory-project-zuul
Copy link
Contributor

Build failed.
https://ansible.softwarefactory-project.io/zuul/buildset/146837a3b77c4aad987783f070baa6f1

ansible-galaxy-importer FAILURE in 5m 32s
✔️ build-ansible-collection SUCCESS in 12m 38s
✔️ ansible-test-sanity-docker-devel SUCCESS in 10m 42s (non-voting)
✔️ ansible-test-sanity-docker-milestone SUCCESS in 11m 28s (non-voting)
✔️ ansible-test-sanity-docker-stable-2.12 SUCCESS in 12m 20s
✔️ ansible-test-sanity-docker-stable-2.13 SUCCESS in 12m 17s
✔️ ansible-test-sanity-docker-stable-2.14 SUCCESS in 11m 47s
✔️ ansible-test-units-amazon-aws-python36 SUCCESS in 6m 27s
✔️ ansible-test-units-amazon-aws-python38 SUCCESS in 6m 29s
✔️ ansible-test-units-amazon-aws-python39 SUCCESS in 7m 28s
✔️ ansible-test-units-amazon-aws-python310 SUCCESS in 6m 02s
✔️ ansible-test-changelog SUCCESS in 4m 26s
✔️ ansible-test-splitter SUCCESS in 4m 46s
✔️ integration-community.aws-1 SUCCESS in 10m 20s
✔️ integration-community.aws-2 SUCCESS in 8m 20s
✔️ integration-community.aws-3 SUCCESS in 10m 22s
integration-community.aws-4 RETRY_LIMIT in 1m 33s
✔️ integration-community.aws-5 SUCCESS in 9m 30s
✔️ integration-community.aws-6 SUCCESS in 11m 35s
✔️ integration-community.aws-7 SUCCESS in 9m 58s
✔️ integration-community.aws-8 SUCCESS in 8m 25s
✔️ integration-community.aws-9 SUCCESS in 9m 20s
✔️ integration-community.aws-10 SUCCESS in 8m 59s
✔️ integration-community.aws-11 SUCCESS in 10m 56s
Skipped 11 jobs

@simon97k
Copy link

simon97k commented May 3, 2023

Hi, I had an issue where Ansible via AWS Session Manager was failing for AWS Linux 2023. I manually updated my local code according to the suggestion here, but I discovered another issue as follow-up. It looked like that the ANSI Remove also removed the correct Python Interpreter Path, Ansible "discovered" a Python Path that did not exist.
I was able to fix this with the following command on the target, previous to the Ansible execution:

sudo ln -sf /usr/bin/python3.9 /usr/bin/python

Now Ansible runs fine via Session Manager Connection with AWS Linux 2023 as target.

The escape should be checked again, maybe there is something escaped, that should not be escaped.

@softwarefactory-project-zuul
Copy link
Contributor

Build failed.
https://ansible.softwarefactory-project.io/zuul/buildset/899914ff76334c1fa50ce212b7a4ec9f

ansible-galaxy-importer FAILURE in 4m 04s
✔️ build-ansible-collection SUCCESS in 12m 54s
✔️ ansible-test-sanity-docker-devel SUCCESS in 13m 53s (non-voting)
✔️ ansible-test-sanity-docker-milestone SUCCESS in 10m 20s (non-voting)
✔️ ansible-test-sanity-docker-stable-2.12 SUCCESS in 10m 51s
✔️ ansible-test-sanity-docker-stable-2.13 SUCCESS in 13m 56s
✔️ ansible-test-sanity-docker-stable-2.14 SUCCESS in 10m 31s
✔️ ansible-test-units-amazon-aws-python36 SUCCESS in 6m 12s
✔️ ansible-test-units-amazon-aws-python38 SUCCESS in 6m 02s
✔️ ansible-test-units-amazon-aws-python39 SUCCESS in 6m 08s
✔️ ansible-test-units-amazon-aws-python310 SUCCESS in 6m 45s
✔️ ansible-test-changelog SUCCESS in 4m 22s
✔️ ansible-test-splitter SUCCESS in 4m 56s
✔️ integration-community.aws-1 SUCCESS in 9m 55s
✔️ integration-community.aws-2 SUCCESS in 8m 25s
✔️ integration-community.aws-3 SUCCESS in 12m 31s
Skipped 19 jobs

@alinabuzachis alinabuzachis added backport-6 PR should be backported to the stable-6 branch backport-5 PR should be backported to the stable-5 branch labels May 25, 2023
@alinabuzachis alinabuzachis modified the milestones: 5.x, 6.1.0 May 25, 2023
@alinabuzachis
Copy link
Contributor

recheck

@softwarefactory-project-zuul
Copy link
Contributor

Build failed.
https://ansible.softwarefactory-project.io/zuul/buildset/43f0cca1241a4cce99e1455890374c56

ansible-galaxy-importer FAILURE in 5m 06s
✔️ build-ansible-collection SUCCESS in 12m 42s
✔️ ansible-test-sanity-docker-devel SUCCESS in 11m 00s (non-voting)
✔️ ansible-test-sanity-docker-milestone SUCCESS in 13m 21s (non-voting)
✔️ ansible-test-sanity-docker-stable-2.12 SUCCESS in 14m 24s
✔️ ansible-test-sanity-docker-stable-2.13 SUCCESS in 10m 50s
✔️ ansible-test-sanity-docker-stable-2.14 SUCCESS in 10m 42s
✔️ ansible-test-units-amazon-aws-python36 SUCCESS in 6m 07s
✔️ ansible-test-units-amazon-aws-python38 SUCCESS in 5m 52s
✔️ ansible-test-units-amazon-aws-python39 SUCCESS in 6m 13s
✔️ ansible-test-units-amazon-aws-python310 SUCCESS in 7m 00s
✔️ ansible-test-changelog SUCCESS in 4m 49s
✔️ ansible-test-splitter SUCCESS in 4m 53s
✔️ integration-community.aws-1 SUCCESS in 8m 51s
integration-community.aws-2 RETRY_LIMIT in 1m 30s
✔️ integration-community.aws-3 SUCCESS in 12m 08s
Skipped 19 jobs

@Hokwang
Copy link

Hokwang commented May 25, 2023

I have this problem too.

@alinabuzachis
Copy link
Contributor

recheck

@alinabuzachis
Copy link
Contributor

@Hokwang does this PR fix your issue?

@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.
https://ansible.softwarefactory-project.io/zuul/buildset/17b582cc16344acea4875f0b19349040

✔️ ansible-galaxy-importer SUCCESS in 3m 40s
✔️ build-ansible-collection SUCCESS in 13m 57s
✔️ ansible-test-sanity-docker-devel SUCCESS in 9m 34s (non-voting)
✔️ ansible-test-sanity-docker-milestone SUCCESS in 8m 57s (non-voting)
✔️ ansible-test-sanity-docker-stable-2.12 SUCCESS in 9m 16s
✔️ ansible-test-sanity-docker-stable-2.13 SUCCESS in 9m 19s
✔️ ansible-test-sanity-docker-stable-2.14 SUCCESS in 9m 03s
✔️ ansible-test-units-amazon-aws-python36 SUCCESS in 5m 39s
✔️ ansible-test-units-amazon-aws-python38 SUCCESS in 6m 10s
✔️ ansible-test-units-amazon-aws-python39 SUCCESS in 5m 37s
✔️ ansible-test-units-amazon-aws-python310 SUCCESS in 5m 47s
✔️ ansible-test-changelog SUCCESS in 4m 40s
✔️ ansible-test-splitter SUCCESS in 4m 59s
✔️ integration-community.aws-1 SUCCESS in 8m 57s
✔️ integration-community.aws-2 SUCCESS in 8m 50s
✔️ integration-community.aws-3 SUCCESS in 10m 27s
Skipped 19 jobs

@softwarefactory-project-zuul
Copy link
Contributor

Build failed.
https://ansible.softwarefactory-project.io/zuul/buildset/440de21029964207a003961fb4b12c1c

ansible-galaxy-importer FAILURE in 4m 20s
✔️ build-ansible-collection SUCCESS in 13m 03s
✔️ ansible-test-sanity-docker-devel SUCCESS in 10m 56s (non-voting)
✔️ ansible-test-sanity-docker-milestone SUCCESS in 10m 49s (non-voting)
✔️ ansible-test-sanity-docker-stable-2.12 SUCCESS in 11m 32s
✔️ ansible-test-sanity-docker-stable-2.13 SUCCESS in 10m 48s
✔️ ansible-test-sanity-docker-stable-2.14 SUCCESS in 12m 05s
✔️ ansible-test-units-amazon-aws-python36 SUCCESS in 6m 17s
✔️ ansible-test-units-amazon-aws-python38 SUCCESS in 6m 11s
✔️ ansible-test-units-amazon-aws-python39 SUCCESS in 6m 18s
✔️ ansible-test-units-amazon-aws-python310 SUCCESS in 6m 41s
✔️ ansible-test-changelog SUCCESS in 4m 41s
✔️ ansible-test-splitter SUCCESS in 4m 56s
✔️ integration-community.aws-1 SUCCESS in 10m 03s
✔️ integration-community.aws-2 SUCCESS in 10m 29s
✔️ integration-community.aws-3 SUCCESS in 12m 47s
Skipped 19 jobs

@tremble
Copy link
Contributor

tremble commented May 26, 2023

recheck

@softwarefactory-project-zuul
Copy link
Contributor

Build failed.
https://ansible.softwarefactory-project.io/zuul/buildset/0c899fe79e14431088b4d867d79cbfee

✔️ ansible-galaxy-importer SUCCESS in 5m 09s
✔️ build-ansible-collection SUCCESS in 13m 26s
✔️ ansible-test-sanity-docker-devel SUCCESS in 13m 35s (non-voting)
✔️ ansible-test-sanity-docker-milestone SUCCESS in 13m 43s (non-voting)
✔️ ansible-test-sanity-docker-stable-2.12 SUCCESS in 12m 43s
✔️ ansible-test-sanity-docker-stable-2.13 SUCCESS in 13m 22s
✔️ ansible-test-sanity-docker-stable-2.14 SUCCESS in 13m 04s
✔️ ansible-test-units-amazon-aws-python36 SUCCESS in 8m 59s
✔️ ansible-test-units-amazon-aws-python38 SUCCESS in 8m 56s
✔️ ansible-test-units-amazon-aws-python39 SUCCESS in 8m 12s
✔️ ansible-test-units-amazon-aws-python310 SUCCESS in 8m 46s
✔️ ansible-test-changelog SUCCESS in 4m 40s
✔️ ansible-test-splitter SUCCESS in 4m 58s
integration-community.aws-1 FAILURE in 15m 44s
integration-community.aws-2 RETRY_LIMIT in 1m 33s
integration-community.aws-3 FAILURE in 14m 12s
integration-community.aws-4 FAILURE in 13m 51s
integration-community.aws-5 FAILURE in 25m 51s
integration-community.aws-6 FAILURE in 14m 08s
integration-community.aws-7 FAILURE in 14m 11s
integration-community.aws-8 FAILURE in 13m 39s
integration-community.aws-9 RETRY_LIMIT in 1m 33s
integration-community.aws-10 FAILURE in 15m 03s
✔️ integration-community.aws-11 SUCCESS in 13m 08s
Skipped 11 jobs

@dennisjlee
Copy link
Contributor

FYI I have a PR out that addresses this problem in a different way: #1839
I believe that I eliminated the root cause of the extra escape sequences.

@alinabuzachis
Copy link
Contributor

recheck

@softwarefactory-project-zuul
Copy link
Contributor

Build failed.
https://ansible.softwarefactory-project.io/zuul/buildset/9d880675aad54692a21b86b9991c05bc

ansible-galaxy-importer FAILURE in 4m 05s
✔️ build-ansible-collection SUCCESS in 13m 00s
✔️ ansible-test-sanity-docker-devel SUCCESS in 10m 21s (non-voting)
✔️ ansible-test-sanity-docker-milestone SUCCESS in 11m 34s (non-voting)
✔️ ansible-test-sanity-docker-stable-2.12 SUCCESS in 10m 52s
✔️ ansible-test-sanity-docker-stable-2.13 SUCCESS in 10m 28s
✔️ ansible-test-sanity-docker-stable-2.14 SUCCESS in 12m 40s
✔️ ansible-test-units-amazon-aws-python36 SUCCESS in 6m 27s
✔️ ansible-test-units-amazon-aws-python38 SUCCESS in 6m 02s
✔️ ansible-test-units-amazon-aws-python39 SUCCESS in 5m 57s
✔️ ansible-test-units-amazon-aws-python310 SUCCESS in 6m 20s
✔️ ansible-test-changelog SUCCESS in 4m 51s
✔️ ansible-test-splitter SUCCESS in 4m 57s
integration-community.aws-1 FAILURE in 6m 18s
✔️ integration-community.aws-2 SUCCESS in 9m 01s
integration-community.aws-3 FAILURE in 6m 07s
integration-community.aws-4 FAILURE in 8m 08s
integration-community.aws-5 FAILURE in 8m 18s
integration-community.aws-6 FAILURE in 9m 35s
integration-community.aws-7 FAILURE in 8m 29s
integration-community.aws-8 FAILURE in 9m 52s
✔️ integration-community.aws-9 SUCCESS in 8m 34s
integration-community.aws-10 FAILURE in 8m 05s
✔️ integration-community.aws-11 SUCCESS in 12m 26s
Skipped 11 jobs

@richardsonky
Copy link
Author

FYI I have a PR out that addresses this problem in a different way: #1839 I believe that I eliminated the root cause of the extra escape sequences.

I like your approach better. Your way fixes it at the root. I have tested in our environment and i believe you have the best approach. I'm going to close this PR so your method is used instead.

abikouo pushed a commit to abikouo/community.aws that referenced this pull request Oct 24, 2023
… retries enabled (ansible-collections#1768)

elb_application_lb_info - ensure queries for additional ALB data have retries enabled

SUMMARY
As per ansible-collections#1767 the queries to pull extra info about ALBs are hitting rate limits when there's a lot of ALBs.  Unfortunately the initial list operation has limited server-side filtering capabilities (and we don't have consistent client side filtering implemented at this time).
Ensure that all of the extra queries have retries with jittered backoff enabled.
Additionally, drops a redundant describe_load_balancers call to retrieve the ip_address_type information.  (added by ansible-collections#499)
ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME
elb_application_lb_info
ADDITIONAL INFORMATION
I don't consider this a full fix for ansible-collections#1767 so I'm not using the "fixes".

Reviewed-by: Alina Buzachis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-5 PR should be backported to the stable-5 branch backport-6 PR should be backported to the stable-6 branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

unexpected output from Python interpreter discovery with aws_ssm connection plugin
7 participants