Project

General

Profile

Actions

Bug #3721

closed

Error on Rudder about lack of RAM memory should be explicit

Added by Nicolas PERRON over 11 years ago. Updated almost 10 years ago.

Status:
Released
Priority:
3
Assignee:
Jonathan CLARKE
Category:
Packaging
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Name check:
Fix check:
Regression:

Description

If Rudder Server is installed on a machine with less than 1Gb, it will never work but there is no indication about it.

The installation of rudder-webapp contains this:

[...]
Restarting Rudder webapp and inventory-endpoint
Stopping Jetty: No process in pidfile '/var/rudder/run/jetty.pid' found running; none killed.
OK
Setting umask to 0027
Starting Jetty: FAILED

Manually restarting jetty:

# /etc/init.d/jetty restart
Stopping Jetty: start-stop-daemon: warning: failed to kill 15682: No such process
1 pids were not killed
No process in pidfile '/var/rudder/run/jetty.pid' found running; none killed.
OK

But I search for the java command to launch the application:

# /etc/init.d/jetty check
Checking arguments to Jetty:
[...]
RUN_CMD        =  /usr/lib/jvm/java-6-sun/bin/java -server -Xms1024m -Xmx1024m -XX:PermSize=128m -XX:MaxPermSize=256m -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -Drudder.configFile=/opt/rudder/etc/rudder-web.properties -Drudder.authFile=/opt/rudder/etc/rudder-users.xml -Dinventoryweb.configFile=/opt/rudder/etc/inventory-web.properties -Dlogback.configurationFile=/opt/rudder/etc/logback.xml -Drun.mode=production -Djetty.logs=/var/log/rudder/webapp/ -Djetty.home=/opt/rudder/jetty7 -Djava.io.tmpdir=/tmp -jar /opt/rudder/jetty7/start.jar OPTIONS=Server --pre=etc/jetty-logging.xml

And then launch it:

# /usr/lib/jvm/java-6-sun/bin/java -server -Xms1024m -Xmx1024m -XX:PermSize=128m -XX:MaxPermSize=256m -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -Drudder.configFile=/opt/rudder/etc/rudder-web.properties -Drudder.authFile=/opt/rudder/etc/rudder-users.xml -Dinventoryweb.configFile=/opt/rudder/etc/inventory-web.properties -Dlogback.configurationFile=/opt/rudder/etc/logback.xml -Drun.mode=production -Djetty.logs=/var/log/rudder/webapp/ -Djetty.home=/opt/rudder/jetty7 -Djava.io.tmpdir=/tmp -jar /opt/rudder/jetty7/start.jar OPTIONS=Server --pre=etc/jetty-logging.xml
Error occurred during initialization of VM
Could not reserve enough space for object heap

Here, it is obvious that the error came from a lack of RAM but not before. We should explicit it.

How to do that ? Use a check of RAM in rudder-webapp postinst and in the /etc/init.d/rudder-server-root file before any re/start of jetty ?

Actions #1

Updated by Matthieu CERDA over 11 years ago

Yes, a warning check in both the postinst and init.d would be ok for this. What is the most important would be:
  • NOT failing the installation because of that (Just outputting a warning with echo would be sufficient)
  • Not trying to run Rudder if we know the RAM is too low
Actions #2

Updated by Jonathan CLARKE over 11 years ago

This is a great ticket! I love it already :)

I agree we should warn a lot more explicitely about this. However, I'm not keen on the idea of checking on a fixed value (ie, "is there > 1 GB of RAM ?"), when the real test is done by Java itself when running.

Could we get back the return code of the java executable when this happens, and print out the error message? Maybe by patching the jetty init script?

Actions #3

Updated by Nicolas PERRON over 11 years ago

Jonathan CLARKE wrote:

This is a great ticket! I love it already :)

I agree we should warn a lot more explicitely about this. However, I'm not keen on the idea of checking on a fixed value (ie, "is there > 1 GB of RAM ?"), when the real test is done by Java itself when running.

Could we get back the return code of the java executable when this happens, and print out the error message? Maybe by patching the jetty init script?

I prefer this solution

Actions #4

Updated by Matthieu CERDA over 11 years ago

  • Assignee set to Matthieu CERDA
  • Priority changed from N/A to 3
  • Target version set to 2.4.8

It seems it is quite important due to the number of people beeing impacted. Grabbin' this.

Actions #5

Updated by Matthieu CERDA over 11 years ago

  • Status changed from Discussion to In progress
Actions #6

Updated by Matthieu CERDA over 11 years ago

  • Status changed from In progress to Pending technical review
  • % Done changed from 0 to 100
  • Pull Request set to https://github.com/Normation/rudder-packages/pull/96

PR available.

Actions #7

Updated by Jonathan CLARKE over 11 years ago

  • Status changed from Pending technical review to Discussion

Matthieu CERDA wrote:

PR available.

Matthieu, I put some feedback in the PR, please address it.

Actions #8

Updated by Matthieu CERDA over 11 years ago

  • Status changed from Discussion to Pending technical review
  • Assignee changed from Matthieu CERDA to Jonathan CLARKE

Done !

Actions #9

Updated by Matthieu CERDA over 11 years ago

Done again :)

Actions #10

Updated by Matthieu CERDA over 11 years ago

  • Status changed from Pending technical review to Pending release

Applied in changeset commit:0dd37f164634dd507c1290d625ffa32aff54f1da.

Actions #11

Updated by Matthieu CERDA over 11 years ago

Applied in changeset commit:48b430a060b136079187e9ca9fa6d5b28ac5e5a6.

Actions #12

Updated by Matthieu CERDA over 11 years ago

Applied in changeset commit:b549d4c7969da83f28ba44290e0ba366604403c8.

Actions #13

Updated by Jonathan CLARKE over 11 years ago

Applied in changeset commit:d06999ee5fa64bfcbf6676de417973c18ff56054.

Actions #14

Updated by Nicolas PERRON over 11 years ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 2.4.8, which was released today.
Check out:

Actions #15

Updated by Benoît PECCATTE almost 10 years ago

  • Project changed from 34 to Rudder
  • Category set to Packaging
Actions

Also available in: Atom PDF