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

Method taskCheckUpdated

src/launcher/default_executor.cpp:1337–1380  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1335 }
1336
1337 void taskCheckUpdated(
1338 const TaskID& taskId,
1339 const CheckStatusInfo& checkStatus)
1340 {
1341 // If the checked container has already been waited on,
1342 // ignore the check update. This prevents us from sending
1343 // `TASK_RUNNING` after a terminal status update.
1344 if (!containers.contains(taskId)) {
1345 VLOG(1) << "Received check update for terminated task"
1346 << " '" << taskId << "'; ignoring";
1347 return;
1348 }
1349
1350 // If the checked container has already been asked to terminate,
1351 // ignore the check update.
1352 //
1353 // TODO(alexr): Once we support `TASK_KILLING` in this executor,
1354 // consider sending check updates after sending `TASK_KILLING`.
1355 if (containers.at(taskId)->checker.isNone()) {
1356 VLOG(1) << "Received check update for terminating task"
1357 << " '" << taskId << "'; ignoring";
1358 return;
1359 }
1360
1361 LOG(INFO) << "Received check update '" << checkStatus
1362 << "' for task '" << taskId << "'";
1363
1364 // Use the previous task status to preserve all attached information.
1365 // We always send a `TASK_RUNNING` right after the task is launched.
1366 CHECK_SOME(containers.at(taskId)->lastTaskStatus);
1367 const TaskStatus status = protobuf::createTaskStatus(
1368 containers.at(taskId)->lastTaskStatus.get(),
1369 id::UUID::random(),
1370 Clock::now().secs(),
1371 None(),
1372 None(),
1373 None(),
1374 TaskStatus::REASON_TASK_CHECK_STATUS_UPDATED,
1375 None(),
1376 None(),
1377 checkStatus);
1378
1379 forward(status);
1380 }
1381
1382 void taskHealthUpdated(const TaskHealthStatus& healthStatus)
1383 {

Callers

nothing calls this directly

Calls 8

createTaskStatusFunction · 0.85
randomFunction · 0.85
NoneClass · 0.85
atMethod · 0.80
containsMethod · 0.45
isNoneMethod · 0.45
getMethod · 0.45
secsMethod · 0.45

Tested by

no test coverage detected