This is an automated email from the ASF dual-hosted git repository.
bbannier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git
The following commit(s) were added to refs/heads/master by this push:
new 77ba44c Removed outdated check assuming no reservations with disks.
77ba44c is described below
commit 77ba44ccd6837367ed3a059fc559b2dd7dcf06ec
Author: Benjamin Bannier <[email protected]>
AuthorDate: Mon Dec 16 11:59:38 2019 +0100
Removed outdated check assuming no reservations with disks.
Since `disk` resources can be re-reserved we need to allow for them to
appear in `RESERVE` operations. The validity of the operation and the
resources appearing in them are already check elsewhere and the check
removed here was intended more as a sanity check/avenue to create a
better error message. With re-reservations it is now incorrect.
Review: https://reviews.apache.org/r/71916/
---
src/master/validation.cpp | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/src/master/validation.cpp b/src/master/validation.cpp
index c5fbbdd..d628bb3 100644
--- a/src/master/validation.cpp
+++ b/src/master/validation.cpp
@@ -2381,15 +2381,6 @@ Option<Error> validate(
" unallocated resources");
}
}
-
- // NOTE: This check would be covered by 'contains' since there
- // shouldn't be any unreserved resources with 'disk' set.
- // However, we keep this check since it will be a more useful
- // error message than what contains would produce.
- if (Resources::isPersistentVolume(resource)) {
- return Error("A persistent volume " + stringify(resource) +
- " must already be reserved");
- }
}
if (frameworkInfo.isSome()) {