summaryrefslogtreecommitdiff
path: root/libpod/pod.go
diff options
context:
space:
mode:
authorhaircommander <pehunt@redhat.com>2018-08-17 10:36:51 -0400
committerAtomic Bot <atomic-devel@projectatomic.io>2018-08-23 18:16:28 +0000
commit2a7449362f2884d9ae6a783c0ce38979d882e2cf (patch)
tree6e7b8ab33505d210201e62faba6a50f98c0a4ea7 /libpod/pod.go
parent697b46430a8a7c2c7231078911dcec51f0c6fab5 (diff)
downloadpodman-2a7449362f2884d9ae6a783c0ce38979d882e2cf.tar.gz
podman-2a7449362f2884d9ae6a783c0ce38979d882e2cf.tar.bz2
podman-2a7449362f2884d9ae6a783c0ce38979d882e2cf.zip
Change pause container to infra container
Signed-off-by: haircommander <pehunt@redhat.com> Closes: #1187 Approved by: mheon
Diffstat (limited to 'libpod/pod.go')
-rw-r--r--libpod/pod.go32
1 files changed, 16 insertions, 16 deletions
diff --git a/libpod/pod.go b/libpod/pod.go
index 627711cdb..f8c656920 100644
--- a/libpod/pod.go
+++ b/libpod/pod.go
@@ -55,7 +55,7 @@ type PodConfig struct {
UsePodUser bool `json:"sharesUser,omitempty"`
UsePodUTS bool `json:"sharesUts,omitempty"`
- PauseContainer *PauseContainerConfig `json:"pauseConfig"`
+ InfraContainer *InfraContainerConfig `json:"infraConfig"`
// Time pod was created
CreatedTime time.Time `json:"created"`
@@ -65,9 +65,9 @@ type PodConfig struct {
type podState struct {
// CgroupPath is the path to the pod's CGroup
CgroupPath string `json:"cgroupPath"`
- // PauseContainerID is the container that holds pod namespace information
- // Most often a pause container
- PauseContainerID string
+ // InfraContainerID is the container that holds pod namespace information
+ // Most often an infra container
+ InfraContainerID string
}
// PodInspect represents the data we want to display for
@@ -81,7 +81,7 @@ type PodInspect struct {
// PodInspectState contains inspect data on the pod's state
type PodInspectState struct {
CgroupPath string `json:"cgroupPath"`
- PauseContainerID string `json:"pauseContainerID"`
+ InfraContainerID string `json:"infraContainerID"`
}
// PodContainerInfo keeps information on a container in a pod
@@ -90,9 +90,9 @@ type PodContainerInfo struct {
State string `json:"state"`
}
-// PauseContainerConfig is the configuration for the pod's pause container
-type PauseContainerConfig struct {
- HasPauseContainer bool `json:"makePauseContainer"`
+// InfraContainerConfig is the configuration for the pod's infra container
+type InfraContainerConfig struct {
+ HasInfraContainer bool `json:"makeInfraContainer"`
}
// ID retrieves the pod's ID
@@ -219,20 +219,20 @@ func (p *Pod) allContainers() ([]*Container, error) {
return p.runtime.state.PodContainers(p)
}
-// HasPauseContainer returns whether the pod will create a pause container
-func (p *Pod) HasPauseContainer() bool {
- return p.config.PauseContainer.HasPauseContainer
+// HasInfraContainer returns whether the pod will create an infra container
+func (p *Pod) HasInfraContainer() bool {
+ return p.config.InfraContainer.HasInfraContainer
}
-// SharesNamespaces checks if the pod has any kernel namespaces set as shared. A pause container will not be
+// SharesNamespaces checks if the pod has any kernel namespaces set as shared. An infra container will not be
// created if no kernel namespaces are shared.
func (p *Pod) SharesNamespaces() bool {
return p.SharesPID() || p.SharesIPC() || p.SharesNet() || p.SharesMNT() || p.SharesUser() || p.SharesUTS()
}
-// PauseContainerID returns a the pause container ID for a pod.
-// If the container returned is "", the pod has no pause container.
-func (p *Pod) PauseContainerID() (string, error) {
+// InfraContainerID returns the infra container ID for a pod.
+// If the container returned is "", the pod has no infra container.
+func (p *Pod) InfraContainerID() (string, error) {
p.lock.Lock()
defer p.lock.Unlock()
@@ -240,7 +240,7 @@ func (p *Pod) PauseContainerID() (string, error) {
return "", err
}
- return p.state.PauseContainerID, nil
+ return p.state.InfraContainerID, nil
}
// TODO add pod batching