From 19e0605f5b02825b835faa1ecda0600ce545f1d7 Mon Sep 17 00:00:00 2001 From: Mrunal Patel Date: Wed, 28 Jan 2015 15:03:06 -0800 Subject: [PATCH] Replace "net" by "pod infra" in docs and format strings. --- cmd/integration/integration.go | 6 +++--- docs/container-environment.md | 2 +- docs/design/networking.md | 4 ++-- docs/man/kubelet.1.md | 4 ++-- docs/man/man1/kubelet.1 | 4 ++-- pkg/kubelet/kubelet.go | 2 +- pkg/kubelet/kubelet_test.go | 2 +- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/cmd/integration/integration.go b/cmd/integration/integration.go index c67e439a8c9..c2301923237 100644 --- a/cmd/integration/integration.go +++ b/cmd/integration/integration.go @@ -621,9 +621,9 @@ func main() { createdPods.Insert(p[:n-8]) } } - // We expect 9: 2 net containers + 2 pods from the replication controller + - // 1 net container + 2 pods from the URL + - // 1 net container + 1 pod from the service test. + // We expect 9: 2 pod infra containers + 2 pods from the replication controller + + // 1 pod infra container + 2 pods from the URL + + // 1 pod infra container + 1 pod from the service test. if len(createdPods) != 9 { glog.Fatalf("Unexpected list of created pods:\n\n%#v\n\n%#v\n\n%#v\n\n", createdPods.List(), fakeDocker1.Created, fakeDocker2.Created) } diff --git a/docs/container-environment.md b/docs/container-environment.md index 65737997580..fa96fe52e53 100644 --- a/docs/container-environment.md +++ b/docs/container-environment.md @@ -59,7 +59,7 @@ This hook is called immediately before a container is terminated.  This event h A single parameter named reason is passed to the handler which contains the reason for termination.  Currently the valid values for reason are: * ● ```Delete``` - indicating an API call to delete the pod containing this container. * ● ```Health``` - indicating that a health check of the container failed. -* ● ```Dependency``` - indicating that a dependency for the container or the pod is missing, and thus, the container needs to be restarted.  Examples include, the network container crashing, or persistent disk failing for a container that mounts PD. +* ● ```Dependency``` - indicating that a dependency for the container or the pod is missing, and thus, the container needs to be restarted.  Examples include, the pod infra container crashing, or persistent disk failing for a container that mounts PD. Eventually, user specified reasons may be [added to the API](https://github.com/GoogleCloudPlatform/kubernetes/issues/137). diff --git a/docs/design/networking.md b/docs/design/networking.md index 3f52d388287..d90f56b1beb 100644 --- a/docs/design/networking.md +++ b/docs/design/networking.md @@ -62,7 +62,7 @@ Docker allocates IP addresses from a bridge we create on each node, using its - creates a new pair of veth devices and binds them to the netns - auto-assigns an IP from docker’s IP range -2. Create the user containers and specify the name of the network container as their “net” argument. Docker finds the PID of the command running in the network container and attaches to the netns of that PID. +2. Create the user containers and specify the name of the pod infra container as their “POD” argument. Docker finds the PID of the command running in the pod infra container and attaches to the netns and ipcns of that PID. ### Other networking implementation examples With the primary aim of providing IP-per-pod-model, other implementations exist to serve the purpose outside of GCE. @@ -77,7 +77,7 @@ Right now, docker inspect doesn't show the networking configuration of the conta ### External IP assignment -We want to be able to assign IP addresses externally from Docker ([Docker issue #6743](https://github.com/dotcloud/docker/issues/6743)) so that we don't need to statically allocate fixed-size IP ranges to each node, so that IP addresses can be made stable across network container restarts ([Docker issue #2801](https://github.com/dotcloud/docker/issues/2801)), and to facilitate pod migration. Right now, if the network container dies, all the user containers must be stopped and restarted because the netns of the network container will change on restart, and any subsequent user container restart will join that new netns, thereby not being able to see its peers. Additionally, a change in IP address would encounter DNS caching/TTL problems. External IP assignment would also simplify DNS support (see below). +We want to be able to assign IP addresses externally from Docker ([Docker issue #6743](https://github.com/dotcloud/docker/issues/6743)) so that we don't need to statically allocate fixed-size IP ranges to each node, so that IP addresses can be made stable across pod infra container restarts ([Docker issue #2801](https://github.com/dotcloud/docker/issues/2801)), and to facilitate pod migration. Right now, if the pod infra container dies, all the user containers must be stopped and restarted because the netns of the pod infra container will change on restart, and any subsequent user container restart will join that new netns, thereby not being able to see its peers. Additionally, a change in IP address would encounter DNS caching/TTL problems. External IP assignment would also simplify DNS support (see below). ### Naming, discovery, and load balancing diff --git a/docs/man/kubelet.1.md b/docs/man/kubelet.1.md index a66a1a5a3d8..9144e119d74 100644 --- a/docs/man/kubelet.1.md +++ b/docs/man/kubelet.1.md @@ -65,8 +65,8 @@ There are 4 ways that a container manifest can be provided to the Kubelet: **--manifest_url**="" URL for accessing the container manifest. -**--network_container_image**="kubernetes/pause:latest" - The image that network containers in each pod will use. +**--pod_infra_container_image**="kubernetes/pause:latest" + The image that pod infra containers in each pod will use. **--port**=10250 The port for the info server to serve on. diff --git a/docs/man/man1/kubelet.1 b/docs/man/man1/kubelet.1 index bc84e969559..60cadee7815 100644 --- a/docs/man/man1/kubelet.1 +++ b/docs/man/man1/kubelet.1 @@ -89,8 +89,8 @@ HTTP server The kubelet can also listen for HTTP and respond to a simple API (un URL for accessing the container manifest. .PP -\fB\-\-network\_container\_image\fP="kubernetes/pause:latest" - The image that network containers in each pod will use. +\fB\-\-pod\_infra\_container\_image\fP="kubernetes/pause:latest" + The image that pod infra containers in each pod will use. .PP \fB\-\-port\fP=10250 diff --git a/pkg/kubelet/kubelet.go b/pkg/kubelet/kubelet.go index eee389685c6..5d011a81cfe 100644 --- a/pkg/kubelet/kubelet.go +++ b/pkg/kubelet/kubelet.go @@ -987,7 +987,7 @@ func (kl *Kubelet) syncPod(pod *api.BoundPod, dockerContainers dockertools.Docke if podInfraDockerContainer, found, _ := dockerContainers.FindPodContainer(podFullName, uid, dockertools.PodInfraContainerName); found { podInfraContainerID = dockertools.DockerID(podInfraDockerContainer.ID) } else { - glog.V(2).Infof("Network container doesn't exist for pod %q, killing and re-creating the pod", podFullName) + glog.V(2).Infof("Pod infra container doesn't exist for pod %q, killing and re-creating the pod", podFullName) count, err := kl.killContainersInPod(pod, dockerContainers) if err != nil { return err diff --git a/pkg/kubelet/kubelet_test.go b/pkg/kubelet/kubelet_test.go index 40dcbde1067..b3b44cb4c49 100644 --- a/pkg/kubelet/kubelet_test.go +++ b/pkg/kubelet/kubelet_test.go @@ -459,7 +459,7 @@ func TestSyncPodsCreatesNetAndContainer(t *testing.T) { } } if !found { - t.Errorf("Custom net container not found: %v", fakeDocker.ContainerList) + t.Errorf("Custom pod infra container not found: %v", fakeDocker.ContainerList) } if len(fakeDocker.Created) != 2 ||