Jira (FACT-3116) facter fails when using cached facts in a read-only filesystem

1 view
Skip to first unread message

Alfredo Moralejo (Jira)

unread,
Apr 26, 2022, 12:57:03 PM4/26/22
to puppe...@googlegroups.com
Alfredo Moralejo created an issue
 
Facter / Bug FACT-3116
facter fails when using cached facts in a read-only filesystem
Issue Type: Bug Bug
Affects Versions: FACT 4.2.8
Assignee: Unassigned
Components: Facter 4
Created: 2022/04/26 9:56 AM
Priority: Major Major
Reporter: Alfredo Moralejo

When using cached facts in a read-only filesystem, facter fails with error:

[root@a41691fe3b11 ~]# facter --config facter.conf --debug
[2022-04-26 16:00:36.720327 ] INFO Facter - executed with command line: --config facter.conf --debug
[2022-04-26 16:00:36.720370 ] DEBUG Facter - Facter version: 4.2.8
[2022-04-26 16:00:36.720386 ] DEBUG Facter - blocking collection of EC2 facts
[2022-04-26 16:00:36.720436 ] DEBUG Facter::ClassDiscoverer - There is no module named Centos
[2022-04-26 16:00:36.722209 ] DEBUG Facter::FactManager - Resolving facts sequentially
[2022-04-26 16:00:36.723969 ] DEBUG Facter::FactLoader - Loading all internal facts
[2022-04-26 16:00:36.728158 ] DEBUG Facter::FactLoader - Loading custom facts
[2022-04-26 16:00:36.729015 ] DEBUG Facter::FactLoader - Loading external facts
/usr/share/gems/gems/facter-4.2.8/lib/facter/framework/core/cache_manager.rb:229:in `delete': Read-only file system @ apply2files - /opt/puppetlabs/facter/cache/cached_facts/operating system (Errno::EROFS)
from /usr/share/gems/gems/facter-4.2.8/lib/facter/framework/core/cache_manager.rb:229:in `delete_cache'
from /usr/share/gems/gems/facter-4.2.8/lib/facter/framework/core/cache_manager.rb:99:in `read_fact'
from /usr/share/gems/gems/facter-4.2.8/lib/facter/framework/core/cache_manager.rb:76:in `resolve_fact'
from /usr/share/gems/gems/facter-4.2.8/lib/facter/framework/core/cache_manager.rb:17:in `block in resolve_facts'
from /usr/share/gems/gems/facter-4.2.8/lib/facter/framework/core/cache_manager.rb:16:in `delete_if'
from /usr/share/gems/gems/facter-4.2.8/lib/facter/framework/core/cache_manager.rb:16:in `resolve_facts'
from /usr/share/gems/gems/facter-4.2.8/lib/facter/framework/core/fact_manager.rb:22:in `resolve_facts'
from /usr/share/gems/gems/facter-4.2.8/lib/facter.rb:521:in `resolve_facts_for_user_query'
from /usr/share/gems/gems/facter-4.2.8/lib/facter.rb:454:in `to_user_output'
from /usr/share/gems/gems/facter-4.2.8/lib/facter/framework/cli/cli.rb:124:in `query'
from /usr/share/gems/gems/thor-1.1.0/lib/thor/command.rb:27:in `run'
from /usr/share/gems/gems/thor-1.1.0/lib/thor/invocation.rb:127:in `invoke_command'
from /usr/share/gems/gems/thor-1.1.0/lib/thor.rb:392:in `dispatch'
from /usr/share/gems/gems/thor-1.1.0/lib/thor/base.rb:485:in `start'
from /usr/share/gems/gems/facter-4.2.8/lib/facter/framework/cli/cli_launcher.rb:23:in `start'
from /usr/bin/facter:10:in `<main>'

I'm running this in a centos8 container and my facter.conf file is:

facts : {
blocklist: [ "EC2" ],
cache: true
ttls: [

{ "kernel" : 8 hour }

,

{ "memory" : 8 hour }

,

{ "networking" : 8 hour }

,

{ "operating system" : 8 hour }

,

{ "processor" : 8 hour }

,
]
}

Note this worked fine with facter 3.14.

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

Nirupama Mantha (Jira)

unread,
Apr 26, 2022, 4:14:01 PM4/26/22
to puppe...@googlegroups.com

Nirupama Mantha (Jira)

unread,
Apr 26, 2022, 4:15:02 PM4/26/22
to puppe...@googlegroups.com

Nirupama Mantha (Jira)

unread,
Apr 26, 2022, 4:16:03 PM4/26/22
to puppe...@googlegroups.com
Nirupama Mantha updated an issue
Change By: Nirupama Mantha
Acceptance Criteria: Add a spec test and match the behavior in Facter 3

Nirupama Mantha (Jira)

unread,
Apr 26, 2022, 4:17:02 PM4/26/22
to puppe...@googlegroups.com

Alfredo Moralejo (Jira)

unread,
Apr 27, 2022, 2:41:03 AM4/27/22
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Apr 29, 2022, 2:23:01 PM4/29/22
to puppe...@googlegroups.com
Josh Cooper updated an issue
 
Change By: Josh Cooper
When using cached facts in a read-only filesystem, facter fails with error:

{noformat}
{noformat}

I'm running this in a centos8 container and my facter.conf file is:

{code:hocon}
facts : {
    blocklist: [ "EC2" ],
    cache: true
    ttls: [
      { "kernel" : 8 hour },
      { "memory" : 8 hour },
      { "networking" : 8 hour },
      { "operating system" : 8 hour },
      { "processor" : 8 hour },
    ]
  }   
{code}

Note this worked fine with facter 3.14.

Josh Cooper (Jira)

unread,
May 11, 2022, 5:29:01 PM5/11/22
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Release Notes: Bug Fix
Release Notes Summary: Facter no longer errors when using cached facts from a read-only filesystem.

Josh Cooper (Jira)

unread,
May 11, 2022, 5:31:01 PM5/11/22
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
May 11, 2022, 6:19:02 PM5/11/22
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Release Notes Summary:
Facter no longer errors when using cached facts from a read-only filesystem.

Community contribution from https://github.com/kajinamit

Parker Leach (Jira)

unread,
May 24, 2022, 11:03:03 PM5/24/22
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Feb 24, 2023, 2:33:02 PM2/24/23
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Labels: docs_reviewed regression
This message was sent by Atlassian Jira (v8.20.11#820011-sha1:0629dd8)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages