Add SuccessfulMountVolume message to the events of pod

This commit is contained in:
ailusazh 2017-03-30 18:03:25 +08:00
parent c13d8917c2
commit f57224c0d2

View File

@ -465,11 +465,14 @@ func (og *operationGenerator) GenerateMountVolumeFunc(
return detailedErr
}
simpleMsg, detailedMsg := volumeToMount.GenerateMsg("MountVolume.SetUp succeeded", "")
verbosity := glog.Level(1)
if isRemount {
verbosity = glog.Level(7)
} else {
og.recorder.Eventf(volumeToMount.Pod, v1.EventTypeNormal, kevents.SuccessfulMountVolume, simpleMsg)
}
glog.V(verbosity).Infof(volumeToMount.GenerateMsgDetailed("MountVolume.SetUp succeeded", ""))
glog.V(verbosity).Infof(detailedMsg)
// Update actual state of world
markVolMountedErr := actualStateOfWorld.MarkVolumeAsMounted(