Project

General

Profile

Actions

Bug #2405

closed

rudder packages for Ubuntu doesn't seem to be functionnal (especially Jetty)

Added by Nicolas PERRON over 12 years ago. Updated over 9 years ago.

Status:
Released
Priority:
1 (highest)
Assignee:
Nicolas PERRON
Category:
Packaging
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Name check:
Fix check:
Regression:

Description

[...]
Setting up openjdk-7-jre-headless (7~b147-2.0-0ubuntu0.11.10.1) ...
Setting up openjdk-7-jre-lib (7~b147-2.0-0ubuntu0.11.10.1) ...
Setting up libaccess-bridge-java-jni (1.26.2-6) ...
Setting up openjdk-6-jre (6b23~pre11-0ubuntu1.11.10.2) ...
update-alternatives: using /usr/lib/jvm/java-6-openjdk/jre/bin/policytool to provide /usr/bin/policytool (policytool) in auto mode.
Setting up default-jre (1:1.6-42ubuntu2) ...
Setting up openjdk-7-jre (7~b147-2.0-0ubuntu0.11.10.1) ...
Setting up icedtea-6-jre-cacao (6b23~pre11-0ubuntu1.11.10.2) ...
Setting up icedtea-6-jre-jamvm (6b23~pre11-0ubuntu1.11.10.2) ...
Setting up icedtea-7-jre-jamvm (7~b147-2.0-0ubuntu0.11.10.1) ...
Setting up icedtea-netx (1.1.3-1ubuntu1.1) ...
update-alternatives: using /usr/lib/jvm/java-6-openjdk/jre/bin/javaws to provide /usr/bin/javaws (javaws) in auto mode.
Setting up rudder-jetty (2.4.0~alpha7~git201204020331-oneiric0) ...
Setting up rudder-inventory-endpoint (2.4.0~alpha7~git201204020331-oneiric0) ...
Setting up rudder-webapp (2.4.0~alpha7~git201204020331-oneiric0) ...
 * Stopping web server apache2                                                                                         ... waiting .                                                                                                 [ OK ]
Site default disabled.
To activate the new configuration, you need to run:
  service apache2 reload
Considering dependency dav for dav_fs:
Enabling module dav.
Enabling module dav_fs.
To activate the new configuration, you need to run:
  service apache2 restart
Enabling module rewrite.
To activate the new configuration, you need to run:
  service apache2 restart
Considering dependency proxy for proxy_http:
Enabling module proxy.
Enabling module proxy_http.
To activate the new configuration, you need to run:
  service apache2 restart
Enabling site rudder-default.
To activate the new configuration, you need to run:
  service apache2 reload
Adding password for user rudder
 * Starting web server apache2                                                                                 [ OK ] 
/var/rudder/configuration-repository/shared-files doesn't exist!
/var/rudder/configuration-repository/shared-files created
Restarting Rudder webapp and inventory-endpoint
Stopping Jetty: No process in pidfile '/var/rudder/run/jetty.pid' found running; none killed.
OK
Starting Jetty: FAILED
Setting up rudder-server-root (2.4.0~alpha7~git201204020331-oneiric0) ...
************************************************************
Rudder is now installed but not configured.
Please run /opt/rudder/bin/rudder-init.sh
************************************************************
Setting up openjdk-6-jre-lib (6b23~pre11-0ubuntu1.11.10.2) ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place

vagrant@server:~$ sudo /etc/init.d/rudder-server-root stop
 * Stopping web server apache2                                                                                         ... waiting .                                                                                                 [ OK ]
Stopping Jetty: start-stop-daemon: warning: failed to kill 8666: No such process
1 pids were not killed
No process in pidfile '/var/rudder/run/jetty.pid' found running; none killed.
OK
cfengine-community[8765]: [INFO] Using /etc/default/cfengine-community for configuration
cfengine-community[8768]: [INFO] Using /var/rudder/cfengine-community for CFEngine workdir
cfengine-community[8769]: [INFO] Halting CFEngine Community cf-serverd...
cfengine-community[8770]: [INFO] can't read PID file, not stopping cf-serverd
cfengine-community[8771]: [INFO] Halting CFEngine Community cf-execd...
cfengine-community[8772]: [INFO] can't read PID file, not stopping cf-execd
cfengine-community[8778]: [INFO] Found no CFEngine Community cf-serverd processes running
cfengine-community[8785]: [INFO] Found no CFEngine Community cf-execd processes running
 * Stopping PostgreSQL 9.1 database server                                                                     [ OK ] 
slapd[8818]: [INFO] Using /etc/default/slapd for configuration
slapd[8823]: [INFO] Halting OpenLDAP...
slapd[8827]: [OK] OpenLDAP stopped after 1 seconds
slapd[8828]: [INFO] Launching OpenLDAP database backup...
slapd[8845]: [OK] data save in /var/rudder/ldap/backup/openldap-data-20120402175131.ldif
slapd[8847]: [INFO] Halting OpenLDAP replication...
slapd[8848]: [INFO] no replica found in configuration, aborting stopping slurpd
Actions #1

Updated by Nicolas PERRON over 12 years ago

  • Status changed from New to In progress
There are here several problems here:
  • openjdk-7-jre depends on openjdk-6-jre and default Java is set to openjdk-6 !
  • /etc/default/jetty set JAVA env to "/usr/lib/jvm/java-6-sun/bin/java"
  • Our Vagrantfile doesn't set VM's memory to 1GB
Actions #2

Updated by Jonathan CLARKE over 12 years ago

Nicolas PERRON wrote:

There are here several problems here:
  • openjdk-7-jre depends on openjdk-6-jre and default Java is set to openjdk-6 !
  • /etc/default/jetty set JAVA env to "/usr/lib/jvm/java-6-sun/bin/java"
  • Our Vagrantfile doesn't set VM's memory to 1GB

You can use this snippet to get the right JVM: https://github.com/Normation/rudder-packages/blob/master/rudder-webapp/debian/rules#L15

Actions #3

Updated by Nicolas PERRON over 12 years ago

Jonathan CLARKE wrote:

Nicolas PERRON wrote:

There are here several problems here:
  • openjdk-7-jre depends on openjdk-6-jre and default Java is set to openjdk-6 !
  • /etc/default/jetty set JAVA env to "/usr/lib/jvm/java-6-sun/bin/java"
  • Our Vagrantfile doesn't set VM's memory to 1GB

You can use this snippet to get the right JVM: https://github.com/Normation/rudder-packages/blob/master/rudder-webapp/debian/rules#L15

I'm not sure how to deal with this...
debian/rules is executed on the builder machine but we need to know or set JAVA_HOME from the machine which is installing rudder-jetty package.
Maybe should we use a postinst ? Actually i thought about using a template /etc/default/jetty file with JAVA_HOME variable to replace but I don't know how to replace by the right path. Besides, on Ubuntu the default JAVA_HOME will not be the right one.

Actions #4

Updated by Nicolas PERRON over 12 years ago

After all, we only needed to use this hack on /etc/default/jetty ... it works !

Actions #5

Updated by Jonathan CLARKE over 12 years ago

  • Status changed from In progress to Released

Fix looks fine to me, well done!

Actions #6

Updated by Nicolas PERRON over 12 years ago

  • Status changed from Released to New

This fix has an impact on CentOS:
The patch modified (jetty-default-sles.patch) is executed with --fuzz=0 option by rpmbuild (v 4.8.0) which fail.

echo "Patch #2 (jetty-default-sles.patch):" 
/bin/cat /root/packaging/rudder-packages/rudder-jetty/SOURCES/jetty-default-sles.patch | /usr/bin/patch -s -p0  --fuzz=0

On SLES, rpmbuild (v 4.4.2.3) successfully apply the same patch with default fuzz option (fuzz=2)

echo "Patch #2 (jetty-default-sles.patch):" 
patch -p0  -s < '/root/packaging/rudder-packages/rudder-jetty/SOURCES/jetty-default-sles.patch'

Actions #7

Updated by Nicolas PERRON over 12 years ago

  • Status changed from New to Pending technical review
  • % Done changed from 0 to 100
Actions #8

Updated by Jonathan CLARKE over 12 years ago

  • Status changed from Pending technical review to Discussion
  • % Done changed from 100 to 90

I'm really not sure about this fix - it creates duplication, which is never a good thing. The next time we change the default file, we may well forget to change the other one...

A better fix could be done either by:
  1. Just to make the patch not require fuzz. We know the file and we know the changes to make, so this must be possible. But it's ugly...
  2. Implement a small test in bash to use the right java executable. Something like if [ -f ${JAVA_HOME}/bin/java ]; then JAVA=${JAVA_HOME}/bin/java; else JAVA=/usr/bin/java; fi...
Actions #9

Updated by Nicolas PERRON over 12 years ago

  • Status changed from Discussion to In progress

Jonathan CLARKE wrote:

I'm really not sure about this fix - it creates duplication, which is never a good thing. The next time we change the default file, we may well forget to change the other one...

A better fix could be done either by:
  1. Just to make the patch not require fuzz. We know the file and we know the changes to make, so this must be possible. But it's ugly...

You're right, this could be an ugly fix. But this is not possible to specify the patch not require fuzz.

  1. Implement a small test in bash to use the right java executable. Something like if [ -f ${JAVA_HOME}/bin/java ]; then JAVA=${JAVA_HOME}/bin/java; else JAVA=/usr/bin/java; fi...

This fix is the smartest one and it works ! I will commit this as soon as possible ! Thanks

Actions #10

Updated by Nicolas PERRON over 12 years ago

  • Status changed from In progress to Pending technical review
  • % Done changed from 90 to 100

Applied in changeset commit:b0f844c4ed2362e0eb314c80fb74ca084bcc1d02.

Actions #11

Updated by Jonathan CLARKE over 12 years ago

  • Status changed from Pending technical review to Released
Actions #12

Updated by Nicolas PERRON almost 12 years ago

  • Project changed from Rudder to 34
  • Category deleted (11)
Actions #13

Updated by Benoît PECCATTE over 9 years ago

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

Also available in: Atom PDF