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

Method deactivateFramework

src/master/master.cpp:3364–3399  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3362
3363
3364void Master::deactivateFramework(
3365 const UPID& from,
3366 const FrameworkID& frameworkId)
3367{
3368 ++metrics->messages_deactivate_framework;
3369
3370 Framework* framework = getFramework(frameworkId);
3371
3372 if (framework == nullptr) {
3373 LOG(WARNING)
3374 << "Ignoring deactivate framework message for framework " << frameworkId
3375 << " because the framework cannot be found";
3376
3377 return;
3378 }
3379
3380 if (framework->pid() != from) {
3381 LOG(WARNING)
3382 << "Ignoring deactivate framework message for framework " << *framework
3383 << " because it is not expected from " << from;
3384
3385 return;
3386 }
3387
3388 if (!framework->connected()) {
3389 LOG(INFO)
3390 << "Ignoring deactivate framework message for framework" << *framework
3391 << " because it is disconnected";
3392
3393 return;
3394 }
3395
3396 if (framework->active()) {
3397 deactivate(framework, true);
3398 }
3399}
3400
3401
3402void Master::disconnect(Framework* framework)

Callers 3

TEST_FFunction · 0.45
ACTION_PFunction · 0.45
deactivateMethod · 0.45

Calls 3

activeMethod · 0.80
connectedMethod · 0.65
pidMethod · 0.45

Tested by 2

TEST_FFunction · 0.36
ACTION_PFunction · 0.36