Merge pull request #85170 from timyinshi/logSymlink

modify dockerID to containerID
This commit is contained in:
Kubernetes Prow Robot 2019-12-06 14:27:35 -08:00 committed by GitHub
commit c9f690d418
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -44,9 +44,9 @@ func legacyLogSymlink(containerID string, containerName, podName, podNamespace s
containerName, containerID)
}
func logSymlink(containerLogsDir, podFullName, containerName, dockerID string) string {
func logSymlink(containerLogsDir, podFullName, containerName, containerID string) string {
suffix := fmt.Sprintf(".%s", legacyLogSuffix)
logPath := fmt.Sprintf("%s_%s-%s", podFullName, containerName, dockerID)
logPath := fmt.Sprintf("%s_%s-%s", podFullName, containerName, containerID)
// Length of a filename cannot exceed 255 characters in ext4 on Linux.
if len(logPath) > ext4MaxFileNameLen-len(suffix) {
logPath = logPath[:ext4MaxFileNameLen-len(suffix)]