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

Explicitly accept become_success in awaiting_prompt state #13297

Merged
merged 1 commit into from
Nov 28, 2015
Merged

Explicitly accept become_success in awaiting_prompt state #13297

merged 1 commit into from
Nov 28, 2015

Conversation

amenonsen
Copy link
Contributor

If we request escalation with a password, we start in expecting_prompt
state. If the escalation then succeeds without the password, i.e., the
become_success response arrives, we must explicitly move into the next
state (awaiting_escalation, which immediately goes into ready_to_send),
so that we no longer try to apply the timeout.

Otherwise, if the results of the task don't arrive with become_success
(dependent on the exact timing), we leak the success notification and
eventually timeout. But if the module response did arrive before the
timeout expired, the "process has already exited" test would do the
right thing by accident (which is why it didn't fail more often).

Fixes #13289

If we request escalation with a password, we start in expecting_prompt
state. If the escalation then succeeds without the password, i.e., the
become_success response arrives, we must explicitly move into the next
state (awaiting_escalation, which immediately goes into ready_to_send),
so that we no longer try to apply the timeout.

Otherwise, we would leak the success notification and eventually
timeout. But if the module response did arrive before the timeout
expired, the "process has already exited" test would do the right
thing by accident (which is why it didn't fail more often).

Fixes #13289
@bcoca bcoca added this to the v2 milestone Nov 26, 2015
@amenonsen
Copy link
Contributor Author

I had pushed another commit to fix #13318, but then opened a separate #13344 for that. Please merge this first.

jimi-c added a commit that referenced this pull request Nov 28, 2015
Explicitly accept become_success in awaiting_prompt state
@jimi-c jimi-c merged commit a7f7f8b into ansible:devel Nov 28, 2015
@jimi-c
Copy link
Member

jimi-c commented Nov 28, 2015

Merged, thanks!

@amenonsen amenonsen deleted the ssh-escalation branch December 11, 2015 02:39
@svanschalkwyk
Copy link

This doesn't seem to work for me. I'm deploying to Google Compute Engine, which has password-less sudo. The script keeps on telling me it has to have a password.

@ansibot ansibot added bug This issue/PR relates to a bug. and removed bugfix_pull_request labels Mar 5, 2018
@ansible ansible locked and limited conversation to collaborators Apr 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug This issue/PR relates to a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

become with password less sudo
5 participants