mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevin Klues <>
Subject Review Request 46053: Added logic to validate for non-fractional GPU requests in the master.
Date Mon, 11 Apr 2016 22:11:00 GMT

This is an automatically generated e-mail. To reply, visit:

Review request for mesos, Ben Mahler, Rob Todd, and Vikrama Ditya.

Bugs: MESOS-5178

Repository: mesos


We considered adding this logic directly to the
'Resources::validate()' function, but ultimately decided against it.
The primary reason is that the existing 'Resources::validate()'
function doesn't consider the semantics of any particular resource
when performing its validation (it only makes sure that the fields in
the 'Resource' protobuf message are correctly formed). Since a
fractional 'gpus' resources is actually well-formed (and only
semantically incorrect), we decided to push this validation logic up
into the master.

Moreover, the existing logic to construct a 'Resources' object from a
'RepeatedPtrField<Resource>' silently drops any resources that don't
pass 'Resources::validate()'. This means that if we had pushed the
non-fractional 'gpus' validation into 'Resources::validate()', the
'gpus' resources would just have been silently dropped rather than
causing a TASK_ERROR in the master. This is obviously *not* the
desired behaviour.


  src/master/validation.cpp 504cd9b8bd5d40bb591b7aa5a23bd74cc210c2fc 



Test coming in subsequent commit.


Kevin Klues

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message