Jira (FACT-3170) Facter resolves facts multiple times when providers are confined based on facts, especially on Windows

32 views
Skip to first unread message

Josh Cooper (Jira)

unread,
Jan 9, 2023, 2:56:02 PM1/9/23
to puppe...@googlegroups.com
Josh Cooper updated an issue
 
Facter / Bug FACT-3170
Facter resolves facts multiple times when providers are confined based on facts, especially on Windows
Change By: Josh Cooper
Issue Type: Improvement Bug
Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.20.11#820011-sha1:0629dd8)
Atlassian logo

Josh Cooper (Jira)

unread,
Jan 9, 2023, 2:56:02 PM1/9/23
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Summary: Debug output Facter resolves facts multiple times when providers are confined based on facts, especially on Windows nodes shows the same Facter logs repeated

Morgan Rhodes (Jira)

unread,
Jan 18, 2023, 1:38:01 PM1/18/23
to puppe...@googlegroups.com

Morgan Rhodes (Jira)

unread,
Jan 18, 2023, 1:38:01 PM1/18/23
to puppe...@googlegroups.com

Morgan Rhodes (Jira)

unread,
Jan 18, 2023, 1:39:03 PM1/18/23
to puppe...@googlegroups.com

Christopher Thorn (Jira)

unread,
Jan 23, 2023, 2:59:02 PM1/23/23
to puppe...@googlegroups.com

Christopher Thorn (Jira)

unread,
Jan 23, 2023, 7:07:05 PM1/23/23
to puppe...@googlegroups.com
Christopher Thorn assigned an issue to Unassigned

Josh Cooper (Jira)

unread,
Jan 24, 2023, 12:06:03 PM1/24/23
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Jan 26, 2023, 1:48:03 PM1/26/23
to puppe...@googlegroups.com
Josh Cooper commented on Bug FACT-3170
 
Re: Facter resolves facts multiple times when providers are confined based on facts, especially on Windows

Once we have puppet-agent packages with this change, it would be good to verify the issue is resolved on Windows. This is an easy way to trigger the issue because the windows file provider is confined based on the operatingsystem fact:

Integer[0, 10000].each |$i| {
  file { "C:/tmp/file$i":
    ensure => present
  }
}

Josh Cooper (Jira)

unread,
Jan 27, 2023, 5:29:03 PM1/27/23
to puppe...@googlegroups.com
Josh Cooper commented on Bug FACT-3170

Using the above manifest, I verified puppet 7.23 performance is equivalent to 6.28 when managing 10k files:

version first run second run
6.28.0 1m6.510s 0m40.995s
7.21.0 3m34.362s 3m21.297s
7.23.0 1m2.110s 0m40.705s

And facts are not "reresolved" while applying the catalog:

Notice: Compiled catalog for ornate-pemmican.delivery.puppetlabs.net in environment production in 0.04 seconds
Debug: Found in cache :production (ttl = 0 sec)
Debug: Creating default schedules
Debug: Loaded state in 1.99 seconds
Info: Using environment 'production'
Debug: Loaded state in 1.98 seconds
Info: Applying configuration version '1674858422'
Debug: Finishing transaction 13440
Debug: Storing state
Debug: Pruned old state cache entries in 0.01 seconds
Debug: Stored state in 1.32 seconds

Christopher Thorn (Jira)

unread,
Feb 3, 2023, 12:41:02 PM2/3/23
to puppe...@googlegroups.com
Christopher Thorn updated an issue
 
Change By: Christopher Thorn
Release Notes: Bug Fix
Release Notes Summary: Facter 4 previously was not looking to use any cache information when looking up a fact or value Facter methods. We have resolved that to now use cache information when using the fact or value methods.

Ingrida Cazers (Jira)

unread,
Mar 22, 2023, 4:28:02 PM3/22/23
to puppe...@googlegroups.com
Ingrida Cazers commented on Bug FACT-3170
 
Re: Facter resolves facts multiple times when providers are confined based on facts, especially on Windows

I'm preparing to document this fix in the PE release notes. Does the fix also have to be documented in the Facter release notes?

https://www.puppet.com/docs/puppet/7/release_notes_facter.html#release_notes_facter

If so, does the development team handle the update in the Facter release notes?

Ingrida Cazers (Jira)

unread,
Mar 27, 2023, 6:27:02 PM3/27/23
to puppe...@googlegroups.com

Josh Cooper

I did some research and found that the fixed issue is already documented in the Facter 4.3.0 release notes:
https://www.puppet.com/docs/puppet/7/release_notes_facter.html#release_notes_facter_4-3-0

Now, I want to document the same fix in the PE release notes for 2023.1 and 2021.7.3. Is the following text correct?

Performance issue with Puppet agent runtimes is resolved

After an upgrade from PE 2019.8.12 to PE 2021.7.1, some users saw a significant increase in Puppet agent runtimes. The increase was caused by Facter 4, which was not using cached information to resolve facts. As a result, facts were resolved multiple times. The issue is now resolved to normalize the performance of the Puppet agent.

Ingrida Cazers (Jira)

unread,
Apr 10, 2023, 5:17:02 PM4/10/23
to puppe...@googlegroups.com

The text for the PE release notes was approved by Josh in a Slack conversation.

Ingrida Cazers (Jira)

unread,
Apr 10, 2023, 5:19:02 PM4/10/23
to puppe...@googlegroups.com

Ingrida Cazers (Jira)

unread,
Apr 10, 2023, 5:20:03 PM4/10/23
to puppe...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages