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

Method attachVolume

src/csi/v0_volume_manager.cpp:423–438  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

421
422
423Future<Nothing> VolumeManagerProcess::attachVolume(const string& volumeId)
424{
425 if (!volumes.contains(volumeId)) {
426 return Failure("Cannot attach unknown volume '" + volumeId + "'");
427 }
428
429 VolumeData& volume = volumes.at(volumeId);
430
431 LOG(INFO) << "Attaching volume '" << volumeId << "' in "
432 << volume.state.state() << " state";
433
434 // Volume attaching is serialized with other operations on the same volume to
435 // avoid races.
436 return volume.sequence->add(std::function<Future<Nothing>()>(
437 process::defer(self(), &Self::_attachVolume, volumeId)));
438}
439
440
441Future<Nothing> VolumeManagerProcess::detachVolume(const string& volumeId)

Callers

nothing calls this directly

Calls 8

FailureClass · 0.85
deferFunction · 0.85
atMethod · 0.80
containsMethod · 0.45
stateMethod · 0.45
addMethod · 0.45
thenMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected