Skip to content

Commit

Permalink
Merge branch 'master' of gitlab.ricebook.net:platform/core
Browse files Browse the repository at this point in the history
  • Loading branch information
tonicmuroq committed May 12, 2017
2 parents 9ab16bb + e55d561 commit 2e6ae27
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.7.29d
0.7.29e
6 changes: 3 additions & 3 deletions cluster/calcium/create_container.go
Original file line number Diff line number Diff line change
Expand Up @@ -563,11 +563,11 @@ func (c *calcium) makeContainerOptions(index int, quota map[string]int, specs ty
log.Debugf("App %s will bind %v", specs.Appname, binds)

// log config
// 默认是配置里的driver, 如果entrypoint有指定json-file就用json-file.
// 默认是配置里的driver, 如果entrypoint有指定就用指定的.
// 如果是debug模式就用syslog, 拿配置里的syslog配置来发送.
logDriver := c.config.Docker.LogDriver
if entry.LogConfig == "json-file" {
logDriver = "json-file"
if entry.LogConfig != "" {
logDriver = entry.LogConfig
}
logConfig := enginecontainer.LogConfig{Type: logDriver}
if opts.Debug {
Expand Down
5 changes: 3 additions & 2 deletions cluster/calcium/run_and_wait.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func (c *calcium) RunAndWait(specs types.Specs, opts *types.DeployOptions) (chan

// 强制为 json-file 输出
entry, _ := specs.Entrypoints[opts.Entrypoint]
entry.LogConfig = "json-file"
entry.LogConfig = "journald"
specs.Entrypoints[opts.Entrypoint] = entry

// 默认给出1200秒的超时时间吧
Expand Down Expand Up @@ -68,7 +68,8 @@ func (c *calcium) RunAndWait(specs types.Specs, opts *types.DeployOptions) (chan
defer log.Infof("[RunAndWait] Container %s finished and removed", containerID[:12])
defer c.removeContainerSync([]string{containerID})

ctx, _ := context.WithTimeout(context.Background(), time.Duration(waitTimeout)*time.Second)
ctx, cancel := context.WithTimeout(context.Background(), time.Duration(waitTimeout)*time.Second)
defer cancel()
resp, err := node.Engine.ContainerLogs(ctx, containerID, logsOpts)
if err != nil {
log.Errorf("[RunAndWait] Failed to get logs, %v", err)
Expand Down

0 comments on commit 2e6ae27

Please sign in to comment.