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

Method attachVolume

src/csi/v1_volume_manager.cpp:444–459  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

442
443
444Future<Nothing> VolumeManagerProcess::attachVolume(const string& volumeId)
445{
446 if (!volumes.contains(volumeId)) {
447 return Failure("Cannot attach unknown volume '" + volumeId + "'");
448 }
449
450 VolumeData& volume = volumes.at(volumeId);
451
452 LOG(INFO) << "Attaching volume '" << volumeId << "' in "
453 << volume.state.state() << " state";
454
455 // Volume attaching is serialized with other operations on the same volume to
456 // avoid races.
457 return volume.sequence->add(std::function<Future<Nothing>()>(
458 process::defer(self(), &Self::_attachVolume, volumeId)));
459}
460
461
462Future<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