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

Method deactivate

src/master/master.cpp:3423–3455  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3421
3422
3423void Master::deactivate(Framework* framework, bool rescind)
3424{
3425 CHECK_NOTNULL(framework);
3426
3427 LOG(INFO) << "Deactivating framework " << *framework;
3428
3429 CHECK(framework->deactivate());
3430
3431 // Tell the allocator to stop allocating resources to this framework.
3432 allocator->deactivateFramework(framework->id());
3433
3434 // Remove the framework's offers.
3435 foreach (Offer* offer, utils::copy(framework->offers)) {
3436 if (rescind) {
3437 rescindOffer(offer);
3438 } else {
3439 discardOffer(offer);
3440 }
3441 }
3442
3443 // Remove the framework's inverse offers.
3444 foreach (InverseOffer* inverseOffer, utils::copy(framework->inverseOffers)) {
3445 allocator->updateInverseOffer(
3446 inverseOffer->slave_id(),
3447 inverseOffer->framework_id(),
3448 UnavailableResources{
3449 inverseOffer->resources(),
3450 inverseOffer->unavailability()},
3451 None());
3452
3453 removeInverseOffer(inverseOffer, rescind);
3454 }
3455}
3456
3457
3458void Master::disconnect(Slave* slave)

Callers 4

TESTFunction · 0.45
TYPED_TESTFunction · 0.45
_drainAgentMethod · 0.45
_deactivateAgentMethod · 0.45

Calls 8

copyFunction · 0.85
NoneClass · 0.85
foreachFunction · 0.70
deactivateFrameworkMethod · 0.45
idMethod · 0.45
updateInverseOfferMethod · 0.45
resourcesMethod · 0.45
deactivateSlaveMethod · 0.45

Tested by 2

TESTFunction · 0.36
TYPED_TESTFunction · 0.36