mirror of
https://github.com/containers/podman.git
synced 2025-05-20 16:47:39 +08:00
Fix some comments
Signed-off-by: fanqiaojun <fanqiaojun@yeah.net>
This commit is contained in:
@ -100,7 +100,7 @@ cd podman
|
|||||||
# Build podman.exe
|
# Build podman.exe
|
||||||
.\winmake.ps1 podman-remote
|
.\winmake.ps1 podman-remote
|
||||||
|
|
||||||
# Downlaod gvproxy.exe and win-sshproxy.exe
|
# Download gvproxy.exe and win-sshproxy.exe
|
||||||
# that are needed to execute the podman client
|
# that are needed to execute the podman client
|
||||||
.\winmake.ps1 win-gvproxy
|
.\winmake.ps1 win-gvproxy
|
||||||
```
|
```
|
||||||
|
@ -127,7 +127,7 @@ func (c *Container) newExecDiedEvent(sessionID string, exitCode int) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// netNetworkEvent creates a new event based on a network connect/disconnect
|
// newNetworkEvent creates a new event based on a network connect/disconnect
|
||||||
func (c *Container) newNetworkEvent(status events.Status, netName string) {
|
func (c *Container) newNetworkEvent(status events.Status, netName string) {
|
||||||
e := events.NewEvent(status)
|
e := events.NewEvent(status)
|
||||||
e.ID = c.ID()
|
e.ID = c.ID()
|
||||||
|
@ -105,7 +105,7 @@ func (e *Event) ToHumanReadable(truncate bool) string {
|
|||||||
return humanFormat
|
return humanFormat
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewEventFromString takes stringified json and converts
|
// newEventFromJSONString takes stringified json and converts
|
||||||
// it to an event
|
// it to an event
|
||||||
func newEventFromJSONString(event string) (*Event, error) {
|
func newEventFromJSONString(event string) (*Event, error) {
|
||||||
e := new(Event)
|
e := new(Event)
|
||||||
|
@ -346,7 +346,7 @@ func newHealthCheckLog(start, end time.Time, exitCode int, log string) define.He
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// updatedHealthCheckStatus updates the health status of the container
|
// updateHealthStatus updates the health status of the container
|
||||||
// in the healthcheck log
|
// in the healthcheck log
|
||||||
func (c *Container) updateHealthStatus(status string) error {
|
func (c *Container) updateHealthStatus(status string) error {
|
||||||
healthCheck, err := c.getHealthCheckLog()
|
healthCheck, err := c.getHealthCheckLog()
|
||||||
|
@ -1827,7 +1827,7 @@ func WithSecrets(containerSecrets []*ContainerSecret) CtrCreateOption {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// WithSecrets adds environment variable secrets to the container
|
// WithEnvSecrets adds environment variable secrets to the container
|
||||||
func WithEnvSecrets(envSecrets map[string]string) CtrCreateOption {
|
func WithEnvSecrets(envSecrets map[string]string) CtrCreateOption {
|
||||||
return func(ctr *Container) error {
|
return func(ctr *Container) error {
|
||||||
ctr.config.EnvSecrets = make(map[string]*secrets.Secret)
|
ctr.config.EnvSecrets = make(map[string]*secrets.Secret)
|
||||||
@ -2085,7 +2085,7 @@ func WithPodCgroupParent(path string) PodCreateOption {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// WithPodCgroups tells containers in this pod to use the cgroup created for
|
// WithPodParent tells containers in this pod to use the cgroup created for
|
||||||
// this pod.
|
// this pod.
|
||||||
// This can still be overridden at the container level by explicitly specifying
|
// This can still be overridden at the container level by explicitly specifying
|
||||||
// a Cgroup parent.
|
// a Cgroup parent.
|
||||||
|
@ -83,7 +83,7 @@ func (c *Container) getPlatformContainerStats(stats *define.ContainerStats, prev
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// getMemory limit returns the memory limit for a container
|
// getMemLimit returns the memory limit for a container
|
||||||
func (c *Container) getMemLimit() uint64 {
|
func (c *Container) getMemLimit() uint64 {
|
||||||
memLimit := uint64(math.MaxUint64)
|
memLimit := uint64(math.MaxUint64)
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@ func (c *Container) getPlatformContainerStats(stats *define.ContainerStats, prev
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// getMemory limit returns the memory limit for a container
|
// getMemLimit returns the memory limit for a container
|
||||||
func (c *Container) getMemLimit(memLimit uint64) uint64 {
|
func (c *Container) getMemLimit(memLimit uint64) uint64 {
|
||||||
si := &syscall.Sysinfo_t{}
|
si := &syscall.Sysinfo_t{}
|
||||||
err := syscall.Sysinfo(si)
|
err := syscall.Sysinfo(si)
|
||||||
|
@ -15,7 +15,7 @@ func UpdatePodmanDockerSockService(mc *vmconfigs.MachineConfig) error {
|
|||||||
command := fmt.Sprintf("'echo %q > %s'", content, ignition.PodmanDockerTmpConfPath)
|
command := fmt.Sprintf("'echo %q > %s'", content, ignition.PodmanDockerTmpConfPath)
|
||||||
args := []string{"sudo", "bash", "-c", command}
|
args := []string{"sudo", "bash", "-c", command}
|
||||||
if err := CommonSSH(mc.SSH.RemoteUsername, mc.SSH.IdentityPath, mc.Name, mc.SSH.Port, args); err != nil {
|
if err := CommonSSH(mc.SSH.RemoteUsername, mc.SSH.IdentityPath, mc.Name, mc.SSH.Port, args); err != nil {
|
||||||
logrus.Warnf("Could not not update internal docker sock config")
|
logrus.Warnf("Could not update internal docker sock config")
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user