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

Method freeze

src/linux/cgroups.cpp:1305–1333  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1303 ~Freezer() override {}
1304
1305 void freeze()
1306 {
1307 Try<Nothing> freeze =
1308 internal::freezer::state(hierarchy, cgroup, "FROZEN");
1309 if (freeze.isError()) {
1310 promise.fail(freeze.error());
1311 terminate(self());
1312 return;
1313 }
1314
1315 Try<string> state = internal::freezer::state(hierarchy, cgroup);
1316 if (state.isError()) {
1317 promise.fail(state.error());
1318 terminate(self());
1319 return;
1320 }
1321
1322 if (state.get() == "FROZEN") {
1323 LOG(INFO) << "Successfully froze cgroup "
1324 << path::join(hierarchy, cgroup)
1325 << " after " << (Clock::now() - start);
1326 promise.set(Nothing());
1327 terminate(self());
1328 return;
1329 }
1330
1331 // Attempt to freeze the freezer cgroup again.
1332 delay(Milliseconds(100), self(), &Self::freeze);
1333 }
1334
1335 void thaw()
1336 {

Callers

nothing calls this directly

Calls 11

stateFunction · 0.85
NothingClass · 0.85
MillisecondsClass · 0.85
errorMethod · 0.65
terminateFunction · 0.50
joinFunction · 0.50
delayFunction · 0.50
isErrorMethod · 0.45
failMethod · 0.45
getMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected