Bug 2196825 - satellite-installer fails with error "Ruby Integer outside of Puppet Integer max range" if a filesystem with 8.00 EiB is mounted
Summary: satellite-installer fails with error "Ruby Integer outside of Puppet Integer ...
Keywords:
Status: NEW
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Installer
Version: 6.11.4
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Satellite QE Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-05-10 11:04 UTC by Stefan Meyer
Modified: 2023-08-11 19:10 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker SAT-19526 0 None None None 2023-08-11 19:10:46 UTC
Red Hat Knowledge Base (Solution) 7012356 0 None None None 2023-05-10 17:35:30 UTC

Description Stefan Meyer 2023-05-10 11:04:07 UTC
Description of problem:
satellite-installer fails with error "Ruby Integer outside of Puppet Integer max range" if a filesystem with 8.00 EiB is mounted

Version-Release number of selected component (if applicable):
- Satellite & Capsule 6.11.4

How reproducible:
- The customer has a Netapp fileshare mounted through NFS v4

Steps to Reproduce:
1. Mount a filesystem with a size of 9223371665325424640 bytes
2. Run satellite-installer
3.

Actual results:
The satellite installer shows error

  [ERROR ] [configure] Evaluation Error: Error while evaluating a '=>' expression, Use of a Ruby Integer outside of Puppet Integer max range, got '0x8000000000000000' (file: /usr/share/foreman-installer/modules/foreman_proxy/manifests/register.pp, line: 23, column: 7) on node XXX

Expected results:
The satellite installer should work regardless of a big filesystem

Additional info:

Puppet facter information:

...
/redacted => {
    available => "8.00 EiB",
    available_bytes => 9223371665325424640,
    capacity => "0.00%",
    device => "redacted",
    filesystem => "nfs4",
    options => [
      "rw",
      "relatime",
      "vers=4.1",
      "rsize=1048576",
      "wsize=1048576",
      "namlen=255",
      "hard",
      "proto=tcp",
      "timeo=600",
      "retrans=2",
      "sec=sys",
      "clientaddr=redacted",
      "local_lock=none",
      "addr=redacted"
    ],
    size => "8.00 EiB",
    size_bytes => 9223372036854775808,
    used => "346.01 GiB",
    used_bytes => 371529351168
  },
...

Comment 1 Ewoud Kohl van Wijngaarden 2023-05-11 14:30:41 UTC
I did some minimal testing by defining a custom fact with just a large number:

cat > lib/facter/large.rb <<EOF
Facter.add(:large) do
  setcode do
    9223371665325424640
  end
end
EOF

Then applying the following manifest does work (with Puppet 6.28.0):

if $facts['large'] > 1000 {
  file { '/tmp/bla':
    ensure => file,
    content => String($facts['large']),
  }
}

My next guess was some conversion in custom types, but also there with a small custom type I couldn't easily reproduce it:

Puppet::Type.newtype(:largenumber) do
  ensurable
  newparam(:name)
  newproperty(:content)
end

Puppet::Type.type(:largenumber).provide(:default) do
  mk_resource_methods

  def self.instances
    []
  end

  def self.prefetch(resources)
    resources.each do |name, resource|
      if File.exist?(name)
        resource.provider = new(ensure: :present, content: JSON.load(File.read(name)))
      else
        resource.provider = new(ensure: :absent)
      end
    end
  end

  def create
    require 'json'
    File.write(name, JSON.dump(resource.should(:content)))
    @property_hash[:ensure] = :present
    @property_hash[:content] = resource.should(:content)
  end

  def flush
    require 'json'
    File.write(name, JSON.dump(@property_hash[:content]))
  end

  def exists?
    return File.file?(name)
  end
end

That also happily wrote out the content.

So it needs some further investigation where it's happening.


Note You need to log in before you can comment on or make changes to this bug.