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

Fix aws_ssm when Powershell uses CLIXML #2080

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

matpompili
Copy link

SUMMARY

This PR adds the code suggested by @PatrickV-code on #1952

In short, connection to Windows based EC2 instances using aws_ssm connection and using the become option of runas fails every job.
The job itself actually finishes, but as Powershell 5 adds additional wrapping with CLIXML information.
Which makes the output unreadable for Ansible.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

aws_ssm

@matpompili matpompili marked this pull request as draft April 22, 2024 23:47
@matpompili matpompili changed the title If the return code contains #CLIXML (like a progress bar) remove it Fix aws_ssm when Powershell uses CLIXML Apr 22, 2024
@matpompili matpompili marked this pull request as ready for review April 22, 2024 23:55
Copy link
Contributor

Build failed.
https://ansible.softwarefactory-project.io/zuul/buildset/10299bc8bfee46b4813d1914ac4c663b

ansible-galaxy-importer FAILURE in 5m 07s (non-voting)
✔️ build-ansible-collection SUCCESS in 15m 47s
✔️ ansible-test-splitter SUCCESS in 5m 42s
✔️ integration-community.aws-1 SUCCESS in 14m 29s
✔️ integration-community.aws-2 SUCCESS in 10m 23s
✔️ integration-community.aws-3 SUCCESS in 12m 56s
✔️ integration-community.aws-4 SUCCESS in 10m 39s
✔️ integration-community.aws-5 SUCCESS in 9m 34s
✔️ integration-community.aws-6 SUCCESS in 21m 06s
✔️ integration-community.aws-7 SUCCESS in 9m 39s
✔️ integration-community.aws-8 SUCCESS in 13m 26s
✔️ integration-community.aws-9 SUCCESS in 8m 24s
✔️ integration-community.aws-10 SUCCESS in 9m 25s
integration-community.aws-11 RETRY_LIMIT in 1m 40s
Skipped 11 jobs

@tremble
Copy link
Contributor

tremble commented Apr 23, 2024

recheck

Copy link
Contributor

Build succeeded.
https://ansible.softwarefactory-project.io/zuul/buildset/12fba0d2eb194190a2889c90949793b9

ansible-galaxy-importer FAILURE in 5m 37s (non-voting)
✔️ build-ansible-collection SUCCESS in 15m 37s
✔️ ansible-test-splitter SUCCESS in 6m 14s
✔️ integration-community.aws-1 SUCCESS in 10m 55s
✔️ integration-community.aws-2 SUCCESS in 8m 01s
✔️ integration-community.aws-3 SUCCESS in 9m 16s
✔️ integration-community.aws-4 SUCCESS in 9m 06s
✔️ integration-community.aws-5 SUCCESS in 9m 32s
✔️ integration-community.aws-6 SUCCESS in 9m 36s
✔️ integration-community.aws-7 SUCCESS in 9m 12s
✔️ integration-community.aws-8 SUCCESS in 10m 08s
✔️ integration-community.aws-9 SUCCESS in 8m 24s
✔️ integration-community.aws-10 SUCCESS in 9m 50s
✔️ integration-community.aws-11 SUCCESS in 9m 45s
Skipped 11 jobs

Copy link
Contributor

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

✔️ ansible-galaxy-importer SUCCESS in 6m 35s (non-voting)
✔️ build-ansible-collection SUCCESS in 16m 01s
✔️ ansible-test-splitter SUCCESS in 5m 42s
✔️ integration-community.aws-1 SUCCESS in 11m 03s
✔️ integration-community.aws-2 SUCCESS in 9m 12s
✔️ integration-community.aws-3 SUCCESS in 10m 29s
✔️ integration-community.aws-4 SUCCESS in 10m 21s
✔️ integration-community.aws-5 SUCCESS in 9m 52s
✔️ integration-community.aws-6 SUCCESS in 19m 58s
✔️ integration-community.aws-7 SUCCESS in 10m 34s
✔️ integration-community.aws-8 SUCCESS in 13m 42s
✔️ integration-community.aws-9 SUCCESS in 8m 15s
✔️ integration-community.aws-10 SUCCESS in 9m 48s
✔️ integration-community.aws-11 SUCCESS in 5m 21s
Skipped 11 jobs

@matpompili
Copy link
Author

@tremble I fixed the issue with black, should be ready to be rechecked.

Copy link
Contributor

Build succeeded.
https://ansible.softwarefactory-project.io/zuul/buildset/215ffe60682f46a38df68e5b778548bb

ansible-galaxy-importer FAILURE in 5m 25s (non-voting)
✔️ build-ansible-collection SUCCESS in 16m 29s
✔️ ansible-test-splitter SUCCESS in 6m 43s
✔️ integration-community.aws-1 SUCCESS in 10m 22s
✔️ integration-community.aws-2 SUCCESS in 9m 18s
✔️ integration-community.aws-3 SUCCESS in 9m 50s
✔️ integration-community.aws-4 SUCCESS in 10m 41s
✔️ integration-community.aws-5 SUCCESS in 10m 00s
✔️ integration-community.aws-6 SUCCESS in 19m 21s
✔️ integration-community.aws-7 SUCCESS in 9m 17s
✔️ integration-community.aws-8 SUCCESS in 11m 56s
✔️ integration-community.aws-9 SUCCESS in 9m 06s
✔️ integration-community.aws-10 SUCCESS in 12m 19s
✔️ integration-community.aws-11 SUCCESS in 6m 29s
Skipped 11 jobs

@matpompili
Copy link
Author

Hi @tremble, anything else I can do for this PR?

@markuman markuman added backport-8 backport-7 PR should be backported to the stable-7 branch labels Jun 13, 2024
@markuman markuman added the mergeit Merge the PR (SoftwareFactory) label Jun 21, 2024
@markuman
Copy link
Member

regate

@markuman markuman added mergeit Merge the PR (SoftwareFactory) and removed mergeit Merge the PR (SoftwareFactory) labels Jun 24, 2024
@alinabuzachis
Copy link
Contributor

regate

Copy link
Contributor

Build failed (gate pipeline). For information on how to proceed, see
http://docs.openstack.org/infra/manual/developers.html#automated-testing

https://ansible.softwarefactory-project.io/zuul/buildset/82b72a6197ad42bebffe63736d011238

✔️ ansible-galaxy-importer SUCCESS in 3m 16s (non-voting)
✔️ build-ansible-collection SUCCESS in 13m 12s
✔️ ansible-test-splitter SUCCESS in 5m 25s
integration-community.aws-1 FAILURE in 11m 12s
integration-community.aws-2 FAILURE in 12m 14s
integration-community.aws-3 FAILURE in 11m 44s
integration-community.aws-4 FAILURE in 13m 14s
integration-community.aws-5 FAILURE in 17m 11s
integration-community.aws-6 FAILURE in 11m 15s
integration-community.aws-7 FAILURE in 12m 56s
integration-community.aws-8 FAILURE in 16m 17s
integration-community.aws-9 FAILURE in 14m 22s
integration-community.aws-10 FAILURE in 12m 33s
✔️ integration-community.aws-11 SUCCESS in 5m 22s
Skipped 11 jobs

@alinabuzachis
Copy link
Contributor

regate

Copy link
Contributor

Build failed (gate pipeline). For information on how to proceed, see
http://docs.openstack.org/infra/manual/developers.html#automated-testing

https://ansible.softwarefactory-project.io/zuul/buildset/8ba12f476c344df280ae7f2fbd8425df

✔️ ansible-galaxy-importer SUCCESS in 3m 18s (non-voting)
✔️ build-ansible-collection SUCCESS in 12m 48s
✔️ ansible-test-splitter SUCCESS in 5m 09s
integration-community.aws-1 FAILURE in 13m 25s
integration-community.aws-2 FAILURE in 12m 11s
integration-community.aws-3 FAILURE in 13m 10s
integration-community.aws-4 FAILURE in 11m 29s
integration-community.aws-5 FAILURE in 13m 46s
integration-community.aws-6 FAILURE in 10m 24s
integration-community.aws-7 RETRY_LIMIT in 7m 42s
integration-community.aws-8 FAILURE in 10m 54s
integration-community.aws-9 FAILURE in 10m 50s
integration-community.aws-10 FAILURE in 11m 37s
✔️ integration-community.aws-11 SUCCESS in 4m 07s
Skipped 11 jobs

@markuman
Copy link
Member

regate

Copy link
Contributor

Build failed (gate pipeline). For information on how to proceed, see
http://docs.openstack.org/infra/manual/developers.html#automated-testing

https://ansible.softwarefactory-project.io/zuul/buildset/bb093155316a42a5aec0fe8b68204601

ansible-galaxy-importer FAILURE in 4m 12s (non-voting)
✔️ build-ansible-collection SUCCESS in 12m 13s
✔️ ansible-test-splitter SUCCESS in 4m 53s
integration-community.aws-1 FAILURE in 13m 43s
integration-community.aws-2 FAILURE in 11m 58s
integration-community.aws-3 FAILURE in 11m 29s
integration-community.aws-4 FAILURE in 13m 24s
integration-community.aws-5 FAILURE in 11m 02s
integration-community.aws-6 FAILURE in 13m 12s
integration-community.aws-7 FAILURE in 15m 33s
integration-community.aws-8 FAILURE in 13m 12s
integration-community.aws-9 FAILURE in 13m 46s
integration-community.aws-10 FAILURE in 11m 20s
✔️ integration-community.aws-11 SUCCESS in 7m 11s
Skipped 11 jobs

@markuman
Copy link
Member

markuman commented Jul 1, 2024

2024-06-28 19:10:40.087341 | controller | "msg": "timed out waiting for ping module test: 'ping'"

@markuman
Copy link
Member

markuman commented Jul 1, 2024

regate

Copy link
Contributor

Build failed (gate pipeline). For information on how to proceed, see
http://docs.openstack.org/infra/manual/developers.html#automated-testing

https://ansible.softwarefactory-project.io/zuul/buildset/148de36d24f44b7ea38235154ff29725

ansible-galaxy-importer FAILURE in 4m 52s (non-voting)
✔️ build-ansible-collection SUCCESS in 12m 24s
✔️ ansible-test-splitter SUCCESS in 4m 52s
integration-community.aws-1 FAILURE in 13m 25s
integration-community.aws-2 FAILURE in 11m 56s
integration-community.aws-3 FAILURE in 14m 49s
integration-community.aws-4 FAILURE in 13m 28s
integration-community.aws-5 FAILURE in 15m 40s
integration-community.aws-6 FAILURE in 11m 55s
integration-community.aws-7 FAILURE in 14m 56s
integration-community.aws-8 FAILURE in 13m 17s
integration-community.aws-9 FAILURE in 15m 22s
integration-community.aws-10 FAILURE in 12m 18s
✔️ integration-community.aws-11 SUCCESS in 4m 18s
Skipped 11 jobs

@alinabuzachis
Copy link
Contributor

regate

Copy link
Contributor

Build failed (gate pipeline). For information on how to proceed, see
http://docs.openstack.org/infra/manual/developers.html#automated-testing

https://ansible.softwarefactory-project.io/zuul/buildset/fb9b7b6c0cbd401ea1c7b78694adf512

✔️ ansible-galaxy-importer SUCCESS in 3m 51s (non-voting)
✔️ build-ansible-collection SUCCESS in 12m 51s
✔️ ansible-test-splitter SUCCESS in 5m 24s
integration-community.aws-1 FAILURE in 10m 56s
integration-community.aws-2 FAILURE in 11m 16s
integration-community.aws-3 FAILURE in 12m 05s
integration-community.aws-4 FAILURE in 12m 49s
integration-community.aws-5 FAILURE in 13m 20s
integration-community.aws-6 FAILURE in 13m 04s
integration-community.aws-7 FAILURE in 10m 30s
integration-community.aws-8 FAILURE in 13m 24s
integration-community.aws-9 FAILURE in 12m 25s
integration-community.aws-10 FAILURE in 12m 22s
✔️ integration-community.aws-11 SUCCESS in 4m 56s
Skipped 11 jobs

@markuman
Copy link
Member

markuman commented Jul 2, 2024

regate

Copy link
Contributor

Build failed (gate pipeline). For information on how to proceed, see
http://docs.openstack.org/infra/manual/developers.html#automated-testing

https://ansible.softwarefactory-project.io/zuul/buildset/5aa159cb29b6465a9871ee073c02f187

✔️ ansible-galaxy-importer SUCCESS in 8m 02s (non-voting)
✔️ build-ansible-collection SUCCESS in 12m 37s
✔️ ansible-test-splitter SUCCESS in 5m 36s
integration-community.aws-1 FAILURE in 15m 04s
integration-community.aws-2 FAILURE in 13m 38s
integration-community.aws-3 FAILURE in 13m 23s
integration-community.aws-4 FAILURE in 11m 21s
integration-community.aws-5 FAILURE in 13m 16s
integration-community.aws-6 FAILURE in 13m 05s
integration-community.aws-7 FAILURE in 12m 33s
integration-community.aws-8 FAILURE in 12m 33s
integration-community.aws-9 FAILURE in 11m 44s
integration-community.aws-10 FAILURE in 12m 38s
✔️ integration-community.aws-11 SUCCESS in 5m 29s
Skipped 11 jobs

@matpompili
Copy link
Author

Hi @markuman @alinabuzachis, is there something I need to change for the build to succeed?

@markuman
Copy link
Member

markuman commented Jul 3, 2024

Hi @markuman @alinabuzachis, is there something I need to change for the build to succeed?

I'm not sure. Error message is

TASK [wait_for_connection] *****************************************************
task path: /home/zuul-worker/.ansible/collections/ansible_collections/community/aws/tests/integration/targets/connection/test_connection.yml:14
fatal: [linux_i-0b10c2ed71e4a0682]: FAILED! => {
     "changed": false,
     "elapsed": 101,
     "msg": "timed out waiting for ping module test: 'ping'"
}

gateing CI failed, while the check for the PR succeeded.

@markuman
Copy link
Member

markuman commented Jul 3, 2024

recheck

Copy link
Contributor

Build failed.
https://ansible.softwarefactory-project.io/zuul/buildset/4294d8d51e1e4ecaaefe8faf9cebaa3f

ansible-galaxy-importer FAILURE in 4m 24s (non-voting)
✔️ build-ansible-collection SUCCESS in 12m 19s
✔️ ansible-test-splitter SUCCESS in 5m 05s
integration-community.aws-1 FAILURE in 12m 19s
integration-community.aws-2 FAILURE in 16m 41s
integration-community.aws-3 FAILURE in 12m 01s
integration-community.aws-4 FAILURE in 12m 01s
integration-community.aws-5 FAILURE in 17m 59s
integration-community.aws-6 FAILURE in 12m 01s
integration-community.aws-7 FAILURE in 12m 22s
integration-community.aws-8 FAILURE in 17m 18s
integration-community.aws-9 FAILURE in 13m 07s
integration-community.aws-10 FAILURE in 17m 22s
✔️ integration-community.aws-11 SUCCESS in 5m 00s
Skipped 11 jobs

@matpompili
Copy link
Author

@markuman @alinabuzachis I merged the latest commits from main into this PR, hopefully that fixes the checks?

Copy link
Contributor

Build failed.
https://ansible.softwarefactory-project.io/zuul/buildset/8d31e08832694f828a111f97df9691fd

ansible-galaxy-importer FAILURE in 4m 38s (non-voting)
✔️ build-ansible-collection SUCCESS in 10m 36s
✔️ ansible-test-splitter SUCCESS in 4m 14s
integration-community.aws-1 FAILURE in 12m 15s
integration-community.aws-2 FAILURE in 12m 51s
integration-community.aws-3 FAILURE in 12m 40s
integration-community.aws-4 FAILURE in 13m 29s
integration-community.aws-5 FAILURE in 13m 26s
integration-community.aws-6 FAILURE in 12m 22s
integration-community.aws-7 FAILURE in 12m 50s
integration-community.aws-8 FAILURE in 13m 43s
integration-community.aws-9 FAILURE in 12m 53s
integration-community.aws-10 FAILURE in 12m 33s
✔️ integration-community.aws-11 SUCCESS in 5m 54s
Skipped 11 jobs

@matpompili
Copy link
Author

@markuman @alinabuzachis I don't follow why the build doesn't succeed.

The edits work when I use them on my AWS instance.

It seems like something was changed between #2080 (comment) and #2080 (comment), but not the code of this PR.

@tenpei-on
Copy link

This PR looks promising for resolving the CLIXML handling issue in aws_ssm with PowerShell. Our team has been eagerly waiting for this fix as it would significantly streamline our workflows. Thank you for the continuous efforts! Looking forward to seeing this merged soon. If there’s any way we can help or test further, please let us know.

@markuman
Copy link
Member

markuman commented Sep 4, 2024

recheck

Copy link
Contributor

Build failed.
https://ansible.softwarefactory-project.io/zuul/buildset/42523921728040fd9fedce7da048c51f

✔️ ansible-galaxy-importer SUCCESS in 3m 23s (non-voting)
✔️ build-ansible-collection SUCCESS in 10m 40s
✔️ ansible-test-splitter SUCCESS in 4m 18s
integration-community.aws-1 FAILURE in 12m 46s
integration-community.aws-2 FAILURE in 13m 17s
integration-community.aws-3 FAILURE in 12m 32s
integration-community.aws-4 FAILURE in 14m 32s
integration-community.aws-5 FAILURE in 13m 01s
integration-community.aws-6 FAILURE in 12m 03s
integration-community.aws-7 FAILURE in 11m 52s
integration-community.aws-8 FAILURE in 13m 57s
integration-community.aws-9 FAILURE in 14m 00s
integration-community.aws-10 FAILURE in 13m 24s
✔️ integration-community.aws-11 SUCCESS in 5m 36s
Skipped 11 jobs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-7 PR should be backported to the stable-7 branch backport-8 mergeit Merge the PR (SoftwareFactory)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants