You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by ji...@apache.org on 2014/12/18 02:32:16 UTC

[3/4] mesos git commit: Disallowed empty DiskInfo.

Disallowed empty DiskInfo.

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


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

Branch: refs/heads/master
Commit: 765dfdaacfaf249c8f34358795e31d749b33cc40
Parents: f3a4a5a
Author: Jie Yu <yu...@gmail.com>
Authored: Wed Dec 17 10:26:29 2014 -0800
Committer: Jie Yu <yu...@gmail.com>
Committed: Wed Dec 17 17:31:08 2014 -0800

----------------------------------------------------------------------
 src/master/master.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/765dfdaa/src/master/master.cpp
----------------------------------------------------------------------
diff --git a/src/master/master.cpp b/src/master/master.cpp
index 0f55a5c..bc4031b 100644
--- a/src/master/master.cpp
+++ b/src/master/master.cpp
@@ -1985,10 +1985,10 @@ struct ResourceValidator : TaskInfoValidator
       if (std::count_if(id.begin(), id.end(), invalid) > 0) {
         return Error("Persistence ID '" + id + "' contains invalid characters");
       }
+    } else if (resource.disk().has_volume()) {
+      return Error("Non-persistent disk volume is not supported");
     } else {
-      if (resource.disk().has_volume()) {
-        return Error("Non-persistent disk volume is not supported");
-      }
+      return Error("DiskInfo is set but empty");
     }
 
     return None();