Jira (FACT-1887) Facter takes very long to run on systems with huge amounts of ZFS filesystems

2 views
Skip to first unread message

Peter Eriksson (JIRA)

unread,
Oct 2, 2018, 10:37:06 AM10/2/18
to puppe...@googlegroups.com
Peter Eriksson created an issue
 
Facter / Improvement FACT-1887
Facter takes very long to run on systems with huge amounts of ZFS filesystems
Issue Type: Improvement Improvement
Affects Versions: FACT 3.11.1
Assignee: Unassigned
Created: 2018/10/02 7:36 AM
Environment:

FreeBSD 11.2

Priority: Normal Normal
Reporter: Peter Eriksson

The code in Facter that retrieves the ZFS filesystem version is using the command "zfs upgrade" which prints the (hardcoded into the "zfs" binary) version number - and then checks all the filesystems in the computer. Something that sometimes takes a loooooooong time on big servers with a lot of filesystems (hours on one with >88000 ZFS filesystems...)

On FreeBSD a much better way to get the ZFS version is using the "sysctl" command:

  sysctl vs.zfs.version.zpl

(Which also returns the ZFS version in use in the kernel and nu just the precompiled version number in the zfs binary)

It would be nice if there was some way to disable the Facter code that tries to list all the filesystems on these machines (we binary-patched away the "/sbin/zfs list" call (since that many filesystems broke the PuppetDB - the facts got too big) in the Facter binary, but the ZFS version check seems to be somewhere else...

 

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo

Scott McClellan (JIRA)

unread,
Oct 15, 2018, 2:23:04 PM10/15/18
to puppe...@googlegroups.com

Scott McClellan (JIRA)

unread,
Oct 15, 2018, 2:24:05 PM10/15/18
to puppe...@googlegroups.com

Scott McClellan (JIRA)

unread,
Oct 15, 2018, 2:24:05 PM10/15/18
to puppe...@googlegroups.com

Branan Riley (JIRA)

unread,
Oct 15, 2018, 2:29:03 PM10/15/18
to puppe...@googlegroups.com
Branan Riley commented on Improvement FACT-1887
 
Re: Facter takes very long to run on systems with huge amounts of ZFS filesystems

Hi,

It sounds like we may just need to add ZFS to the list of blockable resolvers in facter.conf (https://puppet.com/docs/facter/3.9/configuring_facter.html) - does that sound like it would solve your problem?

Peter Eriksson (JIRA)

unread,
Oct 16, 2018, 9:52:04 AM10/16/18
to puppe...@googlegroups.com

Yes, that would probably be a good solution for us.

 

But please note that there are two different code paths in Facter that calls code that would trigger a slow walk thru of all the ZFS filesystems - "/sbin/zfs list" (compiled into the "Facter" binary) and "zfs upgrade" (in some Ruby code).

 

Josh Cooper (Jira)

unread,
Apr 26, 2023, 4:28:01 PM4/26/23
to puppe...@googlegroups.com
Josh Cooper updated an issue
 
Change By: Josh Cooper
Team: Platform OS Phoenix
This message was sent by Atlassian Jira (v8.20.11#820011-sha1:0629dd8)
Atlassian logo

Josh Cooper (Jira)

unread,
Apr 26, 2023, 4:30:03 PM4/26/23
to puppe...@googlegroups.com
Josh Cooper commented on Improvement FACT-1887
 
Re: Facter takes very long to run on systems with huge amounts of ZFS filesystems

Facter 3 is EOL, but Facter 4 calls zfs upgrade -v so would be subject to the same problem. Since it's possible to block zfs related facts, I'm going to close this. But if you'd like to contribute a pull request, then please do and reopen this ticket.

Reply all
Reply to author
Forward
0 new messages