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

Acquire displayed messages from forked process #36064

Merged
merged 1 commit into from
Feb 13, 2018

Conversation

Qalthos
Copy link
Contributor

@Qalthos Qalthos commented Feb 12, 2018

SUMMARY

Fixes #24721

Has the unfortunate side effect of passing text through Display.display() twice, so strings look like <hostname> <hostname> text to be displayed

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

ansible-connection

ANSIBLE VERSION
2.5

Also restore verbosity value from loaded `play_context`
@ansibot ansibot added bugfix_pull_request needs_triage Needs a first human triage before being processed. support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels Feb 12, 2018
@bcoca bcoca removed the needs_triage Needs a first human triage before being processed. label Feb 12, 2018
@gundalow
Copy link
Contributor

Got an example of logs when using this with proxy?

@Qalthos
Copy link
Contributor Author

Qalthos commented Feb 13, 2018

It needs -vvvv (because that's the level that logs from the persistent process get reintroduced at). Here's the output from my testing:

task path: /home/nate/workspace/ansible/test/vyos_facts.yaml:7
<vyrtos> attempting to start connection
<vyrtos> using connection plugin network_cli
<vyrtos> local domain socket does not exist, starting it
<vyrtos> control socket path is /home/nate/.ansible/pc/04f29afd10
<vyrtos> <vyrtos> ESTABLISH CONNECTION FOR USER: nate on PORT 22 TO vyrtos
<vyrtos> <vyrtos> CONFIGURE PROXY COMMAND FOR CONNECTION: ssh -W vyrtos:22 -q bastion
<vyrtos> <vyrtos> ssh connection done, setting terminal
<vyrtos> <vyrtos> loaded terminal plugin for network_os vyos
<vyrtos> <vyrtos> loaded cliconf plugin for network_os vyos
<vyrtos> <vyrtos> firing event: on_open_shell()
<vyrtos> <vyrtos> ssh connection has completed successfully
<vyrtos> connection to remote device started successfully
<vyrtos> local domain socket listeners started successfully
<vyrtos> 
<vyrtos> local domain socket path is /home/nate/.ansible/pc/04f29afd10
Using module file /home/nate/workspace/ansible/ansible/lib/ansible/modules/network/vyos/vyos_command.py
<vyrtos> ESTABLISH LOCAL CONNECTION FOR USER: nate
<vyrtos> EXEC /bin/sh -c 'python && sleep 0'

The addition is the lines starting with <vyrtos> <vyrtos> for reasons explained earlier. I haven't actually added any logging, just exposing existing display calls. If we really want this to go to ANSIBLE_LOG as the issue claims, that could be arranged, but I figured that was a leftover from the unable to open shell days.

@gundalow
Copy link
Contributor

That looks good, Thanks. Feel free to merge & CP

@Qalthos Qalthos merged commit 527fc49 into ansible:devel Feb 13, 2018
Qalthos added a commit to Qalthos/ansible that referenced this pull request Feb 13, 2018
Also restore verbosity value from loaded `play_context`

(cherry picked from commit 527fc49)
@Qalthos Qalthos deleted the persistent-restore-display branch February 13, 2018 16:00
Qalthos added a commit that referenced this pull request Feb 13, 2018
Also restore verbosity value from loaded `play_context`

(cherry picked from commit 527fc49)
@ansibot ansibot added bug This issue/PR relates to a bug. and removed bugfix_pull_request labels Mar 6, 2018
@ansible ansible locked and limited conversation to collaborators Apr 27, 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. support:core This issue/PR relates to code supported by the Ansible Engineering Team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Persistent Connection: Proxy information needs logging
4 participants