Skip to content

Commit

Permalink
docker/config: update -mtu flag default
Browse files Browse the repository at this point in the history
Docker-DCO-1.1-Signed-off-by: Johan Euphrosine <proppy@google.com> (github: google)
  • Loading branch information
proppy committed Feb 3, 2014
1 parent 1b9c5ed commit 92e61f8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion config.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func DaemonConfigFromJob(job *engine.Job) *DaemonConfig {
if mtu := job.GetenvInt("Mtu"); mtu != 0 {
config.Mtu = mtu
} else {
config.Mtu = DefaultNetworkMtu
config.Mtu = GetDefaultNetworkMtu()
}
config.DisableNetwork = job.Getenv("BridgeIface") == DisableNetworkBridge

Expand Down
2 changes: 1 addition & 1 deletion docker/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func main() {
flInterContainerComm = flag.Bool([]string{"#icc", "-icc"}, true, "Enable inter-container communication")
flGraphDriver = flag.String([]string{"s", "-storage-driver"}, "", "Force the docker runtime to use a specific storage driver")
flHosts = docker.NewListOpts(docker.ValidateHost)
flMtu = flag.Int([]string{"#mtu", "-mtu"}, docker.GetDefaultNetworkMtu(), "Set the containers network mtu")
flMtu = flag.Int([]string{"#mtu", "-mtu"}, 0, "Set the containers network MTU; if no value is provided: default to the default route MTU or 1500 if not default route is available")
)
flag.Var(&flDns, []string{"#dns", "-dns"}, "Force docker to use specific DNS servers")
flag.Var(&flHosts, []string{"H", "-host"}, "tcp://host:port, unix://path/to/socket, fd://* or fd://socketfd to use in daemon mode. Multiple sockets can be specified")
Expand Down
9 changes: 5 additions & 4 deletions integration/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ import (
"archive/tar"
"bytes"
"fmt"
"github.com/dotcloud/docker"
"github.com/dotcloud/docker/engine"
"github.com/dotcloud/docker/utils"
"io"
"io/ioutil"
"net/http"
Expand All @@ -16,6 +13,10 @@ import (
"strings"
"testing"
"time"

"github.com/dotcloud/docker"
"github.com/dotcloud/docker/engine"
"github.com/dotcloud/docker/utils"
)

// This file contains utility functions for docker's unit test suite.
Expand All @@ -32,7 +33,7 @@ func mkRuntime(f utils.Fataler) *docker.Runtime {
config := &docker.DaemonConfig{
Root: root,
AutoRestart: false,
Mtu: docker.DefaultNetworkMtu,
Mtu: docker.GetDefaultNetworkMtu(),
}

eng, err := engine.New(root)
Expand Down

0 comments on commit 92e61f8

Please sign in to comment.