mirror of
https://github.com/rancher/os.git
synced 2025-09-05 00:37:12 +00:00
Make the logs path of system-docker configurable
This commit is contained in:
@@ -194,7 +194,8 @@ var schema = `{
|
|||||||
"properties": {
|
"properties": {
|
||||||
"hostname": {"type": "string"},
|
"hostname": {"type": "string"},
|
||||||
"docker": {"type": "object"},
|
"docker": {"type": "object"},
|
||||||
"network": {"$ref": "#/definitions/network_config"}
|
"network": {"$ref": "#/definitions/network_config"},
|
||||||
|
"system_docker_logs": {"type": "string"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@@ -24,7 +24,6 @@ const (
|
|||||||
ImagesPattern = "images*.tar"
|
ImagesPattern = "images*.tar"
|
||||||
ModulesArchive = "/modules.tar"
|
ModulesArchive = "/modules.tar"
|
||||||
Debug = false
|
Debug = false
|
||||||
SystemDockerLog = "/var/log/system-docker.log"
|
|
||||||
SystemDockerBin = "/usr/bin/system-dockerd"
|
SystemDockerBin = "/usr/bin/system-dockerd"
|
||||||
|
|
||||||
HashLabel = "io.rancher.os.hash"
|
HashLabel = "io.rancher.os.hash"
|
||||||
@@ -211,9 +210,10 @@ type CloudInit struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type Defaults struct {
|
type Defaults struct {
|
||||||
Hostname string `yaml:"hostname,omitempty"`
|
Hostname string `yaml:"hostname,omitempty"`
|
||||||
Docker DockerConfig `yaml:"docker,omitempty"`
|
Docker DockerConfig `yaml:"docker,omitempty"`
|
||||||
Network netconf.NetworkConfig `yaml:"network,omitempty"`
|
Network netconf.NetworkConfig `yaml:"network,omitempty"`
|
||||||
|
SystemDockerLogs string `yaml:"system_docker_logs,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r Repositories) ToArray() []string {
|
func (r Repositories) ToArray() []string {
|
||||||
|
@@ -183,7 +183,7 @@ func getLaunchConfig(cfg *config.CloudConfig, dockerCfg *config.DockerConfig) (*
|
|||||||
launchConfig.Environment = dockerCfg.Environment
|
launchConfig.Environment = dockerCfg.Environment
|
||||||
|
|
||||||
if !cfg.Rancher.Debug {
|
if !cfg.Rancher.Debug {
|
||||||
launchConfig.LogFile = config.SystemDockerLog
|
launchConfig.LogFile = cfg.Rancher.Defaults.SystemDockerLogs
|
||||||
}
|
}
|
||||||
|
|
||||||
return &launchConfig, args
|
return &launchConfig, args
|
||||||
|
@@ -16,6 +16,7 @@ rancher:
|
|||||||
network:
|
network:
|
||||||
dns:
|
dns:
|
||||||
nameservers: [8.8.8.8, 8.8.4.4]
|
nameservers: [8.8.8.8, 8.8.4.4]
|
||||||
|
system_docker_logs: /var/log/system-docker.log
|
||||||
ssh:
|
ssh:
|
||||||
daemon: true
|
daemon: true
|
||||||
hypervisor_service: true
|
hypervisor_service: true
|
||||||
|
Reference in New Issue
Block a user