Jira (FACT-3186) facter 4.2.13: bug "facter partitions"

42 views
Skip to first unread message

Diana Scannicchio (Jira)

unread,
Feb 14, 2023, 10:02:04 AM2/14/23
to puppe...@googlegroups.com
Diana Scannicchio created an issue
 
Facter / Bug FACT-3186
facter 4.2.13: bug "facter partitions"
Issue Type: Bug Bug
Affects Versions: FACT 4.2.13
Assignee: Unassigned
Components: Facter 4
Created: 2023/02/14 7:01 AM
Fix Versions: FACT 4.2.13
Priority: Normal Normal
Reporter: Diana Scannicchio

Dear all,

we do run "puppet apply" on diskless nodes and in moving to Puppet 7.20 and therefore facter 4.2.13 we noticed a possible bug executing "facter"  that appears only on diskless nodes where there is no partition.
I tried multiple time to report that issue in December 2022, but Jira did not allow so far to create an account.

[my_hostname] facter partitions

[2022-12-01 08:49:13.828011 ] ERROR Facter::InternalFactManager - undefined method `[]' for nil:NilClass

It seems the code in

/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/facter/facts/linux/partitions.rb

does not foreseen to have a diskless node so an empty lis (line 18).

It would be nice to have this addressed, not to get the following error from hundreds nodes

Error: Facter: undefined method `[]' for nil:NilClass

 

Thank you and best regards,

Diana Scannicchio

CERN ATLAS TDAQ SysAdmin

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.20.11#820011-sha1:0629dd8)
Atlassian logo

Josh Cooper (Jira)

unread,
Feb 14, 2023, 4:13:02 PM2/14/23
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Labels: needs-validation regression

Josh Cooper (Jira)

unread,
Feb 14, 2023, 4:13:02 PM2/14/23
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Labels: regression

Josh Cooper (Jira)

unread,
Feb 14, 2023, 4:13:02 PM2/14/23
to puppe...@googlegroups.com
Josh Cooper updated an issue
Dear all,

we do run "puppet apply" on diskless nodes and in moving to Puppet 7.20 and therefore facter 4.2.13 we noticed a possible bug executing "facter"  that appears only on diskless nodes where there is no partition.
I tried multiple time to report that issue in December 2022, but Jira did not allow so far to create an account.

{noformat}
[my_hostname] facter partitions

[2022-12-01 08:49:13.828011 ] ERROR Facter::InternalFactManager - undefined method `[]' for nil:NilClass
{noformat}

It seems the code in

/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/facter/facts/linux/partitions.rb

does not foreseen to have a diskless node so an empty lis (line 18).

It would be nice to have this addressed, not to get the following error from hundreds nodes

{noformat}
Error: Facter: undefined method `[]' for nil:NilClass
{noformat}
 

Thank you and best regards,

Diana Scannicchio

CERN ATLAS TDAQ SysAdmin

Josh Cooper (Jira)

unread,
Feb 14, 2023, 4:14:02 PM2/14/23
to puppe...@googlegroups.com
Josh Cooper updated an issue
Dear all,

we do run "puppet apply" on diskless nodes and in moving to Puppet 7.20 and therefore facter 4.2.13 we noticed a possible bug executing "facter"  that appears only on diskless nodes where there is no partition.
I tried multiple time to report that issue in December 2022, but Jira did not allow so far to create an account.

{noformat}
[my_hostname] facter partitions
[2022-12-01 08:49:13.828011 ] ERROR Facter::InternalFactManager - undefined method `[]' for nil:NilClass
{noformat}

It seems the code in


https: / opt / github.com/ puppetlabs/ puppet facter / lib blob / ruby 7eb6e268f2b6e317d0ea35ceff642c3986d6019b / vendor_ruby lib /facter/facts/linux/partitions.rb #L18

does not foreseen to have a diskless node so an empty lis (line 18).

It would be nice to have this addressed, not to get the following error from hundreds nodes

{noformat}
Error: Facter: undefined method `[]' for nil:NilClass
{noformat}
 

Thank you and best regards,

Diana Scannicchio

CERN ATLAS TDAQ SysAdmin

Josh Cooper (Jira)

unread,
Feb 14, 2023, 4:16:03 PM2/14/23
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Epic Link: PUP-11659

Josh Cooper (Jira)

unread,
Feb 14, 2023, 4:16:06 PM2/14/23
to puppe...@googlegroups.com
Josh Cooper commented on Bug FACT-3186
 
Re: facter 4.2.13: bug "facter partitions"

Diana Scannicchio could you confirm that you migrated from Puppet 6.x (facter 3.x) to Puppet 7.20? We'd like to understand how facter was handling this situation before.

Diana Scannicchio (Jira)

unread,
Feb 15, 2023, 10:47:03 AM2/15/23
to puppe...@googlegroups.com

Hi Josh,

I actually migrated from Puppet 5.5. to Puppet 7.20.

Before that we did not have that issue.
Thank you for your help, please let me know if I can provide further information.

Cheers,

Diana

Diana Scannicchio (Jira)

unread,
Feb 15, 2023, 10:50:02 AM2/15/23
to puppe...@googlegroups.com
Diana Scannicchio updated an issue
 
Change By: Diana Scannicchio
Dear all,

we do run "puppet apply" on diskless nodes and in moving to Puppet 7.20 and therefore facter 4.2.13 we noticed a possible bug executing "facter"  that appears only on diskless nodes where there is no partition.
I tried multiple time to report that issue in December 2022, but Jira did not allow so far to create an account.

{noformat}
[my_hostname] facter partitions
[2022-12-01 08:49:13.828011 ] ERROR Facter::InternalFactManager - undefined method `[]' for nil:NilClass
{noformat}

It seems the code in [ https://github.com/puppetlabs/facter/blob/7eb6e268f2b6e317d0ea35ceff642c3986d6019b/lib/facter/facts/linux/partitions.rb#L18 ]

does not foreseen to have a diskless node so an empty
lis list (line 18).


It would be nice to have this addressed, not to get the following error from hundreds nodes

{noformat}
Error: Facter: undefined method `[]' for nil:NilClass
{noformat}
 

Thank you and best regards,

Diana Scannicchio

CERN ATLAS TDAQ SysAdmin

Diana Scannicchio (Jira)

unread,
Feb 23, 2023, 8:28:03 AM2/23/23
to puppe...@googlegroups.com
 
Re: facter 4.2.13: bug "facter partitions"

Josh Cooper did you get my update? would you like to get some more details?

Thank you,

Diana

Josh Cooper (Jira)

unread,
Mar 21, 2023, 9:48:02 PM3/21/23
to puppe...@googlegroups.com
Josh Cooper updated an issue
 
Change By: Josh Cooper
Priority: Normal High

Josh Cooper (Jira)

unread,
May 3, 2023, 5:42:02 PM5/3/23
to puppe...@googlegroups.com
Josh Cooper commented on Bug FACT-3186
 
Re: facter 4.2.13: bug "facter partitions"

Diana Scannicchio could you run this script and attach the output (scrubbed) Also can you describe how you're setting up the mountpoints and partitions?

require 'facter'
require 'pp'
 
pp Facter::Resolvers::Mountpoints.resolve(:mountpoints)

Then run: /opt/puppetlabs/puppet/bin/ruby test.rb

Diana Scannicchio (Jira)

unread,
May 9, 2023, 4:49:02 AM5/9/23
to puppe...@googlegroups.com

Hi Josh Cooper ,

as mentioned there is no disk on the node which is netbooted, the OS is in memory:

[root@sbc-tbed-717 ~]# df -hl
Filesystem      Size  Used Avail Use% Mounted on
none            512M  136M  377M  27% /
devtmpfs        1.9G     0  1.9G   0% /dev
tmpfs           1.9G  112M  1.8G   6% /run
tmpfs           100K  4.0K   96K   4% /dev/shm
tmpfs           100K     0  100K   0% /mnt
tmpfs           1.9G     0  1.9G   0% /sys/fs/cgroup
/tmpfs           64M     0   64M   0% /var/atlas
AFS             2.0T     0  2.0T   0% /afs
tmpfs           374M     0  374M   0% /run/user/42056
tmpfs           374M     0  374M   0% /run/user/0

 

Puppet apply is run

puppet apply $PUPOPT --config=/mnt/bwm/prod/puppet/puppet.conf --onetime --no-daemonize $@ /mnt/bwm/prod/puppet//manifests/ --modulepath=/mnt/bwm/atds_puppet_modules_macro

The area is mounted like that

tbed-storage-bwm:/exports/bwm on /mnt/bwm type nfs4 (ro,noatime,vers=4.1,rsize=32768,wsize=32768,namlen=255,soft,proto=tcp,timeo=100,retrans=2,sec=sys,clientaddr=10.193.24.19,local_lock=none,addr=10.193.2.105)

I pasted below the output of the script you suggested. Note "nil" in the first line cause by the issue described.

Thank you very much abd cheers,

Diana

 

[root@sbc-tbed-717 ~]# /opt/puppetlabs/puppet/bin/ruby test.rb
nil
[{:device=>"10.193.2.107:/clients/cc7/79_20221130/x86_64",
  :filesystem=>"nfs4",
  :path=>"/readonly",
  :options=>
   ["rw",
    "relatime",
    "vers=4.1",
    "rsize=1048576",
    "wsize=1048576",
    "namlen=255",
    "hard",
    "proto=tcp",
    "timeo=600",
    "retrans=2",
    "sec=sys",
    "clientaddr=10.193.24.19",
    "local_lock=none",
    "addr=10.193.2.107"],
  :size_bytes=>105554903040,
  :available_bytes=>40687894528,
  :used_bytes=>59481522176,
  :capacity=>"59.38%",
  :size=>"98.31 GiB",
  :available=>"37.89 GiB",
  :used=>"55.40 GiB"},
 {:device=>"rpc_pipefs",
  :filesystem=>"rpc_pipefs",
  :path=>"/readonly/var/lib/nfs/rpc_pipefs",
  :options=>["rw", "relatime"],
  :size_bytes=>0,
  :available_bytes=>0,
  :used_bytes=>0,
  :capacity=>"100%",
  :size=>"0 bytes",
  :available=>"0 bytes",
  :used=>"0 bytes"},
 {:device=>"none",
  :filesystem=>"tmpfs",
  :path=>"/",
  :options=>["rw", "relatime", "size=524288k", "nr_inodes=0", "mode=755"],
  :size_bytes=>536870912,
  :available_bytes=>394506240,
  :used_bytes=>142364672,
  :capacity=>"26.52%",
  :size=>"512.00 MiB",
  :available=>"376.23 MiB",
  :used=>"135.77 MiB"},
 {:device=>"10.193.2.107:/clients/cc7/79_20221130/x86_64/usr/bin",
  :filesystem=>"nfs4",
  :path=>"/bin",
  :options=>
   ["rw",
    "relatime",
    "vers=4.1",
    "rsize=1048576",
    "wsize=1048576",
    "namlen=255",
    "hard",
    "proto=tcp",
    "timeo=600",
    "retrans=2",
    "sec=sys",
    "clientaddr=10.193.24.19",
    "local_lock=none",
    "addr=10.193.2.107"],
  :size_bytes=>105554903040,
  :available_bytes=>40687894528,
  :used_bytes=>59481522176,
  :capacity=>"59.38%",
  :size=>"98.31 GiB",
  :available=>"37.89 GiB",
  :used=>"55.40 GiB"},
 {:device=>"10.193.2.107:/clients/cc7/79_20221130/x86_64/boot",
  :filesystem=>"nfs4",
  :path=>"/boot",
  :options=>
   ["rw",
    "relatime",
    "vers=4.1",
    "rsize=1048576",
    "wsize=1048576",
    "namlen=255",
    "hard",
    "proto=tcp",
    "timeo=600",
    "retrans=2",
    "sec=sys",
    "clientaddr=10.193.24.19",
    "local_lock=none",
    "addr=10.193.2.107"],
  :size_bytes=>105554903040,
  :available_bytes=>40687894528,
  :used_bytes=>59481522176,
  :capacity=>"59.38%",
  :size=>"98.31 GiB",
  :available=>"37.89 GiB",
  :used=>"55.40 GiB"},
 {:device=>"devtmpfs",
  :filesystem=>"devtmpfs",
  :path=>"/dev",
  :options=>["rw", "nosuid", "size=1895388k", "nr_inodes=473847", "mode=755"],
  :size_bytes=>1940877312,
  :available_bytes=>1940877312,
  :used_bytes=>0,
  :capacity=>"0%",
  :size=>"1.81 GiB",
  :available=>"1.81 GiB",
  :used=>"0 bytes"},
 {:device=>"10.193.2.107:/clients/cc7/79_20221130/x86_64/usr/lib",
  :filesystem=>"nfs4",
  :path=>"/lib",
  :options=>
   ["rw",
    "relatime",
    "vers=4.1",
    "rsize=1048576",
    "wsize=1048576",
    "namlen=255",
    "hard",
    "proto=tcp",
    "timeo=600",
    "retrans=2",
    "sec=sys",
    "clientaddr=10.193.24.19",
    "local_lock=none",
    "addr=10.193.2.107"],
  :size_bytes=>105554903040,
  :available_bytes=>40687894528,
  :used_bytes=>59481522176,
  :capacity=>"59.38%",
  :size=>"98.31 GiB",
  :available=>"37.89 GiB",
  :used=>"55.40 GiB"},
 {:device=>"10.193.2.107:/clients/cc7/79_20221130/x86_64/usr/lib64",
  :filesystem=>"nfs4",
  :path=>"/lib64",
  :options=>
   ["rw",
    "relatime",
    "vers=4.1",
    "rsize=1048576",
    "wsize=1048576",
    "namlen=255",
    "hard",
    "proto=tcp",
    "timeo=600",
    "retrans=2",
    "sec=sys",
    "clientaddr=10.193.24.19",
    "local_lock=none",
    "addr=10.193.2.107"],
  :size_bytes=>105554903040,
  :available_bytes=>40687894528,
  :used_bytes=>59481522176,
  :capacity=>"59.38%",
  :size=>"98.31 GiB",
  :available=>"37.89 GiB",
  :used=>"55.40 GiB"},
 {:device=>"10.193.2.107:/clients/cc7/79_20221130/x86_64/opt",
  :filesystem=>"nfs4",
  :path=>"/opt",
  :options=>
   ["rw",
    "relatime",
    "vers=4.1",
    "rsize=1048576",
    "wsize=1048576",
    "namlen=255",
    "hard",
    "proto=tcp",
    "timeo=600",
    "retrans=2",
    "sec=sys",
    "clientaddr=10.193.24.19",
    "local_lock=none",
    "addr=10.193.2.107"],
  :size_bytes=>105554903040,
  :available_bytes=>40687894528,
  :used_bytes=>59481522176,
  :capacity=>"59.38%",
  :size=>"98.31 GiB",
  :available=>"37.89 GiB",
  :used=>"55.40 GiB"},
 {:device=>"tmpfs",
  :filesystem=>"tmpfs",
  :path=>"/run",
  :options=>["rw", "nosuid", "nodev", "mode=755"],
  :size_bytes=>1957605376,
  :available_bytes=>1840668672,
  :used_bytes=>116936704,
  :capacity=>"5.97%",
  :size=>"1.82 GiB",
  :available=>"1.71 GiB",
  :used=>"111.52 MiB"},
 {:device=>"10.193.2.107:/clients/cc7/79_20221130/x86_64/usr/sbin",
  :filesystem=>"nfs4",
  :path=>"/sbin",
  :options=>
   ["rw",
    "relatime",
    "vers=4.1",
    "rsize=1048576",
    "wsize=1048576",
    "namlen=255",
    "hard",
    "proto=tcp",
    "timeo=600",
    "retrans=2",
    "sec=sys",
    "clientaddr=10.193.24.19",
    "local_lock=none",
    "addr=10.193.2.107"],
  :size_bytes=>105554903040,
  :available_bytes=>40687894528,
  :used_bytes=>59481522176,
  :capacity=>"59.38%",
  :size=>"98.31 GiB",
  :available=>"37.89 GiB",
  :used=>"55.40 GiB"},
 {:device=>"10.193.2.107:/clients/cc7/79_20221130/x86_64/usr",
  :filesystem=>"nfs4",
  :path=>"/usr",
  :options=>
   ["rw",
    "relatime",
    "vers=4.1",
    "rsize=1048576",
    "wsize=1048576",
    "namlen=255",
    "hard",
    "proto=tcp",
    "timeo=600",
    "retrans=2",
    "sec=sys",
    "clientaddr=10.193.24.19",
    "local_lock=none",
    "addr=10.193.2.107"],
  :size_bytes=>105554903040,
  :available_bytes=>40687894528,
  :used_bytes=>59481522176,
  :capacity=>"59.38%",
  :size=>"98.31 GiB",
  :available=>"37.89 GiB",
  :used=>"55.40 GiB"},
 {:device=>"none",
  :filesystem=>"tmpfs",
  :path=>"/etc",
  :options=>["rw", "relatime", "size=524288k", "nr_inodes=0", "mode=755"],
  :size_bytes=>536870912,
  :available_bytes=>394506240,
  :used_bytes=>142364672,
  :capacity=>"26.52%",
  :size=>"512.00 MiB",
  :available=>"376.23 MiB",
  :used=>"135.77 MiB"},
 {:device=>"none",
  :filesystem=>"tmpfs",
  :path=>"/var",
  :options=>["rw", "relatime", "size=524288k", "nr_inodes=0", "mode=755"],
  :size_bytes=>536870912,
  :available_bytes=>394506240,
  :used_bytes=>142364672,
  :capacity=>"26.52%",
  :size=>"512.00 MiB",
  :available=>"376.23 MiB",
  :used=>"135.77 MiB"},
 {:device=>"none",
  :filesystem=>"tmpfs",
  :path=>"/root",
  :options=>["rw", "relatime", "size=524288k", "nr_inodes=0", "mode=755"],
  :size_bytes=>536870912,
  :available_bytes=>394506240,
  :used_bytes=>142364672,
  :capacity=>"26.52%",
  :size=>"512.00 MiB",
  :available=>"376.23 MiB",
  :used=>"135.77 MiB"},
 {:device=>"none",
  :filesystem=>"tmpfs",
  :path=>"/tmp",
  :options=>["rw", "relatime", "size=524288k", "nr_inodes=0", "mode=755"],
  :size_bytes=>536870912,
  :available_bytes=>394506240,
  :used_bytes=>142364672,
  :capacity=>"26.52%",
  :size=>"512.00 MiB",
  :available=>"376.23 MiB",
  :used=>"135.77 MiB"},
 {:device=>"none",
  :filesystem=>"tmpfs",
  :path=>"/clients",
  :options=>["rw", "relatime", "size=524288k", "nr_inodes=0", "mode=755"],
  :size_bytes=>0,
  :available_bytes=>0,
  :used_bytes=>0,
  :capacity=>"100%",
  :size=>"0 bytes",
  :available=>"0 bytes",
  :used=>"0 bytes"},
 {:device=>"none",
  :filesystem=>"tmpfs",
  :path=>"/usr/vice/etc",
  :options=>["rw", "relatime", "size=524288k", "nr_inodes=0", "mode=755"],
  :size_bytes=>536870912,
  :available_bytes=>394506240,
  :used_bytes=>142364672,
  :capacity=>"26.52%",
  :size=>"512.00 MiB",
  :available=>"376.23 MiB",
  :used=>"135.77 MiB"},
 {:device=>"none",
  :filesystem=>"tmpfs",
  :path=>"/var/lib/rpm",
  :options=>["rw", "relatime", "size=524288k", "nr_inodes=0", "mode=755"],
  :size_bytes=>536870912,
  :available_bytes=>394506240,
  :used_bytes=>142364672,
  :capacity=>"26.52%",
  :size=>"512.00 MiB",
  :available=>"376.23 MiB",
  :used=>"135.77 MiB"},
 {:device=>"devpts",
  :filesystem=>"devpts",
  :path=>"/dev/pts",
  :options=>["rw", "relatime", "gid=5", "mode=620", "ptmxmode=000"],
  :size_bytes=>0,
  :available_bytes=>0,
  :used_bytes=>0,
  :capacity=>"100%",
  :size=>"0 bytes",
  :available=>"0 bytes",
  :used=>"0 bytes"},
 {:device=>"tmpfs",
  :filesystem=>"tmpfs",
  :path=>"/dev/shm",
  :options=>["rw", "relatime", "size=100k"],
  :size_bytes=>102400,
  :available_bytes=>98304,
  :used_bytes=>4096,
  :capacity=>"4.00%",
  :size=>"100.00 KiB",
  :available=>"96.00 KiB",
  :used=>"4.00 KiB"},
 {:device=>"tmpfs",
  :filesystem=>"tmpfs",
  :path=>"/mnt",
  :options=>["rw", "relatime", "size=100k", "mode=755"],
  :size_bytes=>102400,
  :available_bytes=>102400,
  :used_bytes=>0,
  :capacity=>"0%",
  :size=>"100.00 KiB",
  :available=>"100.00 KiB",
  :used=>"0 bytes"},
 {:device=>"tmpfs",
  :filesystem=>"tmpfs",
  :path=>"/sys/fs/cgroup",
  :options=>["ro", "nosuid", "nodev", "noexec", "mode=755"],
  :size_bytes=>1957605376,
  :available_bytes=>1957605376,
  :used_bytes=>0,
  :capacity=>"0%",
  :size=>"1.82 GiB",
  :available=>"1.82 GiB",
  :used=>"0 bytes"},
 {:device=>"hugetlbfs",
  :filesystem=>"hugetlbfs",
  :path=>"/dev/hugepages",
  :options=>["rw", "relatime"],
  :size_bytes=>0,
  :available_bytes=>0,
  :used_bytes=>0,
  :capacity=>"100%",
  :size=>"0 bytes",
  :available=>"0 bytes",
  :used=>"0 bytes"},
 {:device=>"mqueue",
  :filesystem=>"mqueue",
  :path=>"/dev/mqueue",
  :options=>["rw", "relatime"],
  :size_bytes=>0,
  :available_bytes=>0,
  :used_bytes=>0,
  :capacity=>"100%",
  :size=>"0 bytes",
  :available=>"0 bytes",
  :used=>"0 bytes"},
 {:device=>"10.193.2.107:/clients/cc7/79_20221130/x86_64/var/cache/yum",
  :filesystem=>"nfs4",
  :path=>"/var/cache/yum",
  :options=>
   ["rw",
    "relatime",
    "vers=4.1",
    "rsize=1048576",
    "wsize=1048576",
    "namlen=255",
    "hard",
    "proto=tcp",
    "timeo=600",
    "retrans=2",
    "sec=sys",
    "clientaddr=10.193.24.19",
    "local_lock=none",
    "addr=10.193.2.107"],
  :size_bytes=>105554903040,
  :available_bytes=>40687894528,
  :used_bytes=>59481522176,
  :capacity=>"59.38%",
  :size=>"98.31 GiB",
  :available=>"37.89 GiB",
  :used=>"55.40 GiB"},
 {:device=>"sunrpc",
  :filesystem=>"rpc_pipefs",
  :path=>"/var/lib/nfs/rpc_pipefs",
  :options=>["rw", "relatime"],
  :size_bytes=>0,
  :available_bytes=>0,
  :used_bytes=>0,
  :capacity=>"100%",
  :size=>"0 bytes",
  :available=>"0 bytes",
  :used=>"0 bytes"},
 {:device=>"tbed-storage-bwm:/exports/bwm",
  :filesystem=>"nfs4",
  :path=>"/mnt/bwm",
  :options=>
   ["ro",
    "noatime",
    "vers=4.1",
    "rsize=32768",
    "wsize=32768",
    "namlen=255",
    "soft",
    "proto=tcp",
    "timeo=100",
    "retrans=2",
    "sec=sys",
    "clientaddr=10.193.24.19",
    "local_lock=none",
    "addr=10.193.2.105"],
  :size_bytes=>10434674688,
  :available_bytes=>3285909504,
  :used_bytes=>6616580096,
  :capacity=>"66.82%",
  :size=>"9.72 GiB",
  :available=>"3.06 GiB",
  :used=>"6.16 GiB"},
 {:device=>"pc-tbed-lfs-01:/sw",
  :filesystem=>"nfs4",
  :path=>"/sw",
  :options=>
   ["ro",
    "relatime",
    "vers=4.1",
    "rsize=1048576",
    "wsize=1048576",
    "namlen=255",
    "soft",
    "proto=tcp",
    "timeo=600",
    "retrans=2",
    "sec=sys",
    "clientaddr=10.193.24.19",
    "local_lock=none",
    "addr=10.193.2.107"],
  :size_bytes=>2139406467072,
  :available_bytes=>2022201884672,
  :used_bytes=>8504999936,
  :capacity=>"0.42%",
  :size=>"1.95 TiB",
  :available=>"1.84 TiB",
  :used=>"7.92 GiB"},
 {:device=>"/tmpfs",
  :filesystem=>"tmpfs",
  :path=>"/var/atlas",
  :options=>["rw", "noatime", "size=65536k", "mode=1775", "gid=1307"],
  :size_bytes=>67108864,
  :available_bytes=>67108864,
  :used_bytes=>0,
  :capacity=>"0%",
  :size=>"64.00 MiB",
  :available=>"64.00 MiB",
  :used=>"0 bytes"},
 {:device=>"AFS",
  :filesystem=>"afs",
  :path=>"/afs",
  :options=>["rw", "relatime"],
  :size_bytes=>2199023254528,
  :available_bytes=>2199023254528,
  :used_bytes=>0,
  :capacity=>"0%",
  :size=>"2.00 TiB",
  :available=>"2.00 TiB",
  :used=>"0 bytes"},
 {:device=>"pc-tbed-lfs-01:/clients_data/logs",
  :filesystem=>"nfs4",
  :path=>"/clients/logs",
  :options=>
   ["rw",
    "relatime",
    "vers=4.1",
    "rsize=32768",
    "wsize=32768",
    "namlen=255",
    "hard",
    "proto=tcp",
    "timeo=600",
    "retrans=2",
    "sec=sys",
    "clientaddr=10.193.24.19",
    "local_lock=none",
    "addr=10.193.2.107"],
  :size_bytes=>534750494720,
  :available_bytes=>351196643328,
  :used_bytes=>156366372864,
  :capacity=>"30.81%",
  :size=>"498.03 GiB",
  :available=>"327.08 GiB",
  :used=>"145.63 GiB"},
 {:device=>"tmpfs",
  :filesystem=>"tmpfs",
  :path=>"/run/user/42056",
  :options=>
   ["rw",
    "nosuid",
    "nodev",
    "relatime",
    "size=382348k",
    "mode=700",
    "uid=42056",
    "gid=42056"],
  :size_bytes=>391524352,
  :available_bytes=>391524352,
  :used_bytes=>0,
  :capacity=>"0%",
  :size=>"373.39 MiB",
  :available=>"373.39 MiB",
  :used=>"0 bytes"},
 {:device=>"tbed-storage-home:/exports/home_tbed",
  :filesystem=>"nfs4",
  :path=>"/tbed/home",
  :options=>
   ["rw",
    "relatime",
    "vers=4.1",
    "rsize=32768",
    "wsize=32768",
    "namlen=255",
    "hard",
    "proto=tcp",
    "timeo=600",
    "retrans=2",
    "sec=sys",
    "clientaddr=10.193.24.19",
    "local_lock=none",
    "addr=10.193.2.105"],
  :size_bytes=>105555197952,
  :available_bytes=>48326803456,
  :used_bytes=>51842908160,
  :capacity=>"51.76%",
  :size=>"98.31 GiB",
  :available=>"45.01 GiB",
  :used=>"48.28 GiB"},
 {:device=>"pc-atds-cvmfs:/cvmfs/atlas.cern.ch",
  :filesystem=>"nfs4",
  :path=>"/cvmfs/atlas.cern.ch",
  :options=>
   ["ro",
    "relatime",
    "vers=4.1",
    "rsize=1048576",
    "wsize=1048576",
    "namlen=255",
    "acregmin=60",
    "acdirmin=60",
    "hard",
    "proto=tcp",
    "timeo=600",
    "retrans=2",
    "sec=sys",
    "clientaddr=10.193.24.19",
    "local_lock=none",
    "addr=188.184.88.59"],
  :size_bytes=>12582912000,
  :available_bytes=>4547674112,
  :used_bytes=>8035237888,
  :capacity=>"63.86%",
  :size=>"11.72 GiB",
  :available=>"4.24 GiB",
  :used=>"7.48 GiB"},
 {:device=>"pc-atds-cvmfs:/cvmfs/sft.cern.ch",
  :filesystem=>"nfs4",
  :path=>"/cvmfs/sft.cern.ch",
  :options=>
   ["ro",
    "relatime",
    "vers=4.1",
    "rsize=1048576",
    "wsize=1048576",
    "namlen=255",
    "acregmin=60",
    "acdirmin=60",
    "hard",
    "proto=tcp",
    "timeo=600",
    "retrans=2",
    "sec=sys",
    "clientaddr=10.193.24.19",
    "local_lock=none",
    "addr=188.184.88.59"],
  :size_bytes=>12582912000,
  :available_bytes=>4547674112,
  :used_bytes=>8035237888,
  :capacity=>"63.86%",
  :size=>"11.72 GiB",
  :available=>"4.24 GiB",
  :used=>"7.48 GiB"},
 {:device=>"pc-atds-cvmfs:/cvmfs/atlas-online-nightlies.cern.ch",
  :filesystem=>"nfs4",
  :path=>"/cvmfs/atlas-online-nightlies.cern.ch",
  :options=>
   ["ro",
    "relatime",
    "vers=4.1",
    "rsize=1048576",
    "wsize=1048576",
    "namlen=255",
    "acregmin=60",
    "acdirmin=60",
    "hard",
    "proto=tcp",
    "timeo=600",
    "retrans=2",
    "sec=sys",
    "clientaddr=10.193.24.19",
    "local_lock=none",
    "addr=188.184.88.59"],
  :size_bytes=>12582912000,
  :available_bytes=>4547674112,
  :used_bytes=>8035237888,
  :capacity=>"63.86%",
  :size=>"11.72 GiB",
  :available=>"4.24 GiB",
  :used=>"7.48 GiB"},
 {:device=>"tmpfs",
  :filesystem=>"tmpfs",
  :path=>"/run/user/0",
  :options=>["rw", "nosuid", "nodev", "relatime", "size=382348k", "mode=700"],
  :size_bytes=>391524352,
  :available_bytes=>391524352,
  :used_bytes=>0,
  :capacity=>"0%",
  :size=>"373.39 MiB",
  :available=>"373.39 MiB",
  :used=>"0 bytes"}]

 

Josh Cooper (Jira)

unread,
May 10, 2023, 1:00:03 PM5/10/23
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Story Points: 2

Josh Cooper (Jira)

unread,
May 18, 2023, 3:45:03 PM5/18/23
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Sprint: Phoenix 2023-06-07
This message was sent by Atlassian Jira (v8.20.21#820021-sha1:38274c8)
Atlassian logo

Michael Hashizume (Jira)

unread,
May 19, 2023, 4:42:01 PM5/19/23
to puppe...@googlegroups.com
Michael Hashizume assigned an issue to Michael Hashizume
Change By: Michael Hashizume
Assignee: Michael Hashizume

Michael Hashizume (Jira)

unread,
May 19, 2023, 4:48:02 PM5/19/23
to puppe...@googlegroups.com
Michael Hashizume updated an issue
Change By: Michael Hashizume
Sprint: Phoenix 2023- 06 05 - 07 24

Michael Hashizume (Jira)

unread,
May 24, 2023, 1:08:03 PM5/24/23
to puppe...@googlegroups.com
Michael Hashizume updated an issue
Change By: Michael Hashizume
Sprint: Phoenix 2023-05-24 , Phoenix 2023-06-07

Michael Hashizume (Jira)

unread,
May 24, 2023, 5:09:01 PM5/24/23
to puppe...@googlegroups.com
Michael Hashizume commented on Bug FACT-3186
 
Re: facter 4.2.13: bug "facter partitions"

Hi Diana Scannicchio ,

Thank you for reporting this bug. I have a small PR up to address this issue, but I'm having difficulty finding a way to reproduce your environment and using my feature branch on a diskless node.

Is there any chance that you'd be able to test out this PR? https://github.com/puppetlabs/facter/pull/2575

Thank you!

Diana Scannicchio (Jira)

unread,
May 30, 2023, 4:11:01 AM5/30/23
to puppe...@googlegroups.com

Thank you Michael Hashizume , sure I can test.
I modified the content of the file
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/facter/facts/linux/partitions.rb

commenting the existing line and adding the one suggested

 

#          next unless parts[mnt[:device]]
          next unless parts&.[](mnt[:device]) 

And I tested it on a diskless node.

The error is still there, but it is now coming from the last line in the code, so another change is needed.

[root@sbc ~]#  facter --trace |more
[2023-05-27 17:24:00.273313 ] ERROR Facter::InternalFactManager - undefined method `empty?' for nil:NilClass/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/facter/facts/linux/partitions.rb:23:in `partitions'/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/facter/facts/linux/partitions.rb:9:in `call_the_resolver'/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/facter/framework/core/fact/internal/core_fact.rb:16:in `block in create'/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/facter/framework/benchmarking/timer.rb:18:in `measure'/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/facter/framework/core/fact/internal/core_fact.rb:15:in `create'/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/facter/framework/core/fact/internal/internal_fact_manager.rb:75:in `core_fact'/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/facter/framework/core/fact/internal/internal_fact_manager.rb:64:in `resolve_fact'/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/facter/framework/core/fact/internal/internal_fact_manager.rb:54:in `block in resolve_sequentially'/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/facter/framework/core/fact/internal/internal_fact_manager.rb:54:in `map!'/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/facter/framework/core/fact/internal/internal_fact_manager.rb:54:in `resolve_sequentially'/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/facter/framework/core/fact/internal/internal_fact_manager.rb:14:in `resolve_facts'/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/facter/framework/core/fact_manager.rb:23:in `resolve_facts'/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/facter.rb:521:in `resolve_facts_for_user_query'/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/facter.rb:454:in `to_user_output'/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/facter/framework/cli/cli.rb:124:in `query'/opt/puppetlabs/puppet/lib/ruby/gems/2.7.0/gems/thor-1.2.1/lib/thor/command.rb:27:in `run'/opt/puppetlabs/puppet/lib/ruby/gems/2.7.0/gems/thor-1.2.1/lib/thor/invocation.rb:127:in `invoke_command'/opt/puppetlabs/puppet/lib/ruby/gems/2.7.0/gems/thor-1.2.1/lib/thor.rb:392:in `dispatch'/opt/puppetlabs/puppet/lib/ruby/gems/2.7.0/gems/thor-1.2.1/lib/thor/base.rb:485:in `start'/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/facter/framework/cli/cli_launcher.rb:23:in `start'/opt/puppetlabs/puppet/bin/facter:10:in `<main>'aio_agent_version => 7.24.0

Thank you for your help,

Diana

Michael Hashizume (Jira)

unread,
May 30, 2023, 5:32:02 PM5/30/23
to puppe...@googlegroups.com

Thank you for testing Diana Scannicchio 

I've updated my PR to try and simplify things even further. Would you be able to test again?

Thank you

Diana Scannicchio (Jira)

unread,
May 31, 2023, 8:59:02 AM5/31/23
to puppe...@googlegroups.com

Hello Michael Hashizume ,

I just tested your last update and it worked !

See you below, "bwmpuppet" is a wrapper script we used.

To apply the change I had to patch the image used, but that is not a problem.

 

Before the fix

[root@sbc ~]# bwmpuppet


Error: Facter: undefined method `[]' for nil:NilClass

Notice: Scope(Class[Afs::Cache]): AFS cache size is 0
Notice: Scope(Class[Bwm::Disk::Swapon]): swap_location facts is
Notice: Compiled catalog for sbc-tbed-717.cern.ch in environment production in 2.80 seconds
Notice: Applied catalog in 12.48 seconds

 

after the fix

[root@sbc ~]# bwmpuppet
Notice: Scope(Class[Afs::Cache]): AFS cache size is 0
Notice: Scope(Class[Bwm::Disk::Swapon]): swap_location facts is
Notice: Compiled catalog for sbc-tbed-717.cern.ch in environment production in 2.99 seconds
Notice: Applied catalog in 12.70 seconds

 

what next? Can I assume that the change will be added in a next version release?

Thank you and cheers,

Diana

Michael Hashizume (Jira)

unread,
Jun 5, 2023, 4:20:01 PM6/5/23
to puppe...@googlegroups.com

Thanks again for testing Diana Scannicchio ! Glad that it looks like this resolved the issue.

I'll get this merged and through our CI pipeline.

We are planning on putting out Puppet 7.25.0 in mid-June and will likely cut a new release of Facter as part of that. I will try and get this fix included

Reply all
Reply to author
Forward
0 new messages