MCPcopy Create free account
hub / github.com/apache/mesos / validateSlaveID

Function validateSlaveID

src/master/validation.cpp:1379–1388  ·  view source on GitHub ↗

Validates that the slave ID used by a task is correct.

Source from the content-addressed store, hash-verified

1377
1378// Validates that the slave ID used by a task is correct.
1379Option<Error> validateSlaveID(const TaskInfo& task, Slave* slave)
1380{
1381 if (task.slave_id() != slave->id) {
1382 return Error(
1383 "Task uses invalid agent " + task.slave_id().value() +
1384 " while agent " + slave->id.value() + " is expected");
1385 }
1386
1387 return None();
1388}
1389
1390
1391Option<Error> validateKillPolicy(const TaskInfo& task)

Callers 1

validateSlaveInfoFunction · 0.70

Calls 3

NoneClass · 0.85
ErrorFunction · 0.50
valueMethod · 0.45

Tested by

no test coverage detected