Skip to content

(maint) Merge 6.4.x to master #7983

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

Merged
merged 16 commits into from
Feb 12, 2020

Conversation

joshcooper
Copy link
Contributor

No description provided.

melissa and others added 16 commits February 7, 2020 18:27

Unverified

The committer email address is not verified.
To prevent thundering herds, puppetserver may return Retry-After and ask
the agent to sleep.

When this happens, this commit closes the connection prior to sleeping.
It also ensures that closed connections are not added back to the pool.
This reduces resource usage on puppetserver.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
…alias-fix-comma-inside-commands-handling

(PUP-10287) mailalias: comma inside commands fix

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
(PUP-10227) Close the HTTP connection
Previous to this commit, the puppet settings defaults were loaded
when the defaults.rb file was required. That design makes it
difficult to generate new settings objects; additionally, code
that executes by simply requiring the file seems less than ideal.

This change stops the code from executing by simply requiring the
defaults.rb file, and refactors it to become a class method that
modifies a settings object that is passed in. As a result of this
refactor, the `Puppet.define_settings` method is no longer required
as a bridge to the @@settings object and is set as deprecated.
This is a separate commit to keep the white space change
for all the settings contained.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
…ctor-settings-to-55x

(PUP-10142) refactor settings initialization
Stub the "Net::HTTP#started?" method so finish happens as expected. Protect
against Net::HTTP#finish being called twice, and ensure the "Closing connection"
debug message is printed after the redirect, since Pool#close_connection will be
a noop.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
(PUP-10227) Preserve expectation for http.finish
* 5.5.x:
  Revert "(PUP-10142) Add white space for #initialize_default_settings!"
  (PUP-10227) Preserve expectation for http.finish
  (PUP-10142) Add white space for #initialize_default_settings!
  (PUP-10142) Refactor settings default initialization
  (PUP-10287) mailalias: comma inside commands fix
  (PUP-10227) Close the HTTP connection

 Conflicts:
	lib/puppet/defaults.rb
	lib/puppet/network/http/pool.rb
	lib/puppet/provider/mailalias/aliases.rb
	spec/fixtures/integration/provider/mailalias/aliases/test1
	spec/unit/network/http/connection_spec.rb

Mailalias was removed in puppet 6

Replaced `Puppet.settings` with `settings` in:

    settings.override_default(:catalog_cache_terminus, :store_configs)

Updates the nocache_pool to finish the connection if it's been started. In
5.5.x, the nocache pool did not explicitly start and finish connections, but
that was modified in d46a3b1.
Previously our default value of strict_hostname_checking was false which
allowed matching dotted segments of a nodes certname (its CN in its
certificate) as well as the segments of its fqdn fact, or hostname +
domain fact.

This was for compatibility when fact based classification within a
site.pp was a more common pattern and node declarations were much less
powerful than they are now.

With the ability to use regular expressions in a node declaration the
auto segmenting is no longer needed and with the ability to use facts
directly, to use fact interpetation in hiera lookups, or create a custom
external node classifier the injecting of facts into the nodes "name" is
unneeded.

The desire is to remove the setting completely in Puppet 7, while
leaving it in 6 so those that depend on this behavior have time to
re-write their site.pps to the newer styles.

strict_hostname_checking setting is not marked deprecated completely
because it will cause deprecation notices on setting access, which
happens as part of normal compilation for now. However it does mark
"node_name" setting as deprecated completely because it is now only
referenced in code that by default will not run (and will only run if
users change strict_hostname_checking back to false).

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
(maint) Merge 5.5.x to 6.4.x

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
(PUP-10238) Change default value of strict_hostname_checking to true
* upstream/5.5.x:
  (PUP-10238) Change default value of strict_hostname_checking to true
* upstream/6.4.x:
  (PUP-10238) Change default value of strict_hostname_checking to true
  Revert "(PUP-10142) Add white space for #initialize_default_settings!"
  (PUP-10227) Preserve expectation for http.finish
  (PUP-10142) Add white space for #initialize_default_settings!
  (PUP-10142) Refactor settings default initialization
  (PUP-10287) mailalias: comma inside commands fix
  (PUP-10227) Close the HTTP connection

Conflicts:
	lib/puppet/defaults.rb

Conflict due to new facterng setting in master. Remove "dynamic constant
assignment" rubocop error.
@joshcooper joshcooper requested review from a team February 12, 2020 01:20
@joshcooper joshcooper merged commit 6e66cdb into puppetlabs:master Feb 12, 2020
@joshcooper joshcooper deleted the 64x_master_mergeup branch February 12, 2020 02:55
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.

None yet

6 participants