puppetlabs / puppetserver

Server automation framework and application
https://tickets.puppetlabs.com/browse/SERVER
Apache License 2.0
292 stars 235 forks source link

puppetserver fails on init with >2TB of total host RAM #2852

Closed level-a closed 3 months ago

level-a commented 4 months ago

Describe the Bug

2024-05-07T10:36:11.458Z ERROR [async-dispatch-2] [p.t.internal] Error during service init!!!
java.lang.NumberFormatException: For input string: "2319453408"
    at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:67)
    at java.base/java.lang.Integer.parseInt(Integer.java:668)
    at java.base/java.lang.Integer.parseInt(Integer.java:786)
    at puppetlabs.services.master.master_core$validate_memory_requirements_BANG_.invokeStatic(master_core.clj:1235)
    at puppetlabs.services.master.master_core$validate_memory_requirements_BANG_.invoke(master_core.clj:1227)

$ cat /proc/meminfo
MemTotal:       2319453408 kB

Expected Behavior

Expected fix for bigger than max Integer (2147483647) mem-size values https://github.com/puppetlabs/puppetserver/blob/90c85092f0df92024351a126290b272979f37d6a/src/clj/puppetlabs/services/master/master_core.clj#L1235

Steps to Reproduce

Steps to reproduce the behavior:

  1. setup host/env with >2TB total RAM in /proc/meminfo
  2. start puppetserver

Environment

justinstoller commented 3 months ago

Thanks for the bug report! We'll start working on this in the next week or two.

justinstoller commented 3 months ago

This should be resolved in the next release.