diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 6f4c10cd9e38..5b55a1918aaa 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -1189,163 +1189,163 @@ }, { "ImportPath": "github.com/docker/machine/commands/mcndirs", - "Comment": "docs-v0.8.2-2016-09-26-226-gb63e1e8b", - "Rev": "b63e1e8b2c43167a6811ef580cabd7dfca3a18f0" + "Comment": "docs-v0.8.2-2016-09-26-292-g49dfaa70", + "Rev": "49dfaa70fdc869c65d9f6c50c355624356ab383b" }, { "ImportPath": "github.com/docker/machine/drivers/errdriver", - "Comment": "docs-v0.8.2-2016-09-26-226-gb63e1e8b", - "Rev": "b63e1e8b2c43167a6811ef580cabd7dfca3a18f0" + "Comment": "docs-v0.8.2-2016-09-26-292-g49dfaa70", + "Rev": "49dfaa70fdc869c65d9f6c50c355624356ab383b" }, { "ImportPath": "github.com/docker/machine/drivers/hyperv", - "Comment": "docs-v0.8.2-2016-09-26-226-gb63e1e8b", - "Rev": "b63e1e8b2c43167a6811ef580cabd7dfca3a18f0" + "Comment": "docs-v0.8.2-2016-09-26-292-g49dfaa70", + "Rev": "49dfaa70fdc869c65d9f6c50c355624356ab383b" }, { "ImportPath": "github.com/docker/machine/drivers/none", - "Comment": "docs-v0.8.2-2016-09-26-226-gb63e1e8b", - "Rev": "b63e1e8b2c43167a6811ef580cabd7dfca3a18f0" + "Comment": "docs-v0.8.2-2016-09-26-292-g49dfaa70", + "Rev": "49dfaa70fdc869c65d9f6c50c355624356ab383b" }, { "ImportPath": "github.com/docker/machine/drivers/virtualbox", - "Comment": "docs-v0.8.2-2016-09-26-226-gb63e1e8b", - "Rev": "b63e1e8b2c43167a6811ef580cabd7dfca3a18f0" + "Comment": "docs-v0.8.2-2016-09-26-292-g49dfaa70", + "Rev": "49dfaa70fdc869c65d9f6c50c355624356ab383b" }, { "ImportPath": "github.com/docker/machine/drivers/vmwarefusion", - "Comment": "docs-v0.8.2-2016-09-26-226-gb63e1e8b", - "Rev": "b63e1e8b2c43167a6811ef580cabd7dfca3a18f0" + "Comment": "docs-v0.8.2-2016-09-26-292-g49dfaa70", + "Rev": "49dfaa70fdc869c65d9f6c50c355624356ab383b" }, { "ImportPath": "github.com/docker/machine/libmachine", - "Comment": "docs-v0.8.2-2016-09-26-226-gb63e1e8b", - "Rev": "b63e1e8b2c43167a6811ef580cabd7dfca3a18f0" + "Comment": "docs-v0.8.2-2016-09-26-292-g49dfaa70", + "Rev": "49dfaa70fdc869c65d9f6c50c355624356ab383b" }, { "ImportPath": "github.com/docker/machine/libmachine/auth", - "Comment": "docs-v0.8.2-2016-09-26-226-gb63e1e8b", - "Rev": "b63e1e8b2c43167a6811ef580cabd7dfca3a18f0" + "Comment": "docs-v0.8.2-2016-09-26-292-g49dfaa70", + "Rev": "49dfaa70fdc869c65d9f6c50c355624356ab383b" }, { "ImportPath": "github.com/docker/machine/libmachine/cert", - "Comment": "docs-v0.8.2-2016-09-26-226-gb63e1e8b", - "Rev": "b63e1e8b2c43167a6811ef580cabd7dfca3a18f0" + "Comment": "docs-v0.8.2-2016-09-26-292-g49dfaa70", + "Rev": "49dfaa70fdc869c65d9f6c50c355624356ab383b" }, { "ImportPath": "github.com/docker/machine/libmachine/check", - "Comment": "docs-v0.8.2-2016-09-26-226-gb63e1e8b", - "Rev": "b63e1e8b2c43167a6811ef580cabd7dfca3a18f0" + "Comment": "docs-v0.8.2-2016-09-26-292-g49dfaa70", + "Rev": "49dfaa70fdc869c65d9f6c50c355624356ab383b" }, { "ImportPath": "github.com/docker/machine/libmachine/drivers", - "Comment": "docs-v0.8.2-2016-09-26-226-gb63e1e8b", - "Rev": "b63e1e8b2c43167a6811ef580cabd7dfca3a18f0" + "Comment": "docs-v0.8.2-2016-09-26-292-g49dfaa70", + "Rev": "49dfaa70fdc869c65d9f6c50c355624356ab383b" }, { "ImportPath": "github.com/docker/machine/libmachine/drivers/plugin", - "Comment": "docs-v0.8.2-2016-09-26-226-gb63e1e8b", - "Rev": "b63e1e8b2c43167a6811ef580cabd7dfca3a18f0" + "Comment": "docs-v0.8.2-2016-09-26-292-g49dfaa70", + "Rev": "49dfaa70fdc869c65d9f6c50c355624356ab383b" }, { "ImportPath": "github.com/docker/machine/libmachine/drivers/plugin/localbinary", - "Comment": "docs-v0.8.2-2016-09-26-226-gb63e1e8b", - "Rev": "b63e1e8b2c43167a6811ef580cabd7dfca3a18f0" + "Comment": "docs-v0.8.2-2016-09-26-292-g49dfaa70", + "Rev": "49dfaa70fdc869c65d9f6c50c355624356ab383b" }, { "ImportPath": "github.com/docker/machine/libmachine/drivers/rpc", - "Comment": "docs-v0.8.2-2016-09-26-226-gb63e1e8b", - "Rev": "b63e1e8b2c43167a6811ef580cabd7dfca3a18f0" + "Comment": "docs-v0.8.2-2016-09-26-292-g49dfaa70", + "Rev": "49dfaa70fdc869c65d9f6c50c355624356ab383b" }, { "ImportPath": "github.com/docker/machine/libmachine/engine", - "Comment": "docs-v0.8.2-2016-09-26-226-gb63e1e8b", - "Rev": "b63e1e8b2c43167a6811ef580cabd7dfca3a18f0" + "Comment": "docs-v0.8.2-2016-09-26-292-g49dfaa70", + "Rev": "49dfaa70fdc869c65d9f6c50c355624356ab383b" }, { "ImportPath": "github.com/docker/machine/libmachine/host", - "Comment": "docs-v0.8.2-2016-09-26-226-gb63e1e8b", - "Rev": "b63e1e8b2c43167a6811ef580cabd7dfca3a18f0" + "Comment": "docs-v0.8.2-2016-09-26-292-g49dfaa70", + "Rev": "49dfaa70fdc869c65d9f6c50c355624356ab383b" }, { "ImportPath": "github.com/docker/machine/libmachine/log", - "Comment": "docs-v0.8.2-2016-09-26-226-gb63e1e8b", - "Rev": "b63e1e8b2c43167a6811ef580cabd7dfca3a18f0" + "Comment": "docs-v0.8.2-2016-09-26-292-g49dfaa70", + "Rev": "49dfaa70fdc869c65d9f6c50c355624356ab383b" }, { "ImportPath": "github.com/docker/machine/libmachine/mcndockerclient", - "Comment": "docs-v0.8.2-2016-09-26-226-gb63e1e8b", - "Rev": "b63e1e8b2c43167a6811ef580cabd7dfca3a18f0" + "Comment": "docs-v0.8.2-2016-09-26-292-g49dfaa70", + "Rev": "49dfaa70fdc869c65d9f6c50c355624356ab383b" }, { "ImportPath": "github.com/docker/machine/libmachine/mcnerror", - "Comment": "docs-v0.8.2-2016-09-26-226-gb63e1e8b", - "Rev": "b63e1e8b2c43167a6811ef580cabd7dfca3a18f0" + "Comment": "docs-v0.8.2-2016-09-26-292-g49dfaa70", + "Rev": "49dfaa70fdc869c65d9f6c50c355624356ab383b" }, { "ImportPath": "github.com/docker/machine/libmachine/mcnflag", - "Comment": "docs-v0.8.2-2016-09-26-226-gb63e1e8b", - "Rev": "b63e1e8b2c43167a6811ef580cabd7dfca3a18f0" + "Comment": "docs-v0.8.2-2016-09-26-292-g49dfaa70", + "Rev": "49dfaa70fdc869c65d9f6c50c355624356ab383b" }, { "ImportPath": "github.com/docker/machine/libmachine/mcnutils", - "Comment": "docs-v0.8.2-2016-09-26-226-gb63e1e8b", - "Rev": "b63e1e8b2c43167a6811ef580cabd7dfca3a18f0" + "Comment": "docs-v0.8.2-2016-09-26-292-g49dfaa70", + "Rev": "49dfaa70fdc869c65d9f6c50c355624356ab383b" }, { "ImportPath": "github.com/docker/machine/libmachine/persist", - "Comment": "docs-v0.8.2-2016-09-26-226-gb63e1e8b", - "Rev": "b63e1e8b2c43167a6811ef580cabd7dfca3a18f0" + "Comment": "docs-v0.8.2-2016-09-26-292-g49dfaa70", + "Rev": "49dfaa70fdc869c65d9f6c50c355624356ab383b" }, { "ImportPath": "github.com/docker/machine/libmachine/provision", - "Comment": "docs-v0.8.2-2016-09-26-226-gb63e1e8b", - "Rev": "b63e1e8b2c43167a6811ef580cabd7dfca3a18f0" + "Comment": "docs-v0.8.2-2016-09-26-292-g49dfaa70", + "Rev": "49dfaa70fdc869c65d9f6c50c355624356ab383b" }, { "ImportPath": "github.com/docker/machine/libmachine/provision/pkgaction", - "Comment": "docs-v0.8.2-2016-09-26-226-gb63e1e8b", - "Rev": "b63e1e8b2c43167a6811ef580cabd7dfca3a18f0" + "Comment": "docs-v0.8.2-2016-09-26-292-g49dfaa70", + "Rev": "49dfaa70fdc869c65d9f6c50c355624356ab383b" }, { "ImportPath": "github.com/docker/machine/libmachine/provision/serviceaction", - "Comment": "docs-v0.8.2-2016-09-26-226-gb63e1e8b", - "Rev": "b63e1e8b2c43167a6811ef580cabd7dfca3a18f0" + "Comment": "docs-v0.8.2-2016-09-26-292-g49dfaa70", + "Rev": "49dfaa70fdc869c65d9f6c50c355624356ab383b" }, { "ImportPath": "github.com/docker/machine/libmachine/shell", - "Comment": "docs-v0.8.2-2016-09-26-226-gb63e1e8b", - "Rev": "b63e1e8b2c43167a6811ef580cabd7dfca3a18f0" + "Comment": "docs-v0.8.2-2016-09-26-292-g49dfaa70", + "Rev": "49dfaa70fdc869c65d9f6c50c355624356ab383b" }, { "ImportPath": "github.com/docker/machine/libmachine/ssh", - "Comment": "docs-v0.8.2-2016-09-26-226-gb63e1e8b", - "Rev": "b63e1e8b2c43167a6811ef580cabd7dfca3a18f0" + "Comment": "docs-v0.8.2-2016-09-26-292-g49dfaa70", + "Rev": "49dfaa70fdc869c65d9f6c50c355624356ab383b" }, { "ImportPath": "github.com/docker/machine/libmachine/state", - "Comment": "docs-v0.8.2-2016-09-26-226-gb63e1e8b", - "Rev": "b63e1e8b2c43167a6811ef580cabd7dfca3a18f0" + "Comment": "docs-v0.8.2-2016-09-26-292-g49dfaa70", + "Rev": "49dfaa70fdc869c65d9f6c50c355624356ab383b" }, { "ImportPath": "github.com/docker/machine/libmachine/swarm", - "Comment": "docs-v0.8.2-2016-09-26-226-gb63e1e8b", - "Rev": "b63e1e8b2c43167a6811ef580cabd7dfca3a18f0" + "Comment": "docs-v0.8.2-2016-09-26-292-g49dfaa70", + "Rev": "49dfaa70fdc869c65d9f6c50c355624356ab383b" }, { "ImportPath": "github.com/docker/machine/libmachine/version", - "Comment": "docs-v0.8.2-2016-09-26-226-gb63e1e8b", - "Rev": "b63e1e8b2c43167a6811ef580cabd7dfca3a18f0" + "Comment": "docs-v0.8.2-2016-09-26-292-g49dfaa70", + "Rev": "49dfaa70fdc869c65d9f6c50c355624356ab383b" }, { "ImportPath": "github.com/docker/machine/libmachine/versioncmp", - "Comment": "docs-v0.8.2-2016-09-26-226-gb63e1e8b", - "Rev": "b63e1e8b2c43167a6811ef580cabd7dfca3a18f0" + "Comment": "docs-v0.8.2-2016-09-26-292-g49dfaa70", + "Rev": "49dfaa70fdc869c65d9f6c50c355624356ab383b" }, { "ImportPath": "github.com/docker/machine/version", - "Comment": "docs-v0.8.2-2016-09-26-226-gb63e1e8b", - "Rev": "b63e1e8b2c43167a6811ef580cabd7dfca3a18f0" + "Comment": "docs-v0.8.2-2016-09-26-292-g49dfaa70", + "Rev": "49dfaa70fdc869c65d9f6c50c355624356ab383b" }, { "ImportPath": "github.com/docker/spdystream", @@ -2126,7 +2126,7 @@ }, { "ImportPath": "github.com/moby/hyperkit/go", - "Comment": "v0.20170425-63-ga12cd72", + "Comment": "v0.20171020", "Rev": "a12cd7250bcd8d689078e3e42ae4a7cf6a0cbaf3" }, { diff --git a/vendor/github.com/docker/machine/drivers/hyperv/hyperv.go b/vendor/github.com/docker/machine/drivers/hyperv/hyperv.go index fc296f4fea7d..6a46ab6d4d95 100644 --- a/vendor/github.com/docker/machine/drivers/hyperv/hyperv.go +++ b/vendor/github.com/docker/machine/drivers/hyperv/hyperv.go @@ -177,11 +177,8 @@ func (d *Driver) PreCreateCheck() error { // Downloading boot2docker to cache should be done here to make sure // that a download failure will not leave a machine half created. b2dutils := mcnutils.NewB2dUtils(d.StorePath) - if err := b2dutils.UpdateISOCache(d.Boot2DockerURL); err != nil { - return err - } - - return nil + err = b2dutils.UpdateISOCache(d.Boot2DockerURL) + return err } func (d *Driver) Create() error { diff --git a/vendor/github.com/docker/machine/drivers/hyperv/powershell.go b/vendor/github.com/docker/machine/drivers/hyperv/powershell.go index b486cbad6e62..040740bb786d 100644 --- a/vendor/github.com/docker/machine/drivers/hyperv/powershell.go +++ b/vendor/github.com/docker/machine/drivers/hyperv/powershell.go @@ -85,7 +85,7 @@ func isAdministrator() (bool, error) { } func isHypervAdministrator() bool { - stdout, err := cmdOut(`@([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole("Hyper-V Administrators")`) + stdout, err := cmdOut(`@([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole("S-1-5-32-578")`) if err != nil { log.Debug(err) return false diff --git a/vendor/github.com/docker/machine/drivers/virtualbox/misc.go b/vendor/github.com/docker/machine/drivers/virtualbox/misc.go index 87e745c80758..3972a95443f8 100644 --- a/vendor/github.com/docker/machine/drivers/virtualbox/misc.go +++ b/vendor/github.com/docker/machine/drivers/virtualbox/misc.go @@ -81,13 +81,19 @@ type RandomInter interface { } func NewRandomInter() RandomInter { - return &defaultRandomInter{} + src := rand.NewSource(time.Now().UnixNano()) + + return &defaultRandomInter{ + rand: rand.New(src), + } } -type defaultRandomInter struct{} +type defaultRandomInter struct { + rand *rand.Rand +} func (d *defaultRandomInter) RandomInt(n int) int { - return rand.Intn(n) + return d.rand.Intn(n) } // Sleeper sleeps for given duration. diff --git a/vendor/github.com/docker/machine/drivers/virtualbox/virtualbox.go b/vendor/github.com/docker/machine/drivers/virtualbox/virtualbox.go index a7b998b6a3a2..3d79e4e9789d 100644 --- a/vendor/github.com/docker/machine/drivers/virtualbox/virtualbox.go +++ b/vendor/github.com/docker/machine/drivers/virtualbox/virtualbox.go @@ -991,7 +991,7 @@ func getRandomIPinSubnet(d *Driver, baseIP net.IP) (net.IP, error) { // select pseudo-random DHCP addr; make sure not to clash with the host // only try 5 times and bail if no random received for i := 0; i < 5; i++ { - n := d.randomInter.RandomInt(25) + n := d.randomInter.RandomInt(24) + 1 if byte(n) != nAddr[3] { dhcpAddr = net.IPv4(nAddr[0], nAddr[1], nAddr[2], byte(n)) break diff --git a/vendor/github.com/docker/machine/drivers/vmwarefusion/fusion_darwin.go b/vendor/github.com/docker/machine/drivers/vmwarefusion/fusion_darwin.go index 0f77c29640e8..d28c8b943056 100644 --- a/vendor/github.com/docker/machine/drivers/vmwarefusion/fusion_darwin.go +++ b/vendor/github.com/docker/machine/drivers/vmwarefusion/fusion_darwin.go @@ -225,11 +225,8 @@ func (d *Driver) PreCreateCheck() error { // Downloading boot2docker to cache should be done here to make sure // that a download failure will not leave a machine half created. b2dutils := mcnutils.NewB2dUtils(d.StorePath) - if err := b2dutils.UpdateISOCache(d.Boot2DockerURL); err != nil { - return err - } - return nil + return b2dutils.UpdateISOCache(d.Boot2DockerURL) } func (d *Driver) Create() error { @@ -363,7 +360,7 @@ func (d *Driver) Create() error { vmrun("-gu", B2DUser, "-gp", B2DPass, "CopyFileFromHostToGuest", d.vmxPath(), d.ResolveStorePath("userdata.tar"), "/home/docker/userdata.tar") // Expand tar file. - vmrun("-gu", B2DUser, "-gp", B2DPass, "runScriptInGuest", d.vmxPath(), "/bin/sh", "sudo sh -c \"tar xvf userdata.tar -C /home/docker > /var/log/userdata.log 2>&1 && chown -R docker:staff /home/docker\"") + vmrun("-gu", B2DUser, "-gp", B2DPass, "runScriptInGuest", d.vmxPath(), "/bin/sh", "sudo sh -c \"tar xvf /home/docker/userdata.tar -C /home/docker > /var/log/userdata.log 2>&1 && chown -R docker:staff /home/docker\"") // copy to /var/lib/boot2docker vmrun("-gu", B2DUser, "-gp", B2DPass, "runScriptInGuest", d.vmxPath(), "/bin/sh", "sudo /bin/mv /home/docker/userdata.tar /var/lib/boot2docker/userdata.tar") @@ -434,10 +431,7 @@ func (d *Driver) Restart() error { return err } // Start it again and mount shared folder - if err := d.Start(); err != nil { - return err - } - return nil + return d.Start() } func (d *Driver) Kill() error { @@ -536,7 +530,7 @@ func (d *Driver) getIPfromVmnetConfigurationFile(conffile, macaddr string) (stri return "", err } - // find all occurences of 'host .* { .. }' and extract + // find all occurrences of 'host .* { .. }' and extract // out of the inner block the MAC and IP addresses // key = MAC, value = IP @@ -727,12 +721,7 @@ func (d *Driver) generateKeyBundle() error { if _, err := tw.Write([]byte(pubKey)); err != nil { return err } - if err := tw.Close(); err != nil { - return err - } - - return nil - + return tw.Close() } // execute command over SSH with user / password authentication diff --git a/vendor/github.com/docker/machine/libmachine/host/host.go b/vendor/github.com/docker/machine/libmachine/host/host.go index 36015b27a31c..1f1e1bbfcb65 100644 --- a/vendor/github.com/docker/machine/libmachine/host/host.go +++ b/vendor/github.com/docker/machine/libmachine/host/host.go @@ -217,7 +217,7 @@ func (h *Host) Upgrade() error { provisioner.String() != "rancheros" && provisioner.String() != "boot2docker" { - // Name of pacakge 'docker-engine' will fall through in this + // Name of package 'docker-engine' will fall through in this // case, so that we execute, e.g., // // 'sudo apt-get purge -y docker-engine' diff --git a/vendor/github.com/docker/machine/libmachine/mcnerror/errors.go b/vendor/github.com/docker/machine/libmachine/mcnerror/errors.go index 4a409cee7513..6efc3c5c477d 100644 --- a/vendor/github.com/docker/machine/libmachine/mcnerror/errors.go +++ b/vendor/github.com/docker/machine/libmachine/mcnerror/errors.go @@ -17,7 +17,7 @@ type ErrHostDoesNotExist struct { } func (e ErrHostDoesNotExist) Error() string { - return fmt.Sprintf("Host does not exist: %q", e.Name) + return fmt.Sprintf("Docker machine %q does not exist. Use \"docker-machine ls\" to list machines. Use \"docker-machine create\" to add a new one.", e.Name) } type ErrHostAlreadyExists struct { @@ -25,7 +25,7 @@ type ErrHostAlreadyExists struct { } func (e ErrHostAlreadyExists) Error() string { - return fmt.Sprintf("Host already exists: %q", e.Name) + return fmt.Sprintf("Docker machine %q already exists", e.Name) } type ErrDuringPreCreate struct { diff --git a/vendor/github.com/docker/machine/libmachine/mcnutils/b2d.go b/vendor/github.com/docker/machine/libmachine/mcnutils/b2d.go index fbf51b37e3c8..f2691954224b 100644 --- a/vendor/github.com/docker/machine/libmachine/mcnutils/b2d.go +++ b/vendor/github.com/docker/machine/libmachine/mcnutils/b2d.go @@ -305,16 +305,16 @@ func (b *b2dISO) version() (string, error) { return "", err } - fullVersion := string(isoMetadata) + trimmedVersion := strings.TrimSpace(string(isoMetadata)) - versionIndex := strings.Index(fullVersion, versionPrefix) + versionIndex := strings.Index(trimmedVersion, versionPrefix) if versionIndex == -1 { return "", fmt.Errorf("Did not find prefix %q in version string", versionPrefix) } // Original magic file string looks similar to this: "Boot2Docker-v0.1.0 " // This will return "v0.1.0" given the above string - vers := strings.TrimSpace(fullVersion)[versionIndex+1:] + vers := trimmedVersion[versionIndex+1:] log.Debug("local Boot2Docker ISO version: ", vers) return vers, nil diff --git a/vendor/github.com/docker/machine/libmachine/persist/filestore.go b/vendor/github.com/docker/machine/libmachine/persist/filestore.go index 3978a9ce4940..ea79f44a5f64 100644 --- a/vendor/github.com/docker/machine/libmachine/persist/filestore.go +++ b/vendor/github.com/docker/machine/libmachine/persist/filestore.go @@ -53,10 +53,8 @@ func (s Filestore) saveToFile(data []byte, file string) error { return err } - if err = os.Rename(tmpfi.Name(), file); err != nil { - return err - } - return nil + err = os.Rename(tmpfi.Name(), file) + return err } func (s Filestore) Save(host *host.Host) error { diff --git a/vendor/github.com/docker/machine/libmachine/provision/arch.go b/vendor/github.com/docker/machine/libmachine/provision/arch.go index 4c60e3128e5e..6a7399830175 100644 --- a/vendor/github.com/docker/machine/libmachine/provision/arch.go +++ b/vendor/github.com/docker/machine/libmachine/provision/arch.go @@ -147,9 +147,6 @@ func (provisioner *ArchProvisioner) Provision(swarmOptions swarm.Options, authOp // enable in systemd log.Debug("Enabling docker in systemd") - if err := provisioner.Service("docker", serviceaction.Enable); err != nil { - return err - } - - return nil + err = provisioner.Service("docker", serviceaction.Enable) + return err } diff --git a/vendor/github.com/docker/machine/libmachine/provision/boot2docker.go b/vendor/github.com/docker/machine/libmachine/provision/boot2docker.go index 8b09f28c7ef5..7c5d6519fd19 100644 --- a/vendor/github.com/docker/machine/libmachine/provision/boot2docker.go +++ b/vendor/github.com/docker/machine/libmachine/provision/boot2docker.go @@ -255,11 +255,8 @@ func (provisioner *Boot2DockerProvisioner) Provision(swarmOptions swarm.Options, return err } - if err = configureSwarm(provisioner, swarmOptions, provisioner.AuthOptions); err != nil { - return err - } - - return nil + err = configureSwarm(provisioner, swarmOptions, provisioner.AuthOptions) + return err } func (provisioner *Boot2DockerProvisioner) SSHCommand(args string) (string, error) { diff --git a/vendor/github.com/docker/machine/libmachine/provision/coreos.go b/vendor/github.com/docker/machine/libmachine/provision/coreos.go index 187243125f32..bbb798b70c4c 100644 --- a/vendor/github.com/docker/machine/libmachine/provision/coreos.go +++ b/vendor/github.com/docker/machine/libmachine/provision/coreos.go @@ -127,9 +127,6 @@ func (provisioner *CoreOSProvisioner) Provision(swarmOptions swarm.Options, auth } log.Debug("Configuring swarm") - if err := configureSwarm(provisioner, swarmOptions, provisioner.AuthOptions); err != nil { - return err - } - - return nil + err := configureSwarm(provisioner, swarmOptions, provisioner.AuthOptions) + return err } diff --git a/vendor/github.com/docker/machine/libmachine/provision/debian.go b/vendor/github.com/docker/machine/libmachine/provision/debian.go index b76c1f9e885e..c7cd4767e4ba 100644 --- a/vendor/github.com/docker/machine/libmachine/provision/debian.go +++ b/vendor/github.com/docker/machine/libmachine/provision/debian.go @@ -138,9 +138,6 @@ func (provisioner *DebianProvisioner) Provision(swarmOptions swarm.Options, auth // enable in systemd log.Debug("enabling docker in systemd") - if err := provisioner.Service("docker", serviceaction.Enable); err != nil { - return err - } - - return nil + err = provisioner.Service("docker", serviceaction.Enable) + return err } diff --git a/vendor/github.com/docker/machine/libmachine/provision/rancheros.go b/vendor/github.com/docker/machine/libmachine/provision/rancheros.go index 97557c268113..a980b2bb79a7 100644 --- a/vendor/github.com/docker/machine/libmachine/provision/rancheros.go +++ b/vendor/github.com/docker/machine/libmachine/provision/rancheros.go @@ -118,9 +118,13 @@ func (provisioner *RancherProvisioner) Provision(swarmOptions swarm.Options, aut } } - log.Debugf("Selecting docker engine: %s", engineOptions.InstallURL) - if err := selectDocker(provisioner, engineOptions.InstallURL); err != nil { - return err + if engineOptions.InstallURL == drivers.DefaultEngineInstallURL { + log.Debugf("Skipping docker engine default: %s", engineOptions.InstallURL) + } else { + log.Debugf("Selecting docker engine: %s", engineOptions.InstallURL) + if err := selectDocker(provisioner, engineOptions.InstallURL); err != nil { + return err + } } log.Debugf("Preparing certificates") @@ -132,11 +136,8 @@ func (provisioner *RancherProvisioner) Provision(swarmOptions swarm.Options, aut } log.Debugf("Configuring swarm") - if err := configureSwarm(provisioner, swarmOptions, provisioner.AuthOptions); err != nil { - return err - } - - return nil + err := configureSwarm(provisioner, swarmOptions, provisioner.AuthOptions) + return err } func (provisioner *RancherProvisioner) SetHostname(hostname string) error { diff --git a/vendor/github.com/docker/machine/libmachine/provision/redhat.go b/vendor/github.com/docker/machine/libmachine/provision/redhat.go index ae6861ef3ce4..3df0acdd5040 100644 --- a/vendor/github.com/docker/machine/libmachine/provision/redhat.go +++ b/vendor/github.com/docker/machine/libmachine/provision/redhat.go @@ -110,11 +110,8 @@ func installDocker(provisioner *RedHatProvisioner) error { return err } - if err := provisioner.Service("docker", serviceaction.Enable); err != nil { - return err - } - - return nil + err := provisioner.Service("docker", serviceaction.Enable) + return err } func (provisioner *RedHatProvisioner) dockerDaemonResponding() bool { @@ -178,11 +175,8 @@ func (provisioner *RedHatProvisioner) Provision(swarmOptions swarm.Options, auth return err } - if err := configureSwarm(provisioner, swarmOptions, provisioner.AuthOptions); err != nil { - return err - } - - return nil + err = configureSwarm(provisioner, swarmOptions, provisioner.AuthOptions) + return err } func (provisioner *RedHatProvisioner) GenerateDockerOptions(dockerPort int) (*DockerOptions, error) { diff --git a/vendor/github.com/docker/machine/libmachine/provision/suse.go b/vendor/github.com/docker/machine/libmachine/provision/suse.go index d531a07cb034..b0ad944c904f 100644 --- a/vendor/github.com/docker/machine/libmachine/provision/suse.go +++ b/vendor/github.com/docker/machine/libmachine/provision/suse.go @@ -202,9 +202,6 @@ func (provisioner *SUSEProvisioner) Provision(swarmOptions swarm.Options, authOp // enable in systemd log.Debug("Enabling docker in systemd") - if err := provisioner.Service("docker", serviceaction.Enable); err != nil { - return err - } - - return nil + err = provisioner.Service("docker", serviceaction.Enable) + return err } diff --git a/vendor/github.com/docker/machine/libmachine/provision/ubuntu_systemd.go b/vendor/github.com/docker/machine/libmachine/provision/ubuntu_systemd.go index c99493afd325..c4ccb8c883bb 100644 --- a/vendor/github.com/docker/machine/libmachine/provision/ubuntu_systemd.go +++ b/vendor/github.com/docker/machine/libmachine/provision/ubuntu_systemd.go @@ -148,9 +148,6 @@ func (provisioner *UbuntuSystemdProvisioner) Provision(swarmOptions swarm.Option // enable in systemd log.Debug("enabling docker in systemd") - if err := provisioner.Service("docker", serviceaction.Enable); err != nil { - return err - } - - return nil + err = provisioner.Service("docker", serviceaction.Enable) + return err } diff --git a/vendor/github.com/docker/machine/libmachine/provision/ubuntu_upstart.go b/vendor/github.com/docker/machine/libmachine/provision/ubuntu_upstart.go index 3a7de9757ce9..979986ebc2e7 100644 --- a/vendor/github.com/docker/machine/libmachine/provision/ubuntu_upstart.go +++ b/vendor/github.com/docker/machine/libmachine/provision/ubuntu_upstart.go @@ -157,9 +157,6 @@ func (provisioner *UbuntuProvisioner) Provision(swarmOptions swarm.Options, auth return err } - if err := configureSwarm(provisioner, swarmOptions, provisioner.AuthOptions); err != nil { - return err - } - - return nil + err = configureSwarm(provisioner, swarmOptions, provisioner.AuthOptions) + return err } diff --git a/vendor/github.com/docker/machine/libmachine/provision/utils.go b/vendor/github.com/docker/machine/libmachine/provision/utils.go index 09483d9530da..fded02113015 100644 --- a/vendor/github.com/docker/machine/libmachine/provision/utils.go +++ b/vendor/github.com/docker/machine/libmachine/provision/utils.go @@ -255,7 +255,7 @@ func checkDaemonUp(p Provisioner, dockerPort int) func() bool { reDaemonListening := fmt.Sprintf(":%d\\s+.*:.*", dockerPort) return func() bool { // HACK: Check netstat's output to see if anyone's listening on the Docker API port. - netstatOut, err := p.SSHCommand("netstat -tln") + netstatOut, err := p.SSHCommand("if ! type netstat 1>/dev/null; then ss -tln; else netstat -tln; fi") if err != nil { log.Warnf("Error running SSH command: %s", err) return false diff --git a/vendor/github.com/docker/machine/libmachine/versioncmp/compare.go b/vendor/github.com/docker/machine/libmachine/versioncmp/compare.go index 83c9a63ac43e..2df82cef6eb4 100644 --- a/vendor/github.com/docker/machine/libmachine/versioncmp/compare.go +++ b/vendor/github.com/docker/machine/libmachine/versioncmp/compare.go @@ -27,7 +27,7 @@ func compare(v1, v2 string) int { // All releases before the community edition (differentiated by // presence of the "ce" string in the version string) are "less than" - // any community edition release (first occuring in March 2017). + // any community edition release (first occurring in March 2017). if strings.Contains(v1, ceEdition) && !strings.Contains(v2, ceEdition) { return 1 } diff --git a/vendor/k8s.io/apiserver/pkg/endpoints/openapi/openapi.go b/vendor/k8s.io/apiserver/pkg/endpoints/openapi/openapi.go index 2176d357d2e6..7b8f3589e02d 100644 --- a/vendor/k8s.io/apiserver/pkg/endpoints/openapi/openapi.go +++ b/vendor/k8s.io/apiserver/pkg/endpoints/openapi/openapi.go @@ -30,7 +30,6 @@ import ( "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/kube-openapi/pkg/util" )