Jira (PUP-10940) 'puppet facts diff' logs error when apt module is installed

17 views
Skip to first unread message

Ciprian Badescu (Jira)

unread,
Feb 24, 2021, 9:32:02 AM2/24/21
to puppe...@googlegroups.com
Ciprian Badescu created an issue
 
Puppet / Bug PUP-10940
'puppet facts diff' logs error when apt module is installed
Issue Type: Bug Bug
Assignee: Ciprian Badescu
Created: 2021/02/24 6:31 AM
Priority: Normal Normal
Reporter: Ciprian Badescu

Platforms: OS X, Centos 7 (as tested by me), might be on all
pupptlabs-apt: 7.7.1(latest)

Step to reproduce:

  • install latest puppet 6
  • install puppetlabs-apt module
  • run `puppet facts diff`

❯ puppet --version
6.21.1
❯ puppet facts diff
{"hypervisors.vmware.version":{"new_value":"ESXi 6.7","old_value":""}}
 
❯ puppet module install puppetlabs-stdlib
Notice: Preparing to install into /etc/puppetlabs/code/environments/production/modules ...
Notice: Downloading from https://forgeapi.puppet.com ...
Notice: Installing -- do not interrupt ...
/etc/puppetlabs/code/environments/production/modules
└── puppetlabs-stdlib (v6.6.0)
 
❯ puppet facts diff
{"hypervisors.vmware.version":{"new_value":"ESXi 6.7","old_value":""}}
 
❯ puppet module install puppetlabs-apt
Notice: Preparing to install into /etc/puppetlabs/code/environments/production/modules ...
Notice: Downloading from https://forgeapi.puppet.com ...
Notice: Installing -- do not interrupt ...
/etc/puppetlabs/code/environments/production/modules
└─┬ puppetlabs-apt (v7.7.1)
  ├── puppetlabs-stdlib (v6.6.0)
  └── puppetlabs-translate (v2.2.0)
 
❯ puppet facts diff
E, [2021-02-17T07:14:34.049701 #1797] ERROR -- : Facter - Error while resolving custom fact fact='apt_package_updates', resolution='<anonymous>': undefined method `[]' for nil:NilClass
E, [2021-02-17T07:14:34.051667 #1797] ERROR -- : Facter - Error while resolving custom fact fact='apt_package_dist_updates', resolution='<anonymous>': undefined method `[]' for nil:NilClass
E, [2021-02-17T07:14:34.053433 #1797] ERROR -- : Facter - Error while resolving custom fact fact='apt_package_security_updates', resolution='<anonymous>': undefined method `[]' for nil:NilClass
E, [2021-02-17T07:14:34.055293 #1797] ERROR -- : Facter - Error while resolving custom fact fact='apt_package_security_dist_updates', resolution='<anonymous>': undefined method `[]' for nil:NilClass
E, [2021-02-17T07:14:34.057133 #1797] ERROR -- : Facter - Error while resolving custom fact fact='apt_updates', resolution='<anonymous>': undefined method `[]' for nil:NilClass
E, [2021-02-17T07:14:34.058807 #1797] ERROR -- : Facter - Error while resolving custom fact fact='apt_dist_updates', resolution='<anonymous>': undefined method `[]' for nil:NilClass
E, [2021-02-17T07:14:34.060489 #1797] ERROR -- : Facter - Error while resolving custom fact fact='apt_security_updates', resolution='<anonymous>': undefined method `[]' for nil:NilClass
E, [2021-02-17T07:14:34.062122 #1797] ERROR -- : Facter - Error while resolving custom fact fact='apt_security_dist_updates', resolution='<anonymous>': undefined method `[]' for nil:NilClass
{"hypervisors.vmware.version":{"new_value":"ESXi 6.7","old_value":""}}

/opt/puppetlabs/puppet/bin/facter-ng does not log any error so most likely it happens when resolving the facts added in puppet form modules.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)
Atlassian logo

Ciprian Badescu (Jira)

unread,
Feb 25, 2021, 2:35:01 AM2/25/21
to puppe...@googlegroups.com

Ciprian Badescu (Jira)

unread,
Feb 25, 2021, 2:36:01 AM2/25/21
to puppe...@googlegroups.com

Ciprian Badescu (Jira)

unread,
Feb 26, 2021, 2:16:03 AM2/26/21
to puppe...@googlegroups.com
Ciprian Badescu updated an issue
Change By: Ciprian Badescu
Release Notes: Bug Fix
Release Notes Summary: Before this commit, `puppet facts diff` which is comparing facter 3 and facter 4 facts, didn't run facter 4 in a clean environment, leading to undefined behavior for custom facts resolving

With this commit, puppet 4 facts are read running `puppet facts` in a new shell and the custom facts should be correctly resolved

Josh Cooper (Jira)

unread,
Mar 1, 2021, 2:51:01 PM3/1/21
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Mar 1, 2021, 2:54:01 PM3/1/21
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Mar 2, 2021, 7:18:57 PM3/2/21
to puppe...@googlegroups.com

Claire Cadman (Jira)

unread,
Mar 10, 2021, 10:30:03 AM3/10/21
to puppe...@googlegroups.com

Luchian Nemes (Jira)

unread,
Apr 14, 2021, 8:48:05 AM4/14/21
to puppe...@googlegroups.com
Luchian Nemes updated an issue
Change By: Luchian Nemes
Fix Version/s: PUP 7.5.0
This message was sent by Atlassian Jira (v8.13.2#813002-sha1:c495a97)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages