You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by me...@apache.org on 2015/06/02 10:42:47 UTC

[1/3] mesos git commit: Used relative url in /help generated links point.

Repository: mesos
Updated Branches:
  refs/heads/master 60d690d16 -> 0aab1bb0f


Used relative url in /help generated links point.

Review: https://reviews.apache.org/r/34655


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

Branch: refs/heads/master
Commit: e1027ef20c6e6abbb959808233d11d4e7ad27f4f
Parents: 60d690d
Author: haosdent huang <ha...@gmail.com>
Authored: Tue Jun 2 00:39:03 2015 -0700
Committer: Adam B <ad...@mesosphere.io>
Committed: Tue Jun 2 00:40:29 2015 -0700

----------------------------------------------------------------------
 3rdparty/libprocess/src/help.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/e1027ef2/3rdparty/libprocess/src/help.cpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/src/help.cpp b/3rdparty/libprocess/src/help.cpp
index 85e1bde..ce2de11 100644
--- a/3rdparty/libprocess/src/help.cpp
+++ b/3rdparty/libprocess/src/help.cpp
@@ -125,7 +125,7 @@ Future<http::Response> Help::help(const http::Request& request)
     document += "## HELP\n";
     foreachkey (const string& id, helps) {
       document += "> [/" + id + "][" + id + "]\n";
-      references += "[" + id + "]: /help/" + id + "\n";
+      references += "[" + id + "]: help/" + id + "\n";
     }
   } else if (name.isNone()) {    // http://ip:port/help/id
     if (helps.count(id.get()) == 0) {
@@ -137,7 +137,7 @@ Future<http::Response> Help::help(const http::Request& request)
     foreachkey (const string& name, helps[id.get()]) {
       const string& path = id.get() + name;
       document += "> [/" +  path + "][" + path + "]\n";
-      references += "[" + path + "]: /help/" + path + "\n";
+      references += "[" + path + "]: " + path + "\n";
     }
   } else {                       // http://ip:port/help/id/name
     if (helps.count(id.get()) == 0) {


[3/3] mesos git commit: Updated test-frameworks to support principal only credential.

Posted by me...@apache.org.
Updated test-frameworks to support principal only credential.

Review: https://reviews.apache.org/r/33058


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/0aab1bb0
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/0aab1bb0
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/0aab1bb0

Branch: refs/heads/master
Commit: 0aab1bb0f85fec362bc23afc5aff07bf8a7de217
Parents: 73e6186
Author: Till Toenshoff <to...@me.com>
Authored: Tue Jun 2 01:05:16 2015 -0700
Committer: Adam B <ad...@mesosphere.io>
Committed: Tue Jun 2 01:06:29 2015 -0700

----------------------------------------------------------------------
 src/examples/java/TestFramework.java  | 15 ++++++---------
 src/examples/python/test_framework.py |  8 +++-----
 src/examples/test_framework.cpp       |  8 +++-----
 3 files changed, 12 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/0aab1bb0/src/examples/java/TestFramework.java
----------------------------------------------------------------------
diff --git a/src/examples/java/TestFramework.java b/src/examples/java/TestFramework.java
index 9e95369..265005b 100644
--- a/src/examples/java/TestFramework.java
+++ b/src/examples/java/TestFramework.java
@@ -242,15 +242,12 @@ public class TestFramework {
         System.exit(1);
       }
 
-      if (System.getenv("DEFAULT_SECRET") == null) {
-        System.err.println("Expecting authentication secret in the environment");
-        System.exit(1);
-      }
+      Credential.Builder credentialBuilder = Credential.newBuilder()
+        .setPrincipal(System.getenv("DEFAULT_PRINCIPAL"));
 
-      Credential credential = Credential.newBuilder()
-        .setPrincipal(System.getenv("DEFAULT_PRINCIPAL"))
-        .setSecret(ByteString.copyFrom(System.getenv("DEFAULT_SECRET").getBytes()))
-        .build();
+      if (System.getenv("DEFAULT_SECRET") != null) {
+          credentialBuilder.setSecret(ByteString.copyFrom(System.getenv("DEFAULT_SECRET").getBytes()));
+      }
 
       frameworkBuilder.setPrincipal(System.getenv("DEFAULT_PRINCIPAL"));
 
@@ -259,7 +256,7 @@ public class TestFramework {
           frameworkBuilder.build(),
           args[0],
           implicitAcknowledgements,
-          credential);
+          credentialBuilder.build());
     } else {
       frameworkBuilder.setPrincipal("test-framework-java");
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/0aab1bb0/src/examples/python/test_framework.py
----------------------------------------------------------------------
diff --git a/src/examples/python/test_framework.py b/src/examples/python/test_framework.py
index a179df5..6af6d22 100755
--- a/src/examples/python/test_framework.py
+++ b/src/examples/python/test_framework.py
@@ -185,13 +185,11 @@ if __name__ == "__main__":
             print "Expecting authentication principal in the environment"
             sys.exit(1);
 
-        if not os.getenv("DEFAULT_SECRET"):
-            print "Expecting authentication secret in the environment"
-            sys.exit(1);
-
         credential = mesos_pb2.Credential()
         credential.principal = os.getenv("DEFAULT_PRINCIPAL")
-        credential.secret = os.getenv("DEFAULT_SECRET")
+
+        if os.getenv("DEFAULT_SECRET"):
+            credential.secret = os.getenv("DEFAULT_SECRET")
 
         framework.principal = os.getenv("DEFAULT_PRINCIPAL")
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/0aab1bb0/src/examples/test_framework.cpp
----------------------------------------------------------------------
diff --git a/src/examples/test_framework.cpp b/src/examples/test_framework.cpp
index 9f4b53e..25f5f8c 100644
--- a/src/examples/test_framework.cpp
+++ b/src/examples/test_framework.cpp
@@ -261,13 +261,11 @@ int main(int argc, char** argv)
       EXIT(1) << "Expecting authentication principal in the environment";
     }
 
-    if (!os::hasenv("DEFAULT_SECRET")) {
-      EXIT(1) << "Expecting authentication secret in the environment";
-    }
-
     Credential credential;
     credential.set_principal(getenv("DEFAULT_PRINCIPAL"));
-    credential.set_secret(getenv("DEFAULT_SECRET"));
+    if (os::hasenv("DEFAULT_SECRET")) {
+      credential.set_secret(getenv("DEFAULT_SECRET"));
+    }
 
     framework.set_principal(getenv("DEFAULT_PRINCIPAL"));
 


[2/3] mesos git commit: Fixed line length error.

Posted by me...@apache.org.
Fixed line length error.


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/73e61865
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/73e61865
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/73e61865

Branch: refs/heads/master
Commit: 73e6186564238339b33847b3a4265623f839a911
Parents: e1027ef
Author: Adam B <ad...@mesosphere.io>
Authored: Tue Jun 2 00:53:55 2015 -0700
Committer: Adam B <ad...@mesosphere.io>
Committed: Tue Jun 2 00:53:55 2015 -0700

----------------------------------------------------------------------
 src/tests/resources_tests.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/73e61865/src/tests/resources_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/resources_tests.cpp b/src/tests/resources_tests.cpp
index b4a9bbf..4952e1b 100644
--- a/src/tests/resources_tests.cpp
+++ b/src/tests/resources_tests.cpp
@@ -230,7 +230,8 @@ TEST(ResourcesTest, PrintingExtendedAttributes)
   stream.str("");
   disk.mutable_reservation()->set_principal("hdfs-1234-4321");
   stream << disk;
-  EXPECT_EQ(stream.str(), "disk(alice, hdfs-1234-4321)[hadoop:/hdfs:/data:rw]:1");
+  EXPECT_EQ(stream.str(),
+            "disk(alice, hdfs-1234-4321)[hadoop:/hdfs:/data:rw]:1");
 }