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

Method updateDrainStatus

src/slave/slave.cpp:10229–10254  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10227
10228
10229void Slave::updateDrainStatus()
10230{
10231 if (drainConfig.isNone()) {
10232 return;
10233 }
10234
10235 bool drained = operations.empty() && frameworks.empty();
10236
10237 if (!drained) {
10238 return;
10239 }
10240
10241 LOG(INFO) << "Agent finished draining";
10242
10243 const string drainConfigPath = paths::getDrainConfigPath(metaDir, info.id());
10244
10245 Try<Nothing> rm = os::rm(drainConfigPath);
10246
10247 if (rm.isError()) {
10248 EXIT(EXIT_FAILURE) << "Could not remove persisted drain configuration "
10249 << "'" << drainConfigPath << "': " << rm.error();
10250 }
10251
10252 drainConfig = None();
10253 estimatedDrainStartTime = None();
10254}
10255
10256
10257Framework::Framework(

Callers

nothing calls this directly

Calls 8

getDrainConfigPathFunction · 0.85
NoneClass · 0.85
errorMethod · 0.65
rmFunction · 0.50
isNoneMethod · 0.45
emptyMethod · 0.45
idMethod · 0.45
isErrorMethod · 0.45

Tested by

no test coverage detected