1
0
mirror of https://github.com/rancher/rke.git synced 2025-09-04 16:30:02 +00:00

Fix container log location for ros

This commit is contained in:
moelsayed
2018-06-25 20:40:51 +02:00
committed by Alena Prokharchyk
parent a67b5e1d84
commit 39e846442b
2 changed files with 3 additions and 4 deletions

View File

@@ -362,8 +362,8 @@ func (c *Cluster) BuildKubeletProcess(host *hosts.Host, prefixPath string) v3.Pr
"/run:/run:rprivate", "/run:/run:rprivate",
fmt.Sprintf("%s:/etc/ceph", path.Join(prefixPath, "/etc/ceph")), fmt.Sprintf("%s:/etc/ceph", path.Join(prefixPath, "/etc/ceph")),
"/dev:/host/dev:rprivate", "/dev:/host/dev:rprivate",
fmt.Sprintf("%s:/var/log/containers:z", path.Join(prefixPath, "/var/log/containers")), "/var/log/containers:/var/log/containers:z",
fmt.Sprintf("%s:/var/log/pods:z", path.Join(prefixPath, "/var/log/pods")), "/var/log/pods:/var/log/pods:z",
"/usr:/host/usr:ro", "/usr:/host/usr:ro",
"/etc:/host/etc:ro", "/etc:/host/etc:ro",
} }

View File

@@ -3,7 +3,6 @@ package services
import ( import (
"context" "context"
"fmt" "fmt"
"path"
"github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/container"
"github.com/rancher/rke/docker" "github.com/rancher/rke/docker"
@@ -119,7 +118,7 @@ func createLogLink(ctx context.Context, host *hosts.Host, containerName, plane,
} }
hostCfg := &container.HostConfig{ hostCfg := &container.HostConfig{
Binds: []string{ Binds: []string{
fmt.Sprintf("%s:/var/lib", path.Join(host.PrefixPath, "/var/lib")), "/var/lib:/var/lib",
}, },
Privileged: true, Privileged: true,
} }