-
Notifications
You must be signed in to change notification settings - Fork 23.7k
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
PSRP: Add read_timeout connection parameters #46850
Conversation
This comment has been minimized.
This comment has been minimized.
e8bcd58
to
58b3d54
Compare
@jborean93 I added a check for read_timeout support. Please review !
|
58b3d54
to
aa01974
Compare
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you should split out the psrp and winrm changes into separate PRs for 2 reasons;
- Not sure when the pywinrm PR will be reviewed and merged so I don't want to hold up these changes making it into psrp
- The current setup with read/connection/operational timeouts and how they relate to Ansible extra vars is a bit convoluted. It will require some more complex kwarg inspection handling and other changes to properly implement.
c7086c8
to
d05bca6
Compare
a0a9b98
to
28ee544
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just need to change the display.debug to a warning and I'm good with the changes here.
Ready for re-review. |
Im not able to get this to function. From my Docker File
From Ansible Log
From My Group Var ansible_port: 5986
ansible_connection: psrp
ansible_psrp_auth: credssp
ansible_psrp_cert_validation: ignore
ansible_psrp_connection_timeout: 1800
ansible_psrp_operation_timeout: 1200
ansible_psrp_read_timeout: 1100
ansible_winrm_read_timeout: 1100
ansible_psrp_reconnection_retries: 10 / $ ansible --version
ansible 2.8.0.dev0
config file = None
configured module search path = [u'/home/jenkins/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python2.7/site-packages/ansible
executable location = /usr/bin/ansible
python version = 2.7.15 (default, Aug 16 2018, 14:17:09) [GCC 6.4.0]
/ $ pip show pypsrp
Name: pypsrp
Version: 0.3.1
Summary: PowerShell Remoting Protocol and WinRM for Python
Home-page: https://github.com/jborean93/pypsrp
Author: Jordan Borean
Author-email: jborean93@gmail.com
License: MIT
Location: /usr/lib/python2.7/site-packages
Requires: cryptography, ntlm-auth, requests, six
Required-by:
/ $ which ansible
/usr/bin/ansible
/ $ python --version
Python 2.7.15
/ $ |
@jseiser I don't know why it fails for you. I just verified on a new system and it works as expected. Can you perform the following on your system: $ python -c 'import pypsrp; print pypsrp.FEATURES' |
pip install git+https://github.com/jborean93/pypsrp.git
|
@jseiser Then it is up to you to figure out why this is not working ;-) ansible/lib/ansible/plugins/connection/psrp.py Lines 561 to 566 in 153e669
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because we set a default value for read_timeout
of 30, the current change will always display a warning for a user if they are running on an older version of pypsrp. I think this is an ok tradeoff to make the code simpler and considering this is mostly a new and undocumented connection plugin I doubt many people would be using it right now. Testing it locally I can confirm the values are being passed down to the right location and am happy with the changes here.
@jseiser I'm not sure why the Ansible environment is not picking up your changes, I've tested this code on both Python 2 and 3 and can confirm it works as expected. The |
@jseiser so I did come across this issue today but it was because the version of Ansible I was using did not have this PR applied. You would need to make sure you are running from the devel checkout for it to work. |
I rebuilt the container today. And it all worked. No idea what changed, the
docker file didn't
…On Tue, Jan 29, 2019, 6:36 PM Jordan Borean ***@***.*** wrote:
@jseiser <https://github.com/jseiser> so I did come across this issue
today but it was because the version of Ansible I was using did not have
this PR applied. You would need to make sure you are running from the devel
checkout for it to work.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#46850 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AEoW56ajsA_RjKxQVPQYF0AXejv5PcgXks5vINrkgaJpZM4XYdCQ>
.
|
SUMMARY
This PR adds read_timeout parameters for PSRP.
The WinRM variant is in #49701.
This PR requires jborean93/pypsrp#13
This relates to #46108
ISSUE TYPE
COMPONENT NAME
WinRM/PSRP