Project: mesos
Issue MESOS-3338: Dynamic reservations are not counted as used resources in the master
Dynamically reserved resources should be considered used or allocated and hence reflected in Mesos bookkeeping structures and {{state.json}}. I expanded the {{ReservationTest.ReserveThenUnreserve}} test with the following section: {code} // Check that the Master counts the reservation as a used resource. { Future response = process::http::get(master.get(), "state.json"); AWAIT_READY(response); Try parse = JSON::parse(response.get().body); ASSERT_SOME(parse); Result cpus = parse.get().find("slaves[0].used_resources.cpus"); ASSERT_SOME_EQ(JSON::Number(1), cpus); } {code} and got {noformat} ../../../src/tests/reservation_tests.cpp:168: Failure Value of: (cpus).get() Actual: 0 Expected: JSON::Number(1) Which is: 1 {noformat} Idea for new resources states: https://docs.google.com/drawings/d/1aquVIqPY8D_MR-cQjZu-wz5nNn3cYP3jXqegUHl-Kzc/edit
Story points: 3