mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Switch back some Errorf to Debugf.
This commit is contained in:
parent
2812baf395
commit
c2175ae736
3 changed files with 12 additions and 5 deletions
|
@ -176,7 +176,9 @@ func (b *buildFile) CmdEnv(args string) error {
|
|||
func (b *buildFile) CmdCmd(args string) error {
|
||||
var cmd []string
|
||||
if err := json.Unmarshal([]byte(args), &cmd); err != nil {
|
||||
utils.Errorf("Error unmarshalling: %s, setting cmd to /bin/sh -c", err)
|
||||
// If the unmarshal fails, it is not an error, we just use the
|
||||
// args as a string.
|
||||
utils.Debugf("Error unmarshalling: %s, setting cmd to /bin/sh -c", err)
|
||||
cmd = []string{"/bin/sh", "-c", args}
|
||||
}
|
||||
if err := b.commit("", cmd, fmt.Sprintf("CMD %v", cmd)); err != nil {
|
||||
|
@ -296,7 +298,7 @@ func (b *buildFile) addContext(container *Container, orig, dest string) error {
|
|||
}
|
||||
// First try to unpack the source as an archive
|
||||
} else if err := UntarPath(origPath, destPath); err != nil {
|
||||
utils.Errorf("Couldn't untar %s to %s: %s", origPath, destPath, err)
|
||||
utils.Debugf("[tar] Not a directory nor a tar archive. Copying as a file. Untar error from %s to %s: %s", origPath, destPath, err)
|
||||
// If that fails, just copy it as a regular file
|
||||
if err := os.MkdirAll(path.Dir(destPath), 0755); err != nil {
|
||||
return err
|
||||
|
|
|
@ -1539,7 +1539,11 @@ func (cli *DockerCli) CmdRun(args ...string) error {
|
|||
if config.AttachStdin || config.AttachStdout || config.AttachStderr {
|
||||
if config.Tty {
|
||||
if err := cli.monitorTtySize(runResult.ID); err != nil {
|
||||
utils.Errorf("Error monitoring TTY size: %s\n", err)
|
||||
// When running the test suite, there is no terminal, just pipes.
|
||||
// Discard the error then.
|
||||
if os.Getenv("TEST") != "1" {
|
||||
utils.Errorf("Error monitoring TTY size: %s\n", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -979,12 +979,13 @@ func (container *Container) monitor(hostConfig *HostConfig) {
|
|||
// If the command does not exists, try to wait via lxc
|
||||
if container.cmd == nil {
|
||||
if err := container.waitLxc(); err != nil {
|
||||
utils.Errorf("%s: Process: %s", container.ID, err)
|
||||
// Discard the error as any signals or non 0 returns will generate an error
|
||||
utils.Debugf("%s: Process: %s", container.ShortID(), err)
|
||||
}
|
||||
} else {
|
||||
if err := container.cmd.Wait(); err != nil {
|
||||
// Discard the error as any signals or non 0 returns will generate an error
|
||||
utils.Errorf("%s: Process: %s", container.ID, err)
|
||||
utils.Debugf("%s: Process: %s", container.ShortID(), err)
|
||||
}
|
||||
}
|
||||
utils.Debugf("Process finished")
|
||||
|
|
Loading…
Add table
Reference in a new issue