You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by be...@apache.org on 2019/11/08 13:25:28 UTC
[mesos] 12/15: Updated offer operation resource validation for
reservation updates.
This is an automated email from the ASF dual-hosted git repository.
bennoe pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git
commit f1a9d7206c7f6fee8e435e8fbe8e69802b1e9388
Author: Benno Evers <be...@mesosphere.com>
AuthorDate: Fri Nov 8 14:08:40 2019 +0100
Updated offer operation resource validation for reservation updates.
Updated `validateAndUpgradeResources()` to also validate the `source`
field in a reservation.
Review: https://reviews.apache.org/r/71700/
---
src/common/resources_utils.cpp | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/common/resources_utils.cpp b/src/common/resources_utils.cpp
index 5e78997..4c958c8 100644
--- a/src/common/resources_utils.cpp
+++ b/src/common/resources_utils.cpp
@@ -618,6 +618,12 @@ Option<Error> validateAndUpgradeResources(Offer::Operation* operation)
return error;
}
+ error = Resources::validate(operation->reserve().source());
+
+ if (error.isSome()) {
+ return error;
+ }
+
break;
}
case Offer::Operation::UNRESERVE: {