Jira (FACT-3091) Facter is missing the sys-filesystems gem

12 views
Skip to first unread message

Tim Meusel (Jira)

unread,
Nov 9, 2021, 3:25:03 AM11/9/21
to puppe...@googlegroups.com
Tim Meusel created an issue
 
Facter / Bug FACT-3091
Facter is missing the sys-filesystems gem
Issue Type: Bug Bug
Assignee: Unassigned
Created: 2021/11/09 12:24 AM
Priority: Normal Normal
Reporter: Tim Meusel

Hi,
facter uses the sys-filesystems gem to create the mountpoints facts. The gem isn't listed as a dependency in the gemspec file. facter also doesn't provide any error message if the gem is missing, it just doesn't provide the mounpoints fact. This leads to some unexpected behaviour. Facterdb got some factsets where those facts were missing which killed some CI pipelines that depend on it. Also bolt user mentioned that the fact is missing within bolt but works within Puppet AIO. Because Puppet AIO vendored sys-filesystems explicitly.

While I understand that sys-filesystems has native extensions and take slightly more time to install and requires a compiler, I still think that this behaviour is a bug and should be fixed by either replacing the gem with something else, or by adding it to the gemspec.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.13.2#813002-sha1:c495a97)
Atlassian logo

Ciprian Badescu (Jira)

unread,
Dec 13, 2021, 6:27:01 AM12/13/21
to puppe...@googlegroups.com
Ciprian Badescu commented on Bug FACT-3091
 
Re: Facter is missing the sys-filesystems gem

We think that adding sys-filesystems dependency will make life harder for many facter 4 gem users which don't have ruby-dev and compiler installer or available.

A solution for this would be to port the facter2 implementation to facter 4 and use it in one of the following ways:
1. use facter2 implementation and remove sys-filesystems dependency
2. keep sys-filesystems and fallback to facter 2 implementation if sys-filesystems is not available.

Due to other issues demanding precedence, we don’t anticipate being able to address this any time soon

This message was sent by Atlassian Jira (v8.20.2#820002-sha1:829506d)
Atlassian logo

Tim Meusel (Jira)

unread,
Jan 13, 2022, 5:16:01 AM1/13/22
to puppe...@googlegroups.com
Tim Meusel commented on Bug FACT-3091

Is there any documentation about those gems? I'm the package maintainer for facter on Arch Linux. For ruby stuff I usually get all deps from the gemspec/gemfile. We had a few issues in the past on facter where some gems aren't a hard requirement but provide additional facts when available.

Tim Meusel (Jira)

unread,
Feb 11, 2022, 7:30:02 AM2/11/22
to puppe...@googlegroups.com
Tim Meusel commented on Bug FACT-3091

This came up on IRC again. We found https://tickets.puppetlabs.com/browse/FACT-3106. Due to this the factsets in facterdb are inconsistent. Because you don't pull in all the depencencies/not even document it. Can you please fix this?

Josh Cooper (Jira)

unread,
Feb 15, 2022, 5:18:02 PM2/15/22
to puppe...@googlegroups.com
Josh Cooper commented on Bug FACT-3091

Hi bastelfreak our options are limited because of native extensions. If we add sys-filesystem as a hard dependency, then you won't be able to "gem install facter" unless 1) you have ruby-dev and compiler installed or 2) there is a precompiled version of ffi on rubygems.org (as there are for Windows and JRuby).

We opted for a compromise, so sys-filesystem is a soft dependency. That way you can always "gem install facter", but you won't get all of the functionality until the dependency is installed.

We do document that the `mountpoints` facts won't be resolved unless ffi is installed: https://github.com/puppetlabs/facter#requirements though that should probably be updated to say you need sys-filesystems and ffi. We'd welcome PRs to facter to document the requirements more clearly, but we don't have plans on changing facter's hard dependencies. I'd also be fine emitting a warning if mountpoints facts are omitted because the sys-filesystem dependency is missing.

Reply all
Reply to author
Forward
0 new messages