----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/28626/#review63726 -----------------------------------------------------------
Ship it! src/master/master.cpp <https://reviews.apache.org/r/28626/#comment106020> How about keeping the existing validation in terms of `Resources`, and checking DiskInfo separately? I like when the resources are validated together, because it's not clear whether validating each resource individually is equivalent to validating the resources collectively, and that might change in the future. ``` Option<Error> error = Resources::validate(task.resources()); if (error.isSome()) { return Error("Task uses invalid resources: " + error.get().message); } // Ensure any DiskInfos are valid according to the currently supported semantics. foreach (const Resource& resource, task.resources()) { if (resource.has_disk()) { error = checkDiskInfo(resource); if (error.isSome()) { return Error("Task uses invalid DiskInfo: " + error.get().message); } } } ``` src/master/master.cpp <https://reviews.apache.org/r/28626/#comment106021> Ditto here. src/master/master.cpp <https://reviews.apache.org/r/28626/#comment106014> Let's use "validate" instead of "check", as it expresses what we're doing. At that point, we don't need the comment :) src/master/master.cpp <https://reviews.apache.org/r/28626/#comment106018> s/RO/Read-only/ ? src/master/master.cpp <https://reviews.apache.org/r/28626/#comment106016> Non-persistent - Ben Mahler On Dec. 3, 2014, 7:41 p.m., Jie Yu wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/28626/ > ----------------------------------------------------------- > > (Updated Dec. 3, 2014, 7:41 p.m.) > > > Review request for mesos and Ben Mahler. > > > Bugs: MESOS-2030 > https://issues.apache.org/jira/browse/MESOS-2030 > > > Repository: mesos-git > > > Description > ------- > > Added basic DiskInfo check in master. > > > Diffs > ----- > > src/master/master.cpp 99b5a2042377481f933379cf35d4715f7d771efa > > Diff: https://reviews.apache.org/r/28626/diff/ > > > Testing > ------- > > make check > > > Thanks, > > Jie Yu > >
