1
0
mirror of https://github.com/rancher/os.git synced 2025-09-04 16:21:07 +00:00

Make the logs path of system-docker configurable

This commit is contained in:
niusmallnan
2018-10-17 13:15:57 +08:00
committed by niusmallnan
parent 370e5f68a9
commit e605f82ad8
4 changed files with 8 additions and 6 deletions

View File

@@ -194,7 +194,8 @@ var schema = `{
"properties": {
"hostname": {"type": "string"},
"docker": {"type": "object"},
"network": {"$ref": "#/definitions/network_config"}
"network": {"$ref": "#/definitions/network_config"},
"system_docker_logs": {"type": "string"}
}
},

View File

@@ -24,7 +24,6 @@ const (
ImagesPattern = "images*.tar"
ModulesArchive = "/modules.tar"
Debug = false
SystemDockerLog = "/var/log/system-docker.log"
SystemDockerBin = "/usr/bin/system-dockerd"
HashLabel = "io.rancher.os.hash"
@@ -214,6 +213,7 @@ type Defaults struct {
Hostname string `yaml:"hostname,omitempty"`
Docker DockerConfig `yaml:"docker,omitempty"`
Network netconf.NetworkConfig `yaml:"network,omitempty"`
SystemDockerLogs string `yaml:"system_docker_logs,omitempty"`
}
func (r Repositories) ToArray() []string {

View File

@@ -183,7 +183,7 @@ func getLaunchConfig(cfg *config.CloudConfig, dockerCfg *config.DockerConfig) (*
launchConfig.Environment = dockerCfg.Environment
if !cfg.Rancher.Debug {
launchConfig.LogFile = config.SystemDockerLog
launchConfig.LogFile = cfg.Rancher.Defaults.SystemDockerLogs
}
return &launchConfig, args

View File

@@ -16,6 +16,7 @@ rancher:
network:
dns:
nameservers: [8.8.8.8, 8.8.4.4]
system_docker_logs: /var/log/system-docker.log
ssh:
daemon: true
hypervisor_service: true