New pod log directory /var/log/pods/NAMESPACE_NAME_UID.

Signed-off-by: Lantao Liu <lantaol@google.com>
This commit is contained in:
Lantao Liu
2019-02-22 01:30:43 -08:00
parent 8bde75e63f
commit f14c6c95d6
11 changed files with 49 additions and 30 deletions

View File

@@ -157,10 +157,12 @@ var _ = framework.KubeDescribe("ContainerLogPath [NodeConformance]", func() {
// get podID from created Pod
createdLogPod, err := podClient.Get(logPodName, metav1.GetOptions{})
podNs := createdLogPod.Namespace
podName := createdLogPod.Name
podID := string(createdLogPod.UID)
// build log cri file path
expectedCRILogFile := logCRIDir + "/" + podID + "/" + logContainerName + "/0.log"
expectedCRILogFile := logCRIDir + "/" + podNs + "_" + podName + "_" + podID + "/" + logContainerName + "/0.log"
logCRICheckPodName := "log-cri-check-" + string(uuid.NewUUID())
err = createAndWaitPod(makeLogCheckPod(logCRICheckPodName, logString, expectedCRILogFile))