webui icon indicating copy to clipboard operation
webui copied to clipboard

Problem: Jobs stuck on SSH-Password-Prompt

Open NiceRath opened this issue 1 year ago • 13 comments

Versions

0.0.24

Scope

Ansible (Job Execution)

Issue

Jobs are stuck on the prompt SSH password: - the other ones work as expected

NiceRath avatar Sep 30 '24 07:09 NiceRath

The code looks good: https://github.com/ansibleguy/webui/blob/latest/src/ansibleguy-webui/aw/execute/play_credentials.py#L108

NiceRath avatar Sep 30 '24 10:09 NiceRath

I'm seeing the same. The jobs are stuck but from the Running command: output there doesn't seem to be a user or credentials passed in:

Capture

moy804 avatar Oct 04 '24 19:10 moy804

Possible issue with the formatting? Needs to be regex? https://github.com/ansible/ansible-runner/issues/534

superstes avatar Oct 05 '24 14:10 superstes

Yes - looks like it wants regex: https://github.com/ansible/ansible-runner/blob/devel/src/ansible_runner/config/_base.py#L199

ansibleguy avatar Oct 05 '24 18:10 ansibleguy

Seems it makes no difference if we supply the matches in regex format.. Debugging shows that the ansible-runner actually sends the password, but still nothing happens. At this point in the code the SSH password is sent: https://github.com/ansible/ansible-runner/blob/2.4.0/src/ansible_runner/runner.py#L321

ansibleguy avatar Oct 05 '24 19:10 ansibleguy

Was able to get it working by forking and hotfixing the ansible-runner: https://github.com/ansibleguy/ansible-runner/blob/release_2.4/src/ansibleguy_runner/runner.py#L323 Will create an issue at the ansible-runner repo.. for now we have a fork that should work: https://pypi.org/project/ansibleguy-runner/

ansibleguy avatar Oct 05 '24 20:10 ansibleguy

Related: https://github.com/ansibleguy/webui/issues/72

ansibleguy avatar Oct 05 '24 21:10 ansibleguy

My tests look good. Please update to the new version an re-test it.

ansibleguy avatar Oct 05 '24 21:10 ansibleguy

I just tried 0.0.24-2 via docker but it doesn't seem to pass the user or credentials to the ansible-playbook statement: image

Here's the same playbook output on 0.0.23-3: image

moy804 avatar Oct 06 '24 19:10 moy804

Very interesting as the --become-password-file and --connect-password-file are not in the codebase anymore. Can only think of a issue when building the docker images.. Will check it

ansibleguy avatar Oct 07 '24 16:10 ansibleguy

Have forgot to release the 0.0.24-3 image that has the missing-user fix in it. Currently uploading..

But also on 0.0.24-2 I was not able to reproduce the behavior seen in your screenshot: docker run -d --name ansible-webui --publish 127.0.0.1:8000:8000 --volume $(pwd):/play ansible0guy/webui:0.0.24-2 image

ansibleguy avatar Oct 07 '24 17:10 ansibleguy

And with 0.0.24-3 in docker now: image

ansibleguy avatar Oct 07 '24 17:10 ansibleguy

Looks good to me too. Much appreciated!

moy804 avatar Oct 07 '24 21:10 moy804