Jira (FACT-3157) Comply: Defect

2 views
Skip to first unread message

otheus (Jira)

unread,
Oct 7, 2022, 9:44:03 AM10/7/22
to puppe...@googlegroups.com
otheus created an issue
 
Facter / Bug FACT-3157
Comply: Defect
Issue Type: Bug Bug
Affects Versions: FACT 3.14.23
Assignee: Unassigned
Components: Facter 3
Created: 2022/10/07 6:42 AM
Environment:

Seen in :

  • RedHat / CentOS 7
  • RedHat / CentOS 8
Priority: Normal Normal
Reporter: otheus

Facter 3.14 is 80x slower compared to facter 2.x. when requesting a single fact. Analysis indicates that all facts are processed and evaluated, not only the ones requested.

The facter command should evaluate only those facts requested on the command line.

From facter 2.4.6

time facter -p operatingsystem
RedHat
 
real    0m0.754s
user    0m0.525s
sys     0m0.075s

From 3.14.24:

# time facter -p operatingsystem
RedHat
 
real    0m8.166s
user    0m6.533s
sys     0m1.084s

v3.14, without `-p`...

RedHat
 
real    0m0.207s
user    0m0.182s
sys     0m0.025s

v3.14, with -p but non-root:

2022-10-07 14:22:42.150228 WARN  puppetlabs.facter - skipping external facts for "/home/XXXX/.puppetlabs/opt/puppet/cache/facts.d": No such file or directory
RedHat
 
real    0m1.115s
user    0m0.969s
sys     0m0.131s

Using Ruby (as root) to retrieve core fact:

time /opt/puppetlabs/puppet/bin/ruby -rfacter -e 'p Facter.value("operatingsystem");'
"RedHat"
 
real    0m0.105s
user    0m0.091s
sys     0m0.014s

Using facter -p (as root) evaluating a "fast" puppet-sync fact:

# time facter -p service_provider
systemd
 
real    0m8.297s
user    0m6.534s
sys     0m1.175s

Using ruby directly to retrieve puppet-sync'd fact:

# export FACTERLIB=/opt/puppetlabs/puppet/cache/lib/facter; time /opt/puppetlabs/puppet/bin/ruby -rfacter -e 'p Facter.value("service_provider");'
"systemd"
 
real    0m1.184s
user    0m1.045s
sys     0m0.137s

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.20.11#820011-sha1:0629dd8)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages