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

Function getContainerConfig

src/slave/containerizer/mesos/paths.cpp:351–375  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

349
350
351Result<ContainerConfig> getContainerConfig(
352 const string& runtimeDir,
353 const ContainerID& containerId)
354{
355 const string path = path::join(
356 getRuntimePath(runtimeDir, containerId),
357 CONTAINER_CONFIG_FILE);
358
359 if (!os::exists(path)) {
360 // This is possible if we recovered a container launched before we
361 // started to checkpoint `ContainerConfig`.
362 VLOG(1) << "Config path '" << path << "' is missing for container' "
363 << containerId << "'";
364 return None();
365 }
366
367 Result<ContainerConfig> containerConfig = state::read<ContainerConfig>(path);
368
369 if (containerConfig.isError()) {
370 return Error("Failed to read launch config of container: " +
371 containerConfig.error());
372 }
373
374 return containerConfig;
375}
376
377
378Try<vector<ContainerID>> getContainerIds(const string& runtimeDir)

Callers 5

TEST_PFunction · 0.85
TEST_FFunction · 0.85
getParentShmPathFunction · 0.85
foreachFunction · 0.85
isPrivilegedContainerFunction · 0.85

Calls 7

getRuntimePathFunction · 0.85
NoneClass · 0.85
errorMethod · 0.65
joinFunction · 0.50
existsFunction · 0.50
ErrorFunction · 0.50
isErrorMethod · 0.45

Tested by 2

TEST_PFunction · 0.68
TEST_FFunction · 0.68