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

Method exitedExecutor

src/master/master.cpp:8455–8524  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8453
8454
8455void Master::exitedExecutor(
8456 const UPID& from,
8457 const SlaveID& slaveId,
8458 const FrameworkID& frameworkId,
8459 const ExecutorID& executorId,
8460 int32_t status)
8461{
8462 ++metrics->messages_exited_executor;
8463
8464 if (slaves.removed.get(slaveId).isSome()) {
8465 // If the slave has been removed, drop the executor message. The
8466 // master is no longer trying to health check this slave; when the
8467 // slave realizes it hasn't received any pings from the master, it
8468 // will eventually try to reregister.
8469 LOG(WARNING) << "Ignoring exited executor '" << executorId
8470 << "' of framework " << frameworkId
8471 << " on removed agent " << slaveId;
8472
8473 return;
8474 }
8475
8476 Slave* slave = slaves.registered.get(slaveId);
8477
8478 if (slave == nullptr) {
8479 LOG(WARNING) << "Ignoring exited executor '" << executorId
8480 << "' of framework " << frameworkId
8481 << " on unknown agent " << slaveId;
8482
8483 return;
8484 }
8485
8486 // Only update master's internal data structures here for proper
8487 // accounting. The TASK_LOST updates are handled by the slave.
8488
8489 if (!slave->hasExecutor(frameworkId, executorId)) {
8490 LOG(WARNING) << "Ignoring unknown exited executor '" << executorId
8491 << "' of framework " << frameworkId
8492 << " on agent " << *slave;
8493
8494 return;
8495 }
8496
8497 LOG(INFO) << "Executor '" << executorId
8498 << "' of framework " << frameworkId
8499 << " on agent " << *slave << ": "
8500 << WSTRINGIFY(status);
8501
8502 removeExecutor(slave, frameworkId, executorId);
8503
8504 // TODO(vinod): Reliably forward this message to the scheduler.
8505 Framework* framework = getFramework(frameworkId);
8506 if (framework == nullptr || !framework->connected()) {
8507 string status = (framework == nullptr ? "unknown" : "disconnected");
8508
8509 LOG(WARNING)
8510 << "Not forwarding exited executor message for executor '" << executorId
8511 << "' of framework " << frameworkId << " on agent " << *slave
8512 << " because the framework is " << status;

Callers

nothing calls this directly

Calls 7

WSTRINGIFYFunction · 0.85
CopyFromMethod · 0.80
connectedMethod · 0.65
sendMethod · 0.65
isSomeMethod · 0.45
getMethod · 0.45
hasExecutorMethod · 0.45

Tested by

no test coverage detected