Commit 608c3d50 authored by Dawn Chen's avatar Dawn Chen

Update kubelet package on latest go-dockerclient package.

parent 95e3efda
...@@ -182,7 +182,7 @@ func (d *dockerContainerCommandRunner) RunInContainer(containerID string, cmd [] ...@@ -182,7 +182,7 @@ func (d *dockerContainerCommandRunner) RunInContainer(containerID string, cmd []
} }
errChan := make(chan error, 1) errChan := make(chan error, 1)
go func() { go func() {
errChan <- d.client.StartExec(execObj.Id, startOpts) errChan <- d.client.StartExec(execObj.ID, startOpts)
}() }()
wrBuf.Flush() wrBuf.Flush()
return buf.Bytes(), <-errChan return buf.Bytes(), <-errChan
......
...@@ -358,7 +358,7 @@ func makePortsAndBindings(container *api.Container) (map[docker.Port]struct{}, m ...@@ -358,7 +358,7 @@ func makePortsAndBindings(container *api.Container) (map[docker.Port]struct{}, m
portBindings[dockerPort] = []docker.PortBinding{ portBindings[dockerPort] = []docker.PortBinding{
{ {
HostPort: strconv.Itoa(exteriorPort), HostPort: strconv.Itoa(exteriorPort),
HostIp: port.HostIP, HostIP: port.HostIP,
}, },
} }
} }
...@@ -501,7 +501,7 @@ func (kl *Kubelet) runContainer(pod *api.BoundPod, container *api.Container, pod ...@@ -501,7 +501,7 @@ func (kl *Kubelet) runContainer(pod *api.BoundPod, container *api.Container, pod
Hostname: pod.Name, Hostname: pod.Name,
Image: container.Image, Image: container.Image,
Memory: int64(container.Memory), Memory: int64(container.Memory),
CpuShares: int64(milliCPUToShares(container.CPU)), CPUShares: int64(milliCPUToShares(container.CPU)),
WorkingDir: container.WorkingDir, WorkingDir: container.WorkingDir,
}, },
} }
......
...@@ -895,29 +895,29 @@ func TestMakePortsAndBindings(t *testing.T) { ...@@ -895,29 +895,29 @@ func TestMakePortsAndBindings(t *testing.T) {
if !reflect.DeepEqual(docker.Port("80/tcp"), key) { if !reflect.DeepEqual(docker.Port("80/tcp"), key) {
t.Errorf("Unexpected docker port: %#v", key) t.Errorf("Unexpected docker port: %#v", key)
} }
if value[0].HostIp != "127.0.0.1" { if value[0].HostIP != "127.0.0.1" {
t.Errorf("Unexpected host IP: %s", value[0].HostIp) t.Errorf("Unexpected host IP: %s", value[0].HostIP)
} }
case "443": case "443":
if !reflect.DeepEqual(docker.Port("443/tcp"), key) { if !reflect.DeepEqual(docker.Port("443/tcp"), key) {
t.Errorf("Unexpected docker port: %#v", key) t.Errorf("Unexpected docker port: %#v", key)
} }
if value[0].HostIp != "" { if value[0].HostIP != "" {
t.Errorf("Unexpected host IP: %s", value[0].HostIp) t.Errorf("Unexpected host IP: %s", value[0].HostIP)
} }
case "444": case "444":
if !reflect.DeepEqual(docker.Port("444/udp"), key) { if !reflect.DeepEqual(docker.Port("444/udp"), key) {
t.Errorf("Unexpected docker port: %#v", key) t.Errorf("Unexpected docker port: %#v", key)
} }
if value[0].HostIp != "" { if value[0].HostIP != "" {
t.Errorf("Unexpected host IP: %s", value[0].HostIp) t.Errorf("Unexpected host IP: %s", value[0].HostIP)
} }
case "445": case "445":
if !reflect.DeepEqual(docker.Port("445/tcp"), key) { if !reflect.DeepEqual(docker.Port("445/tcp"), key) {
t.Errorf("Unexpected docker port: %#v", key) t.Errorf("Unexpected docker port: %#v", key)
} }
if value[0].HostIp != "" { if value[0].HostIP != "" {
t.Errorf("Unexpected host IP: %s", value[0].HostIp) t.Errorf("Unexpected host IP: %s", value[0].HostIP)
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment