aurora-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kevi...@apache.org
Subject git commit: Upgrade mesos to 0.17.0
Date Mon, 03 Mar 2014 23:21:50 GMT
Repository: incubator-aurora
Updated Branches:
  refs/heads/master fc3cbb21f -> d1c1b4eb6


Upgrade mesos to 0.17.0

Moves to using non-deprecated methods and calls the new mesos-log --initialize command before
starting up the scheduler.

Testing Done:
./build-support/jenkins/build.sh
vagrant destroy -f
./src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh
vagrant ssh devtools -c 'cd aurora; ./pants src/test/python/apache/aurora/executor:executor-large'

Bugs closed: AURORA-240

Reviewed at https://reviews.apache.org/r/18580/


Project: http://git-wip-us.apache.org/repos/asf/incubator-aurora/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-aurora/commit/d1c1b4eb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-aurora/tree/d1c1b4eb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-aurora/diff/d1c1b4eb

Branch: refs/heads/master
Commit: d1c1b4eb63ed0586f45562a4e59cffb797fa993b
Parents: fc3cbb2
Author: Kevin Sweeney <kevints@apache.org>
Authored: Mon Mar 3 15:21:12 2014 -0800
Committer: Kevin Sweeney <kevints@apache.org>
Committed: Mon Mar 3 15:21:12 2014 -0800

----------------------------------------------------------------------
 3rdparty/python/BUILD                                |  2 +-
 build.gradle                                         |  2 +-
 docs/deploying-aurora-scheduler.md                   |  2 +-
 examples/scheduler/scheduler-local.sh                |  2 +-
 examples/vagrant/provision-aurora-scheduler.sh       | 14 +++++++++++---
 examples/vagrant/provision-dev-environment.sh        |  4 ++--
 examples/vagrant/provision-mesos-master.sh           |  4 ++--
 examples/vagrant/provision-mesos-slave.sh            |  4 ++--
 .../java/org/apache/aurora/scheduler/Driver.java     |  2 +-
 .../aurora/scheduler/local/FakeDriverFactory.java    | 15 +++++++++++++++
 .../aurora/scheduler/MesosSchedulerImplTest.java     |  3 ++-
 11 files changed, 39 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/d1c1b4eb/3rdparty/python/BUILD
----------------------------------------------------------------------
diff --git a/3rdparty/python/BUILD b/3rdparty/python/BUILD
index 2c7646c..70fb09d 100644
--- a/3rdparty/python/BUILD
+++ b/3rdparty/python/BUILD
@@ -19,7 +19,7 @@ python_requirement('bottle==0.11.6')
 python_requirement('cherrypy==3.2.2')
 python_requirement('Flask==0.9')
 python_requirement('mako==0.4.0')
-python_requirement('mesos==0.15.0')
+python_requirement('mesos==0.17.0')
 python_requirement('mock==1.0.1')
 python_requirement('mox==0.5.3')
 python_requirement('psutil==1.1.2')

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/d1c1b4eb/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
index 5177191..ba83b91 100644
--- a/build.gradle
+++ b/build.gradle
@@ -152,7 +152,7 @@ dependencies {
   compile 'javax.servlet:servlet-api:2.5'
   compile 'log4j:log4j:1.2.17'
   compile 'org.antlr:stringtemplate:3.2.1'
-  compile 'org.apache.mesos:mesos:0.15.0'
+  compile 'org.apache.mesos:mesos:0.17.0'
   def thriftLib = 'org.apache.thrift:libthrift:0.9.1'
   compile thriftLib
   compile 'org.apache.zookeeper:zookeeper:3.3.4'

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/d1c1b4eb/docs/deploying-aurora-scheduler.md
----------------------------------------------------------------------
diff --git a/docs/deploying-aurora-scheduler.md b/docs/deploying-aurora-scheduler.md
index 1718f89..887bf16 100644
--- a/docs/deploying-aurora-scheduler.md
+++ b/docs/deploying-aurora-scheduler.md
@@ -5,7 +5,7 @@ Installing Aurora
 =================
 Aurora is a standalone Java server. As part of the build process it creates a bundle of all
its
 dependencies, with the notable exceptions of the JVM and libmesos. Each target server should
have
-a JVM (Java 7 or higher) and libmesos (0.15.0) installed.
+a JVM (Java 7 or higher) and libmesos (0.17.0) installed.
 
 Creating the Distribution .zip File (Optional)
 ----------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/d1c1b4eb/examples/scheduler/scheduler-local.sh
----------------------------------------------------------------------
diff --git a/examples/scheduler/scheduler-local.sh b/examples/scheduler/scheduler-local.sh
index e1e394e..0c01cb5 100755
--- a/examples/scheduler/scheduler-local.sh
+++ b/examples/scheduler/scheduler-local.sh
@@ -11,7 +11,7 @@ JAVA_OPTS=(
   -Xmx2g
   -Xms2g
 
-  # Location of libmesos-0.15.0.so / libmesos-0.15.0.dylib
+  # Location of libmesos-0.17.0.so / libmesos-0.17.0.dylib
   -Djava.library.path=/usr/local/lib
 )
 

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/d1c1b4eb/examples/vagrant/provision-aurora-scheduler.sh
----------------------------------------------------------------------
diff --git a/examples/vagrant/provision-aurora-scheduler.sh b/examples/vagrant/provision-aurora-scheduler.sh
index 894a4d2..49b54f2 100755
--- a/examples/vagrant/provision-aurora-scheduler.sh
+++ b/examples/vagrant/provision-aurora-scheduler.sh
@@ -8,8 +8,8 @@ install -m 755 /vagrant/dist/aurora_admin.pex /usr/local/bin/aurora_admin
 
 apt-get update
 apt-get -y install java7-runtime-headless curl
-wget -c http://downloads.mesosphere.io/master/ubuntu/12.04/mesos_0.15.0_amd64.deb
-dpkg --install mesos_0.15.0_amd64.deb
+wget -c http://downloads.mesosphere.io/master/ubuntu/12.04/mesos_0.17.0_amd64.deb
+dpkg --install mesos_0.17.0_amd64.deb
 
 # TODO(ksweeney): Make this a be part of the Aurora distribution tarball.
 # Location where aurora-scheduler.zip was unpacked.
@@ -25,7 +25,7 @@ JAVA_OPTS=(
   -Xmx1g
   -Xms1g
 
-  # Location of libmesos-0.15.0.so / libmesos-0.15.0.dylib
+  # Location of libmesos-0.17.0.so / libmesos-0.17.0.dylib
   -Djava.library.path=/usr/local/lib
 )
 
@@ -92,4 +92,12 @@ cat > /etc/rc.local <<EOF
 EOF
 chmod +x /etc/rc.local
 
+export LD_LIBRARY_PATH=/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/server
+if mesos-log initialize --path="/usr/local/aurora-scheduler-$AURORA_VERSION/db"; then
+  echo "Replicated log initialized."
+else
+  echo "Replicated log initialization failed with code $? (likely already initialized)."
+fi
+unset LD_LIBRARY_PATH
+
 /etc/rc.local

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/d1c1b4eb/examples/vagrant/provision-dev-environment.sh
----------------------------------------------------------------------
diff --git a/examples/vagrant/provision-dev-environment.sh b/examples/vagrant/provision-dev-environment.sh
index 7fc11bf..e066293 100755
--- a/examples/vagrant/provision-dev-environment.sh
+++ b/examples/vagrant/provision-dev-environment.sh
@@ -13,8 +13,8 @@ pushd aurora
   AURORA_VERSION=$(cat .auroraversion | tr '[a-z]' '[A-Z]')
   mkdir -p third_party
   pushd third_party
-    wget -c http://downloads.mesosphere.io/master/ubuntu/12.04/mesos_0.15.0_amd64.egg \
-      -O mesos-0.15.0-py2.7-linux-x86_64.egg
+    wget -c http://downloads.mesosphere.io/master/ubuntu/12.04/mesos_0.17.0_amd64.egg \
+      -O mesos-0.17.0-py2.7-linux-x86_64.egg
   popd
   git pull
 

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/d1c1b4eb/examples/vagrant/provision-mesos-master.sh
----------------------------------------------------------------------
diff --git a/examples/vagrant/provision-mesos-master.sh b/examples/vagrant/provision-mesos-master.sh
index 6e8a923..8ca811a 100755
--- a/examples/vagrant/provision-mesos-master.sh
+++ b/examples/vagrant/provision-mesos-master.sh
@@ -1,8 +1,8 @@
 #!/bin/bash -x
 apt-get update
 apt-get -y install java7-runtime-headless curl
-wget -c http://downloads.mesosphere.io/master/ubuntu/12.04/mesos_0.15.0_amd64.deb
-dpkg --install mesos_0.15.0_amd64.deb
+wget -c http://downloads.mesosphere.io/master/ubuntu/12.04/mesos_0.17.0_amd64.deb
+dpkg --install mesos_0.17.0_amd64.deb
 cat > /usr/local/sbin/mesos-master.sh <<EOF
 #!/bin/bash
 export LD_LIBRARY_PATH=/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/server

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/d1c1b4eb/examples/vagrant/provision-mesos-slave.sh
----------------------------------------------------------------------
diff --git a/examples/vagrant/provision-mesos-slave.sh b/examples/vagrant/provision-mesos-slave.sh
index ef9180e..96ebf5c 100755
--- a/examples/vagrant/provision-mesos-slave.sh
+++ b/examples/vagrant/provision-mesos-slave.sh
@@ -1,8 +1,8 @@
 #!/bin/bash -x
 apt-get update
 apt-get -y install java7-runtime-headless curl
-wget -c http://downloads.mesosphere.io/master/ubuntu/12.04/mesos_0.15.0_amd64.deb
-dpkg --install mesos_0.15.0_amd64.deb
+wget -c http://downloads.mesosphere.io/master/ubuntu/12.04/mesos_0.17.0_amd64.deb
+dpkg --install mesos_0.17.0_amd64.deb
 
 # Get the IP address; eth1 is the net interface we care about.
 export SLAVE_IP_ADDRESS=$(ip addr show eth1 | grep 'inet ' | cut -d'/' -f 1 | cut -c '10-')

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/d1c1b4eb/src/main/java/org/apache/aurora/scheduler/Driver.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/aurora/scheduler/Driver.java b/src/main/java/org/apache/aurora/scheduler/Driver.java
index 7af8721..ab5a300 100644
--- a/src/main/java/org/apache/aurora/scheduler/Driver.java
+++ b/src/main/java/org/apache/aurora/scheduler/Driver.java
@@ -118,7 +118,7 @@ public interface Driver {
 
     @Override
     public void launchTask(OfferID offerId, TaskInfo task) {
-      get(State.RUNNING).launchTasks(offerId, ImmutableList.of(task));
+      get(State.RUNNING).launchTasks(ImmutableList.of(offerId), ImmutableList.of(task));
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/d1c1b4eb/src/main/java/org/apache/aurora/scheduler/local/FakeDriverFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/aurora/scheduler/local/FakeDriverFactory.java b/src/main/java/org/apache/aurora/scheduler/local/FakeDriverFactory.java
index e5d13e0..9a78fb9 100644
--- a/src/main/java/org/apache/aurora/scheduler/local/FakeDriverFactory.java
+++ b/src/main/java/org/apache/aurora/scheduler/local/FakeDriverFactory.java
@@ -43,6 +43,7 @@ import org.apache.mesos.SchedulerDriver;
 /**
  * A factory for fake scheduler driver instances.
  */
+@SuppressWarnings("deprecation")
 class FakeDriverFactory implements DriverFactory {
 
   private final Provider<Scheduler> scheduler;
@@ -112,6 +113,20 @@ class FakeDriverFactory implements DriverFactory {
     }
 
     @Override
+    public Status launchTasks(
+        Collection<OfferID> offerIds,
+        Collection<TaskInfo> tasks,
+        Filters filters) {
+
+      return null;
+    }
+
+    @Override
+    public Status launchTasks(Collection<OfferID> offerIds, Collection<TaskInfo>
tasks) {
+      return null;
+    }
+
+    @Override
     public Status launchTasks(OfferID offerID, Collection<TaskInfo> taskInfos, Filters
filters) {
       return null;
     }

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/d1c1b4eb/src/test/java/org/apache/aurora/scheduler/MesosSchedulerImplTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/aurora/scheduler/MesosSchedulerImplTest.java b/src/test/java/org/apache/aurora/scheduler/MesosSchedulerImplTest.java
index 7a91ab8..534b2b6 100644
--- a/src/test/java/org/apache/aurora/scheduler/MesosSchedulerImplTest.java
+++ b/src/test/java/org/apache/aurora/scheduler/MesosSchedulerImplTest.java
@@ -280,7 +280,8 @@ public class MesosSchedulerImplTest extends EasyMockTest {
     }
 
     protected void expectLaunch(TaskInfo task) {
-      expect(driver.launchTasks(OFFER_ID, ImmutableList.of(task))).andReturn(DRIVER_RUNNING);
+      expect(driver.launchTasks(ImmutableList.of(OFFER_ID), ImmutableList.of(task)))
+          .andReturn(DRIVER_RUNNING);
     }
 
     void expectations() throws Exception {


Mime
View raw message