cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhais...@apache.org
Subject git commit: updated refs/heads/master to 47625af
Date Fri, 08 Aug 2014 12:27:36 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/master b8deb6ba3 -> 47625af7c


CLOUDSTACK-6360: Fix JDK paths in ubuntu packaging init scripts, don't use 1.6

Since we've agreed to use JDK/JRE 1.7, this enforces that for Ubuntu builds
- this fix remove usage of 1.6 paths in JDK_DIR for cloud-{agent, management, usage}.
- adds oracle jdk 1.7 path (in case a user is using that)
- adds mysql-connector-java path to CLASSPATH for usage server
- adds libmysql-java pkg dependency (tested and available for precise and trusty)

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit 96d6a2a03734ebbb9f41196d56c409d544a268ea)

Conflicts:
	packaging/debian/init/cloud-usage
Adds pessimistic logic to try the hard coded paths if Rajani's logic fails


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/47625af7
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/47625af7
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/47625af7

Branch: refs/heads/master
Commit: 47625af7c3c1f1eb7e092e2f52ecdebb5509cfb0
Parents: b8deb6b
Author: Rohit Yadav <rohit.yadav@shapeblue.com>
Authored: Fri Aug 8 14:12:22 2014 +0200
Committer: Rohit Yadav <rohit.yadav@shapeblue.com>
Committed: Fri Aug 8 14:26:47 2014 +0200

----------------------------------------------------------------------
 debian/control                         |  2 +-
 packaging/debian/init/cloud-agent      |  2 +-
 packaging/debian/init/cloud-management |  2 +-
 packaging/debian/init/cloud-usage      | 13 ++++++++++++-
 4 files changed, 15 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/47625af7/debian/control
----------------------------------------------------------------------
diff --git a/debian/control b/debian/control
index 504ef99..68aadc7 100644
--- a/debian/control
+++ b/debian/control
@@ -31,7 +31,7 @@ Description: CloudStack agent
 
 Package: cloudstack-usage
 Architecture: all
-Depends: openjdk-7-jre, cloudstack-common (= ${source:Version}), jsvc
+Depends: openjdk-7-jre, cloudstack-common (= ${source:Version}), jsvc, libmysql-java
 Description: CloudStack usage monitor
  The CloudStack usage monitor provides usage accounting across the entire cloud for
  cloud operators to charge based on usage parameters.

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/47625af7/packaging/debian/init/cloud-agent
----------------------------------------------------------------------
diff --git a/packaging/debian/init/cloud-agent b/packaging/debian/init/cloud-agent
index ff550bb..eb2c3d1 100755
--- a/packaging/debian/init/cloud-agent
+++ b/packaging/debian/init/cloud-agent
@@ -46,7 +46,7 @@ unset OPTIONS
 [ -r /etc/default/"$SHORTNAME" ] && source /etc/default/"$SHORTNAME"
 
 # The first existing directory is used for JAVA_HOME (if JAVA_HOME is not defined in $DEFAULT)
-JDK_DIRS="/usr/lib/jvm/java-7-openjdk-amd64 /usr/lib/jvm/java-7-openjdk-i386 /usr/lib/jvm/java-6-openjdk
/usr/lib/jvm/java-6-openjdk-i386 /usr/lib/jvm/java-6-openjdk-amd64 /usr/lib/jvm/java-6-sun"
+JDK_DIRS="/usr/lib/jvm/java-7-openjdk-amd64 /usr/lib/jvm/java-7-openjdk-i386 /usr/lib/jvm/java-7-oracle
/usr/lib/jvm/java-6-openjdk /usr/lib/jvm/java-6-openjdk-i386 /usr/lib/jvm/java-6-openjdk-amd64
/usr/lib/jvm/java-6-sun"
 
 for jdir in $JDK_DIRS; do
     if [ -r "$jdir/bin/java" -a -z "${JAVA_HOME}" ]; then

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/47625af7/packaging/debian/init/cloud-management
----------------------------------------------------------------------
diff --git a/packaging/debian/init/cloud-management b/packaging/debian/init/cloud-management
index 8431eec..90052c9 100755
--- a/packaging/debian/init/cloud-management
+++ b/packaging/debian/init/cloud-management
@@ -65,7 +65,7 @@ TOMCAT6_USER=tomcat6
 
 # The first existing directory is used for JAVA_HOME (if JAVA_HOME is not
 # defined in $DEFAULT)
-JDK_DIRS="/usr/lib/jvm/java-7-openjdk-amd64 /usr/lib/jvm/java-7-openjdk-i386 /usr/lib/jvm/java-6-openjdk
/usr/lib/jvm/java-6-openjdk-i386 /usr/lib/jvm/java-6-openjdk-amd64 /usr/lib/jvm/java-6-sun"
+JDK_DIRS="/usr/lib/jvm/java-7-openjdk-amd64 /usr/lib/jvm/java-7-openjdk-i386 /usr/lib/jvm/java-7-oracle
/usr/lib/jvm/java-7-openjdk /usr/lib/jvm/java-7-sun"
 
 # Look for the right JVM to use
 for jdir in $JDK_DIRS; do

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/47625af7/packaging/debian/init/cloud-usage
----------------------------------------------------------------------
diff --git a/packaging/debian/init/cloud-usage b/packaging/debian/init/cloud-usage
index a12dc70..06b1142 100755
--- a/packaging/debian/init/cloud-usage
+++ b/packaging/debian/init/cloud-usage
@@ -62,6 +62,17 @@ setJavaHome() {
     return
   fi
 
+  # If everything has failed, try hardcoded paths
+  # The first existing directory is used for JAVA_HOME (if JAVA_HOME is not defined in $DEFAULT)
+  JDK_DIRS="/usr/lib/jvm/java-7-openjdk-amd64 /usr/lib/jvm/java-7-openjdk-i386 /usr/lib/jvm/java-7-oracle
/usr/lib/jvm/java-7-openjdk /usr/lib/jvm/java-7-sun"
+  for jdir in $JDK_DIRS; do
+    if [ -r "$jdir/bin/java" -a -z "${JAVA_HOME}" ]; then
+      JAVA_HOME="$jdir"
+      export JAVA_HOME
+      return
+    fi
+  done
+
   # didnt find java home. exiting with error
   exit 1
 }
@@ -73,7 +84,7 @@ PCP=`ls /usr/share/cloudstack-usage/plugins/*.jar 2>/dev/null | tr '\n'
':' | se
 
 # We need to append the JSVC daemon JAR to the classpath
 # AgentShell implements the JSVC daemon methods
-export CLASSPATH="/usr/share/java/commons-daemon.jar:$UCP:$PCP:/etc/cloudstack/usage"
+export CLASSPATH="/usr/share/java/commons-daemon.jar:/usr/share/java/mysql-connector-java.jar:$UCP:$PCP:/etc/cloudstack/usage"
 
 start() {
     if [ -s "$PIDFILE" ] && kill -0 $(cat "$PIDFILE") >/dev/null 2>&1;
then


Mime
View raw message