Fix for vSphere driver boot2docker ISO issues

Fixes #2279 #2060

Signed-off-by: Fabio Rapposelli <fabio@vmware.com>
This commit is contained in:
Fabio Rapposelli
2015-12-03 07:24:26 -05:00
parent 029b39ee62
commit 2dcfcf2b06
2 changed files with 3 additions and 5 deletions

View File

@@ -63,7 +63,7 @@ func (conn VcConn) DatastoreMkdir(dirName string) error {
func (conn VcConn) DatastoreUpload(localPath, destination string) error {
stdout, err := conn.DatastoreLs(destination)
if err == nil && strings.Contains(stdout, B2DISOName) {
if err == nil && strings.Contains(stdout, isoFilename) {
log.Infof("boot2docker ISO already uploaded, skipping upload... ")
return nil
}
@@ -71,7 +71,7 @@ func (conn VcConn) DatastoreUpload(localPath, destination string) error {
log.Infof("Uploading %s to %s on datastore %s of vCenter %s... ",
localPath, destination, conn.driver.Datastore, conn.driver.IP)
dsPath := fmt.Sprintf("%s/%s", destination, B2DISOName)
dsPath := fmt.Sprintf("%s/%s", destination, isoFilename)
args := []string{"datastore.upload"}
args = conn.AppendConnectionString(args)
args = append(args, fmt.Sprintf("--ds=%s", conn.driver.Datastore))

View File

@@ -10,7 +10,6 @@ import (
"io/ioutil"
"net"
"os"
"path/filepath"
"strings"
"time"
@@ -26,7 +25,6 @@ import (
const (
isoFilename = "boot2docker.iso"
B2DISOName = isoFilename
B2DUser = "docker"
B2DPass = "tcuser"
)
@@ -172,7 +170,7 @@ func (d *Driver) SetConfigFromFlags(flags drivers.DriverOptions) error {
d.SwarmHost = flags.String("swarm-host")
d.SwarmDiscovery = flags.String("swarm-discovery")
d.ISO = filepath.Join(d.StorePath, isoFilename)
d.ISO = d.ResolveStorePath(isoFilename)
return nil
}