Skip to content

reimplement do_https() using HttpPool #56

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kreeuwijk
Copy link

@kreeuwijk kreeuwijk commented Apr 20, 2020

This reimplements the do_https() method, moving away from Net::HTTP, in favor of Puppet::Network::HttpPool.connection. This is because Net::HTTP gets emulated by JRuby in Puppetserver, and fails to connect via SSL, citing a handshake_failure. Instead, this uses Puppet's own HTTP client, which works correctly in both Puppet Agent and Puppetserver. This change makes node_groups() work correctly again on newer PE versions that enforce TLS 1.2.

This reimplements the `do_https()` method, moving away from `Net::HTTP`, in favor of `Puppet::Network::HttpPool.connection`. This is because Net:HTTP gets emulated by JRuby in puppetserver, and fails to connect via SSL, citing a `handshake_failure`. Instead, this uses Puppet's own HTTP client, which works correctly in both Puppet Agent and Puppetserver. This change makes `node_groups()` work correctly again on newer PE versions that enforce TLS 1.2.
@kreeuwijk
Copy link
Author

@WhatsARanjit ^^

@16c7x
Copy link

16c7x commented Jun 17, 2020

Hit this problem on 2019.7.0, switching over to @kreeuwijk 's fork fixed node_groups() for me.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Kevin Reeuwijk seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@timidri
Copy link
Contributor

timidri commented May 27, 2024

@Ramesh7 @jonathannewman Is this PR still viable or has it been superseded and can it be closed?

@jonathannewman
Copy link
Contributor

The mechanism used is now deprecated in favor of Http::Client https://www.rubydoc.info/gems/puppet/Puppet/Network/HttpPool

so it will need to be updated.

@timidri
Copy link
Contributor

timidri commented May 28, 2024

The mechanism used is now deprecated in favor of Http::Client https://www.rubydoc.info/gems/puppet/Puppet/Network/HttpPool

so it will need to be updated.

But do we need to update this or has the original problem been solved?

@jonathannewman
Copy link
Contributor

But do we need to update this or has the original problem been solved?

It is a performance optimization. Ideally it would be updated, but it will function without it.

@bastelfreak
Copy link
Contributor

@kreeuwijk hi! Any chance you can rebase this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants