mirror of
https://github.com/containers/podman.git
synced 2025-06-22 18:08:11 +08:00
codespell: spelling corrections
Signed-off-by: Dmitry Smirnov <onlyjob@member.fsf.org>
This commit is contained in:
@ -36,7 +36,7 @@ This project tests all builds against each supported version of Fedora, the late
|
|||||||
|
|
||||||
## Communications
|
## Communications
|
||||||
|
|
||||||
If you think you've identified a security issue in the project, please *DO NOT* report the issue publically via the Github issue tracker, mailing list, or IRC.
|
If you think you've identified a security issue in the project, please *DO NOT* report the issue publicly via the Github issue tracker, mailing list, or IRC.
|
||||||
Instead, send an email with as many details as possible to `security@lists.podman.io`. This is a private mailing list for the core maintainers.
|
Instead, send an email with as many details as possible to `security@lists.podman.io`. This is a private mailing list for the core maintainers.
|
||||||
|
|
||||||
For general questions and discussion, please use the
|
For general questions and discussion, please use the
|
||||||
|
@ -154,7 +154,7 @@
|
|||||||
|
|
||||||
## 1.5.0
|
## 1.5.0
|
||||||
### Features
|
### Features
|
||||||
- Podman containers can now join the user namespaces of other containers with `--userns=container:$ID`, or a user namespace at an arbitary path with `--userns=ns:$PATH`
|
- Podman containers can now join the user namespaces of other containers with `--userns=container:$ID`, or a user namespace at an arbitrary path with `--userns=ns:$PATH`
|
||||||
- Rootless Podman can experimentally squash all UIDs and GIDs in an image to a single UID and GID (which does not require use of the `newuidmap` and `newgidmap` executables) by passing `--storage-opt ignore_chown_errors`
|
- Rootless Podman can experimentally squash all UIDs and GIDs in an image to a single UID and GID (which does not require use of the `newuidmap` and `newgidmap` executables) by passing `--storage-opt ignore_chown_errors`
|
||||||
- The `podman generate kube` command now produces YAML for any bind mounts the container has created ([#2303](https://github.com/containers/libpod/issues/2303))
|
- The `podman generate kube` command now produces YAML for any bind mounts the container has created ([#2303](https://github.com/containers/libpod/issues/2303))
|
||||||
- The `podman container restore` command now features a new flag, `--ignore-static-ip`, that can be used with `--import` to import a single container with a static IP multiple times on the same host
|
- The `podman container restore` command now features a new flag, `--ignore-static-ip`, that can be used with `--import` to import a single container with a static IP multiple times on the same host
|
||||||
@ -230,7 +230,7 @@
|
|||||||
## 1.4.3
|
## 1.4.3
|
||||||
### Features
|
### Features
|
||||||
- Podman now has greatly improved support for containers using multiple OCI runtimes. Containers now remember if they were created with a different runtime using `--runtime` and will always use that runtime
|
- Podman now has greatly improved support for containers using multiple OCI runtimes. Containers now remember if they were created with a different runtime using `--runtime` and will always use that runtime
|
||||||
- The `cached` and `delegated` options for volume mounts are now allowed for Docker compatability ([#3340](https://github.com/containers/libpod/issues/3340))
|
- The `cached` and `delegated` options for volume mounts are now allowed for Docker compatibility ([#3340](https://github.com/containers/libpod/issues/3340))
|
||||||
- The `podman diff` command now supports the `--latest` flag
|
- The `podman diff` command now supports the `--latest` flag
|
||||||
|
|
||||||
### Bugfixes
|
### Bugfixes
|
||||||
@ -243,7 +243,7 @@
|
|||||||
### Misc
|
### Misc
|
||||||
- Podman now performs much better on systems with heavy I/O load
|
- Podman now performs much better on systems with heavy I/O load
|
||||||
- The `--cgroup-manager` flag to `podman` now shows the correct default setting in help if the default was overridden by `libpod.conf`
|
- The `--cgroup-manager` flag to `podman` now shows the correct default setting in help if the default was overridden by `libpod.conf`
|
||||||
- For backwards compatability, setting `--log-driver=json-file` in `podman run` is now supported as an alias for `--log-driver=k8s-file`. This is considered deprecated, and `json-file` will be moved to a new implementation in the future ([#3363](https://github.com/containers/libpod/issues/3363))
|
- For backwards compatibility, setting `--log-driver=json-file` in `podman run` is now supported as an alias for `--log-driver=k8s-file`. This is considered deprecated, and `json-file` will be moved to a new implementation in the future ([#3363](https://github.com/containers/libpod/issues/3363))
|
||||||
- Podman's default `libpod.conf` file now allows the [crun](https://github.com/giuseppe/crun) OCI runtime to be used if it is installed
|
- Podman's default `libpod.conf` file now allows the [crun](https://github.com/giuseppe/crun) OCI runtime to be used if it is installed
|
||||||
|
|
||||||
## 1.4.2
|
## 1.4.2
|
||||||
@ -297,7 +297,7 @@
|
|||||||
- Fixed a bug where `podman exec` would fail on older kernels ([#2968](https://github.com/containers/libpod/issues/2968))
|
- Fixed a bug where `podman exec` would fail on older kernels ([#2968](https://github.com/containers/libpod/issues/2968))
|
||||||
|
|
||||||
### Misc
|
### Misc
|
||||||
- The `podman inspect` command on containers now uses the `Id` key (instead of `ID`) for the container's ID, for better compatability with the output of `docker inspect`
|
- The `podman inspect` command on containers now uses the `Id` key (instead of `ID`) for the container's ID, for better compatibility with the output of `docker inspect`
|
||||||
- The `podman commit` command is now usable with the Podman remote client
|
- The `podman commit` command is now usable with the Podman remote client
|
||||||
- The `--signature-policy` flag (used with several image-related commands) has been deprecated
|
- The `--signature-policy` flag (used with several image-related commands) has been deprecated
|
||||||
- The `podman unshare` command now defines two environment variables in the spawned shell: `CONTAINERS_RUNROOT` and `CONTAINERS_GRAPHROOT`, pointing to temporary and permanent storage for rootless containers
|
- The `podman unshare` command now defines two environment variables in the spawned shell: `CONTAINERS_RUNROOT` and `CONTAINERS_GRAPHROOT`, pointing to temporary and permanent storage for rootless containers
|
||||||
@ -379,7 +379,7 @@
|
|||||||
- The Podman remote client now builds on Windows
|
- The Podman remote client now builds on Windows
|
||||||
- A major refactor of volumes created using the `podman volume` command was performed. There should be no major user-facing changes, but downgrading from Podman 1.3 to previous versions may render some volumes unable to be removed.
|
- A major refactor of volumes created using the `podman volume` command was performed. There should be no major user-facing changes, but downgrading from Podman 1.3 to previous versions may render some volumes unable to be removed.
|
||||||
- The `podman events` command now logs events to journald by default. The old behavior (log to file) can be configured in podman.conf via the `events_logger` option
|
- The `podman events` command now logs events to journald by default. The old behavior (log to file) can be configured in podman.conf via the `events_logger` option
|
||||||
- The `podman commit` command, in versions 1.2 and earlier, included all volumes mounted into the container as image volumes in the committed image. This behavior was incorrect and has been disabled by default; it can be reenabled with the `--include-volumes` flag
|
- The `podman commit` command, in versions 1.2 and earlier, included all volumes mounted into the container as image volumes in the committed image. This behavior was incorrect and has been disabled by default; it can be re-enabled with the `--include-volumes` flag
|
||||||
|
|
||||||
|
|
||||||
## 1.2.0
|
## 1.2.0
|
||||||
@ -529,7 +529,7 @@
|
|||||||
- Fixed a bug where detaching from a container using the detach keys would cause Podman to hang until the container exited
|
- Fixed a bug where detaching from a container using the detach keys would cause Podman to hang until the container exited
|
||||||
- Fixed a bug where `podman create --rm` did not work with `podman start --attach`
|
- Fixed a bug where `podman create --rm` did not work with `podman start --attach`
|
||||||
- Fixed a bug where invalid named volumes specified in `podman create` and `podman run` could cause segfaults ([#2301](https://github.com/containers/libpod/issues/2301))
|
- Fixed a bug where invalid named volumes specified in `podman create` and `podman run` could cause segfaults ([#2301](https://github.com/containers/libpod/issues/2301))
|
||||||
- Fixed a bug where the `runtime` field in `libpod.conf` was being ignored. `runtime` is legacy and deprecated, but will continue to be respected for the forseeable future
|
- Fixed a bug where the `runtime` field in `libpod.conf` was being ignored. `runtime` is legacy and deprecated, but will continue to be respected for the foreseeable future
|
||||||
- Fixed a bug where `podman login` would sometimes report it logged in successfully when it did not
|
- Fixed a bug where `podman login` would sometimes report it logged in successfully when it did not
|
||||||
- Fixed a bug where `podman pod create` would not error on receiving unused CLI argument
|
- Fixed a bug where `podman pod create` would not error on receiving unused CLI argument
|
||||||
- Fixed a bug where rootless `podman run` with the `--pod` argument would fail if the pod was stopped
|
- Fixed a bug where rootless `podman run` with the `--pod` argument would fail if the pod was stopped
|
||||||
@ -554,7 +554,7 @@
|
|||||||
- `podman rm` can now delete containers in containers/storage, which can be used to resolve some situations where Podman fails to remove a container
|
- `podman rm` can now delete containers in containers/storage, which can be used to resolve some situations where Podman fails to remove a container
|
||||||
- The `podman search` command now searches multiple registries in parallel for improved performance
|
- The `podman search` command now searches multiple registries in parallel for improved performance
|
||||||
- The `podman build` command now defaults `--pull-always` to true
|
- The `podman build` command now defaults `--pull-always` to true
|
||||||
- Containers which share a network namespace (for example, when in a pod) will now share /etc/hosts and /etc/resolv.conf between all containers in the pod, causing changes in one container to propogate to all containers sharing their networks
|
- Containers which share a network namespace (for example, when in a pod) will now share /etc/hosts and /etc/resolv.conf between all containers in the pod, causing changes in one container to propagate to all containers sharing their networks
|
||||||
- The `podman rm` and `podman rmi` commands now return 1 (instead of 127) when all specified container or images are missing
|
- The `podman rm` and `podman rmi` commands now return 1 (instead of 127) when all specified container or images are missing
|
||||||
|
|
||||||
## 1.0.0
|
## 1.0.0
|
||||||
@ -593,7 +593,7 @@
|
|||||||
- The `podman info` command now prints the path of the configuration file controlling container storage
|
- The `podman info` command now prints the path of the configuration file controlling container storage
|
||||||
- Added `podman list` and `podman ls` as aliases for `podman ps`, and `podman container ps` and `podman container list` as aliases for `podman container ls`
|
- Added `podman list` and `podman ls` as aliases for `podman ps`, and `podman container ps` and `podman container list` as aliases for `podman container ls`
|
||||||
- Changed `podman generate kube` to generate Kubernetes service YAML in the same file as pod YAML, generating a single file instead of two
|
- Changed `podman generate kube` to generate Kubernetes service YAML in the same file as pod YAML, generating a single file instead of two
|
||||||
- To improve compatability with the Docker command line, `podman inspect -f '{{ json .ContainerConfig }}'` on images is no longer valid; please use `podman inspect -f '{{ json .Config }}'` instead
|
- To improve compatibility with the Docker command line, `podman inspect -f '{{ json .ContainerConfig }}'` on images is no longer valid; please use `podman inspect -f '{{ json .Config }}'` instead
|
||||||
|
|
||||||
## 0.12.1.2
|
## 0.12.1.2
|
||||||
### Bugfixes
|
### Bugfixes
|
||||||
@ -626,7 +626,7 @@
|
|||||||
### Bugfixes
|
### Bugfixes
|
||||||
- Fixed a breaking change in rootless Podman where a change in default paths caused Podman to be unable to function on systems upgraded from 0.10.x or earlier
|
- Fixed a breaking change in rootless Podman where a change in default paths caused Podman to be unable to function on systems upgraded from 0.10.x or earlier
|
||||||
- Fixed a bug where `podman exec` without `-t` would still use a terminal if the container was created with `-t`
|
- Fixed a bug where `podman exec` without `-t` would still use a terminal if the container was created with `-t`
|
||||||
- Fixed a bug where container root propogation was not being properly adjusted if volumes with root propogation set were mounted into the container
|
- Fixed a bug where container root propagation was not being properly adjusted if volumes with root propagation set were mounted into the container
|
||||||
- Fixed a bug where `podman exec` could hold the container lock longer than necessary waiting for an exited container
|
- Fixed a bug where `podman exec` could hold the container lock longer than necessary waiting for an exited container
|
||||||
- Fixed a bug where rootless containers using `slirp4netns` for networking were reporting using `bridge` networking in `podman inspect`
|
- Fixed a bug where rootless containers using `slirp4netns` for networking were reporting using `bridge` networking in `podman inspect`
|
||||||
- Fixed a bug where `podman container restore -a` was attempting to restore all containers, including created and running ones. It will now only attempt to restore stopped and exited containers
|
- Fixed a bug where `podman container restore -a` was attempting to restore all containers, including created and running ones. It will now only attempt to restore stopped and exited containers
|
||||||
@ -692,7 +692,7 @@
|
|||||||
- Changed default location of temporary libpod files in rootless Podman
|
- Changed default location of temporary libpod files in rootless Podman
|
||||||
- Updated the default Podman seccomp profile
|
- Updated the default Podman seccomp profile
|
||||||
|
|
||||||
### Compatability
|
### Compatibility
|
||||||
Several paths related to rootless Podman had their default values changed in this release.
|
Several paths related to rootless Podman had their default values changed in this release.
|
||||||
If paths were not hardcoded in libpod.conf, your system may lose track of running containers and believe they are newly-created.
|
If paths were not hardcoded in libpod.conf, your system may lose track of running containers and believe they are newly-created.
|
||||||
|
|
||||||
@ -730,7 +730,7 @@ If paths were not hardcoded in libpod.conf, your system may lose track of runnin
|
|||||||
- Fixed an issue with rootless Podman not properly detecting when user namespaces were not enabled
|
- Fixed an issue with rootless Podman not properly detecting when user namespaces were not enabled
|
||||||
- Fixed an issue where Podman user namespaces were not preserving file capabilities
|
- Fixed an issue where Podman user namespaces were not preserving file capabilities
|
||||||
- Fixed an issue where `resolv.conf` in container would unconditionally forward nameservers into the container, even localhost
|
- Fixed an issue where `resolv.conf` in container would unconditionally forward nameservers into the container, even localhost
|
||||||
- Fixed containers to release resources in the OCI runtime immediately after exiting, improving compatability with Kata containers
|
- Fixed containers to release resources in the OCI runtime immediately after exiting, improving compatibility with Kata containers
|
||||||
- Fixed OCI runtime handling to fix several issues when using gVisor as an OCI runtime
|
- Fixed OCI runtime handling to fix several issues when using gVisor as an OCI runtime
|
||||||
- Fixed SELinux relabel errors when starting containers after a system restart
|
- Fixed SELinux relabel errors when starting containers after a system restart
|
||||||
- Fixed a crash when initializing hooks on containers running systemd as init
|
- Fixed a crash when initializing hooks on containers running systemd as init
|
||||||
@ -786,10 +786,10 @@ If paths were not hardcoded in libpod.conf, your system may lose track of runnin
|
|||||||
- Fixed rootless `podman create` with no command specified throwing an error
|
- Fixed rootless `podman create` with no command specified throwing an error
|
||||||
|
|
||||||
### Misc
|
### Misc
|
||||||
- Added `podman rm --volumes` flag for compatability with Docker. As Podman does not presently support named volumes, this does nothing for now, but provides improved compatability with the Docker command line.
|
- Added `podman rm --volumes` flag for compatibility with Docker. As Podman does not presently support named volumes, this does nothing for now, but provides improved compatibility with the Docker command line.
|
||||||
- Improved error messages from `podman pull`
|
- Improved error messages from `podman pull`
|
||||||
|
|
||||||
### Compatability
|
### Compatibility
|
||||||
- Podman is no longer being built by default with support for the Devicemapper storage driver. If you are using this storage driver, you should investigate switching to overlayfs.
|
- Podman is no longer being built by default with support for the Devicemapper storage driver. If you are using this storage driver, you should investigate switching to overlayfs.
|
||||||
|
|
||||||
## 0.9.1.1
|
## 0.9.1.1
|
||||||
@ -848,6 +848,6 @@ It is recommended that you restart your system firewall after installing this re
|
|||||||
- Fixed issues with Apparmor in rootless containers
|
- Fixed issues with Apparmor in rootless containers
|
||||||
- Fixed an issue with database encoding causing some containers created by Podman versions 0.8.1 and below to be unusable.
|
- Fixed an issue with database encoding causing some containers created by Podman versions 0.8.1 and below to be unusable.
|
||||||
|
|
||||||
### Compatability:
|
### Compatibility:
|
||||||
We switched JSON encoding/decoding to a new library for this release to address a compatability issue introduced by v0.8.2.
|
We switched JSON encoding/decoding to a new library for this release to address a compatibility issue introduced by v0.8.2.
|
||||||
However, this may cause issues with containers created in 0.8.2 and 0.8.3 with custom DNS servers.
|
However, this may cause issues with containers created in 0.8.2 and 0.8.3 with custom DNS servers.
|
||||||
|
@ -37,7 +37,7 @@ func init() {
|
|||||||
flags.BoolVar(&attachCommand.SigProxy, "sig-proxy", true, "Proxy received signals to the process")
|
flags.BoolVar(&attachCommand.SigProxy, "sig-proxy", true, "Proxy received signals to the process")
|
||||||
flags.BoolVarP(&attachCommand.Latest, "latest", "l", false, "Act on the latest container podman is aware of")
|
flags.BoolVarP(&attachCommand.Latest, "latest", "l", false, "Act on the latest container podman is aware of")
|
||||||
markFlagHiddenForRemoteClient("latest", flags)
|
markFlagHiddenForRemoteClient("latest", flags)
|
||||||
// TODO allow for passing of a new deatch keys
|
// TODO allow for passing of a new detach keys
|
||||||
markFlagHiddenForRemoteClient("detach-keys", flags)
|
markFlagHiddenForRemoteClient("detach-keys", flags)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -192,7 +192,7 @@ func copyBetweenHostAndContainer(runtime *libpod.Runtime, src string, dest strin
|
|||||||
} else if isBindMount, mount := isBindMountDestName(srcPath, ctr); isBindMount {
|
} else if isBindMount, mount := isBindMountDestName(srcPath, ctr); isBindMount {
|
||||||
path, err := pathWithBindMountSource(mount, srcPath)
|
path, err := pathWithBindMountSource(mount, srcPath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return errors.Wrapf(err, "error getting source path from bind moutn %s", mount.Destination)
|
return errors.Wrapf(err, "error getting source path from bind mount %s", mount.Destination)
|
||||||
}
|
}
|
||||||
srcPath = path
|
srcPath = path
|
||||||
} else if filepath.IsAbs(srcPath) {
|
} else if filepath.IsAbs(srcPath) {
|
||||||
|
@ -157,7 +157,7 @@ func getRuntime(ctx context.Context, c *cliconfig.PodmanCommand, renumber, migra
|
|||||||
|
|
||||||
// TODO flag to set CNI plugins dir?
|
// TODO flag to set CNI plugins dir?
|
||||||
|
|
||||||
// TODO I dont think these belong here?
|
// TODO I don't think these belong here?
|
||||||
// Will follow up with a different PR to address
|
// Will follow up with a different PR to address
|
||||||
//
|
//
|
||||||
// Pod create options
|
// Pod create options
|
||||||
|
@ -64,7 +64,7 @@ func init() {
|
|||||||
rootCmd.PersistentFlags().StringVar(&MainGlobalOpts.Root, "root", "", "Path to the root directory in which data, including images, is stored")
|
rootCmd.PersistentFlags().StringVar(&MainGlobalOpts.Root, "root", "", "Path to the root directory in which data, including images, is stored")
|
||||||
rootCmd.PersistentFlags().StringVar(&MainGlobalOpts.Runroot, "runroot", "", "Path to the 'run directory' where all state information is stored")
|
rootCmd.PersistentFlags().StringVar(&MainGlobalOpts.Runroot, "runroot", "", "Path to the 'run directory' where all state information is stored")
|
||||||
rootCmd.PersistentFlags().StringVar(&MainGlobalOpts.Runtime, "runtime", "", "Path to the OCI-compatible binary used to run containers, default is /usr/bin/runc")
|
rootCmd.PersistentFlags().StringVar(&MainGlobalOpts.Runtime, "runtime", "", "Path to the OCI-compatible binary used to run containers, default is /usr/bin/runc")
|
||||||
// -s is depracated due to conflict with -s on subcommands
|
// -s is deprecated due to conflict with -s on subcommands
|
||||||
rootCmd.PersistentFlags().StringVar(&MainGlobalOpts.StorageDriver, "storage-driver", "", "Select which storage driver is used to manage storage of images and containers (default is overlay)")
|
rootCmd.PersistentFlags().StringVar(&MainGlobalOpts.StorageDriver, "storage-driver", "", "Select which storage driver is used to manage storage of images and containers (default is overlay)")
|
||||||
rootCmd.PersistentFlags().StringArrayVar(&MainGlobalOpts.StorageOpts, "storage-opt", []string{}, "Used to pass an option to the storage driver")
|
rootCmd.PersistentFlags().StringArrayVar(&MainGlobalOpts.StorageOpts, "storage-opt", []string{}, "Used to pass an option to the storage driver")
|
||||||
rootCmd.PersistentFlags().BoolVar(&MainGlobalOpts.Syslog, "syslog", false, "Output logging information to syslog as well as the console")
|
rootCmd.PersistentFlags().BoolVar(&MainGlobalOpts.Syslog, "syslog", false, "Output logging information to syslog as well as the console")
|
||||||
|
@ -88,7 +88,7 @@ func TestReadRemoteConfig(t *testing.T) {
|
|||||||
{"good", args{reader: strings.NewReader(goodConfig)}, makeGoodResult(), false},
|
{"good", args{reader: strings.NewReader(goodConfig)}, makeGoodResult(), false},
|
||||||
// a connection with no destination is an error
|
// a connection with no destination is an error
|
||||||
{"nodest", args{reader: strings.NewReader(noDest)}, nil, true},
|
{"nodest", args{reader: strings.NewReader(noDest)}, nil, true},
|
||||||
// a connnection with no user is OK
|
// a connection with no user is OK
|
||||||
{"nouser", args{reader: strings.NewReader(noUser)}, makeNoUserResult(), false},
|
{"nouser", args{reader: strings.NewReader(noUser)}, makeNoUserResult(), false},
|
||||||
}
|
}
|
||||||
for _, tt := range tests {
|
for _, tt := range tests {
|
||||||
|
@ -453,7 +453,7 @@ func PBatch(containers []*libpod.Container, workers int, opts PsOptions) []PsCon
|
|||||||
psResults := []PsContainerOutput{}
|
psResults := []PsContainerOutput{}
|
||||||
|
|
||||||
// If the number of containers in question is less than the number of
|
// If the number of containers in question is less than the number of
|
||||||
// proposed parallel operations, we shouldnt spawn so many workers.
|
// proposed parallel operations, we shouldn't spawn so many workers.
|
||||||
if workers > len(containers) {
|
if workers > len(containers) {
|
||||||
workers = len(containers)
|
workers = len(containers)
|
||||||
}
|
}
|
||||||
@ -694,7 +694,7 @@ func portsToString(ports []ocicni.PortMapping) string {
|
|||||||
portgroup, ok := portGroupMap[portMapKey]
|
portgroup, ok := portGroupMap[portMapKey]
|
||||||
if !ok {
|
if !ok {
|
||||||
portGroupMap[portMapKey] = &portGroup{first: v.ContainerPort, last: v.ContainerPort}
|
portGroupMap[portMapKey] = &portGroup{first: v.ContainerPort, last: v.ContainerPort}
|
||||||
// This list is required to travese portGroupMap.
|
// This list is required to traverse portGroupMap.
|
||||||
groupKeyList = append(groupKeyList, portMapKey)
|
groupKeyList = append(groupKeyList, portMapKey)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
@ -111,7 +111,7 @@ func CreateContainer(ctx context.Context, c *GenericCLIResults, runtime *libpod.
|
|||||||
// if the user disabled the healthcheck with "none", we skip adding it
|
// if the user disabled the healthcheck with "none", we skip adding it
|
||||||
healthCheckCommandInput := c.String("healthcheck-command")
|
healthCheckCommandInput := c.String("healthcheck-command")
|
||||||
|
|
||||||
// the user didnt disable the healthcheck but did pass in a healthcheck command
|
// the user didn't disable the healthcheck but did pass in a healthcheck command
|
||||||
// now we need to make a healthcheck from the commandline input
|
// now we need to make a healthcheck from the commandline input
|
||||||
if healthCheckCommandInput != "none" {
|
if healthCheckCommandInput != "none" {
|
||||||
if len(healthCheckCommandInput) > 0 {
|
if len(healthCheckCommandInput) > 0 {
|
||||||
|
@ -72,7 +72,7 @@ func ParallelExecuteWorkerPool(workers int, functions []ParallelWorkerInput) (ma
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Parallelize provides the maximum number of parallel workers (int) as calculated by a basic
|
// Parallelize provides the maximum number of parallel workers (int) as calculated by a basic
|
||||||
// heuristic. This can be overriden by the --max-workers primary switch to podman.
|
// heuristic. This can be overridden by the --max-workers primary switch to podman.
|
||||||
func Parallelize(job string) int {
|
func Parallelize(job string) int {
|
||||||
numCpus := runtime.NumCPU()
|
numCpus := runtime.NumCPU()
|
||||||
switch job {
|
switch job {
|
||||||
|
@ -82,8 +82,8 @@ func TestValidateFileName(t *testing.T) {
|
|||||||
args args
|
args args
|
||||||
wantErr bool
|
wantErr bool
|
||||||
}{
|
}{
|
||||||
{name: "good", args: args{filename: "/som/rand/path"}, wantErr: false},
|
{name: "good", args: args{filename: "/some/rand/path"}, wantErr: false},
|
||||||
{name: "good", args: args{filename: "som/rand/path"}, wantErr: false},
|
{name: "good", args: args{filename: "some/rand/path"}, wantErr: false},
|
||||||
{name: "good", args: args{filename: "/"}, wantErr: false},
|
{name: "good", args: args{filename: "/"}, wantErr: false},
|
||||||
{name: "bad", args: args{filename: "/:"}, wantErr: true},
|
{name: "bad", args: args{filename: "/:"}, wantErr: true},
|
||||||
{name: "bad", args: args{filename: ":/"}, wantErr: true},
|
{name: "bad", args: args{filename: ":/"}, wantErr: true},
|
||||||
|
@ -106,7 +106,7 @@ func (p *Pool) newWorker(slot int) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// DefaultPoolSize provides the maximum number of parallel workers (int) as calculated by a basic
|
// DefaultPoolSize provides the maximum number of parallel workers (int) as calculated by a basic
|
||||||
// heuristic. This can be overriden by the --max-workers primary switch to podman.
|
// heuristic. This can be overridden by the --max-workers primary switch to podman.
|
||||||
func DefaultPoolSize(name string) int {
|
func DefaultPoolSize(name string) int {
|
||||||
numCpus := runtime.NumCPU()
|
numCpus := runtime.NumCPU()
|
||||||
switch name {
|
switch name {
|
||||||
|
@ -128,7 +128,7 @@ func statsCmd(c *cliconfig.StatsValues) error {
|
|||||||
for _, ctr := range ctrs {
|
for _, ctr := range ctrs {
|
||||||
initialStats, err := ctr.GetContainerStats(&libpod.ContainerStats{})
|
initialStats, err := ctr.GetContainerStats(&libpod.ContainerStats{})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
// when doing "all", dont worry about containers that are not running
|
// when doing "all", don't worry about containers that are not running
|
||||||
cause := errors.Cause(err)
|
cause := errors.Cause(err)
|
||||||
if c.All && (cause == define.ErrCtrRemoved || cause == define.ErrNoSuchCtr || cause == define.ErrCtrStateInvalid) {
|
if c.All && (cause == define.ErrCtrRemoved || cause == define.ErrNoSuchCtr || cause == define.ErrCtrStateInvalid) {
|
||||||
continue
|
continue
|
||||||
|
@ -115,7 +115,7 @@ func printImageChildren(layerMap map[string]*image.LayerInfo, layerID string, pr
|
|||||||
// add continueItem i.e. '|' for next iteration prefix
|
// add continueItem i.e. '|' for next iteration prefix
|
||||||
prefix = prefix + continueItem
|
prefix = prefix + continueItem
|
||||||
} else if len(ll.ChildID) > 1 || len(ll.ChildID) == 0 {
|
} else if len(ll.ChildID) > 1 || len(ll.ChildID) == 0 {
|
||||||
// The above condition ensure, alignment happens for node, which has more then 1 childern.
|
// The above condition ensure, alignment happens for node, which has more then 1 children.
|
||||||
// If node is last in printing hierarchy, it should not be printed as middleItem i.e. ├──
|
// If node is last in printing hierarchy, it should not be printed as middleItem i.e. ├──
|
||||||
intend = lastItem
|
intend = lastItem
|
||||||
prefix = prefix + " "
|
prefix = prefix + " "
|
||||||
|
@ -2004,7 +2004,7 @@ _podman_container_run() {
|
|||||||
return
|
return
|
||||||
;;
|
;;
|
||||||
--env|-e)
|
--env|-e)
|
||||||
# we do not append a "=" here because "-e VARNAME" is legal systax, too
|
# we do not append a "=" here because "-e VARNAME" is legal syntax, too
|
||||||
COMPREPLY=( $( compgen -e -- "$cur" ) )
|
COMPREPLY=( $( compgen -e -- "$cur" ) )
|
||||||
__podman_nospace
|
__podman_nospace
|
||||||
return
|
return
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
# To get zsh to reread this file: unset -f _podman;rm -f ~/.zcompdump;compinit
|
# To get zsh to reread this file: unset -f _podman;rm -f ~/.zcompdump;compinit
|
||||||
|
|
||||||
# On rereads, reset cache. (Not that the cacheing works, but some day it might)
|
# On rereads, reset cache. (Not that the caching works, but some day it might)
|
||||||
unset -m '_podman_*'
|
unset -m '_podman_*'
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
@ -12,7 +12,7 @@ HOME="$(getent passwd $USER | cut -d : -f 6)"
|
|||||||
[[ -n "$UID" ]] || UID=$(getent passwd $USER | cut -d : -f 3)
|
[[ -n "$UID" ]] || UID=$(getent passwd $USER | cut -d : -f 3)
|
||||||
GID=$(getent passwd $USER | cut -d : -f 4)
|
GID=$(getent passwd $USER | cut -d : -f 4)
|
||||||
|
|
||||||
# Essential default paths, many are overriden when executing under Cirrus-CI
|
# Essential default paths, many are overridden when executing under Cirrus-CI
|
||||||
export GOPATH="${GOPATH:-/var/tmp/go}"
|
export GOPATH="${GOPATH:-/var/tmp/go}"
|
||||||
if type -P go &> /dev/null
|
if type -P go &> /dev/null
|
||||||
then
|
then
|
||||||
@ -82,7 +82,7 @@ PERIODIC_APT_RE='^(APT::Periodic::.+")1"\;'
|
|||||||
LILTO="timeout_attempt_delay_command 24s 5 30s"
|
LILTO="timeout_attempt_delay_command 24s 5 30s"
|
||||||
BIGTO="timeout_attempt_delay_command 300s 5 30s"
|
BIGTO="timeout_attempt_delay_command 300s 5 30s"
|
||||||
|
|
||||||
# Safe env. vars. to transfer from root -> $ROOTLESS_USER (go env handled separetly)
|
# Safe env. vars. to transfer from root -> $ROOTLESS_USER (go env handled separately)
|
||||||
ROOTLESS_ENV_RE='(CIRRUS_.+)|(ROOTLESS_.+)|(.+_IMAGE.*)|(.+_BASE)|(.*DIRPATH)|(.*FILEPATH)|(SOURCE.*)|(DEPEND.*)|(.+_DEPS_.+)|(OS_REL.*)|(.+_ENV_RE)|(TRAVIS)|(CI.+)|(TEST_REMOTE.*)'
|
ROOTLESS_ENV_RE='(CIRRUS_.+)|(ROOTLESS_.+)|(.+_IMAGE.*)|(.+_BASE)|(.*DIRPATH)|(.*FILEPATH)|(SOURCE.*)|(DEPEND.*)|(.+_DEPS_.+)|(OS_REL.*)|(.+_ENV_RE)|(TRAVIS)|(CI.+)|(TEST_REMOTE.*)'
|
||||||
# Unsafe env. vars for display
|
# Unsafe env. vars for display
|
||||||
SECRET_ENV_RE='(IRCID)|(ACCOUNT)|(GC[EP]..+)|(SSH)'
|
SECRET_ENV_RE='(IRCID)|(ACCOUNT)|(GC[EP]..+)|(SSH)'
|
||||||
@ -319,7 +319,7 @@ setup_rootless() {
|
|||||||
tee -a /etc/subuid >> /etc/subgid
|
tee -a /etc/subuid >> /etc/subgid
|
||||||
|
|
||||||
# Env. vars set by Cirrus and setup_environment.sh must be explicitly
|
# Env. vars set by Cirrus and setup_environment.sh must be explicitly
|
||||||
# transfered to the test-user.
|
# transferred to the test-user.
|
||||||
echo "Configuring rootless user's environment variables:"
|
echo "Configuring rootless user's environment variables:"
|
||||||
echo "# Added by $GOSRC/$SCRIPT_PATH/lib.sh setup_rootless()"
|
echo "# Added by $GOSRC/$SCRIPT_PATH/lib.sh setup_rootless()"
|
||||||
_ENV_VAR_NAMES=$(awk 'BEGIN{for(v in ENVIRON) print v}' | \
|
_ENV_VAR_NAMES=$(awk 'BEGIN{for(v in ENVIRON) print v}' | \
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
set +e # Not all of these exist on every platform
|
set +e # Not all of these exist on every platform
|
||||||
|
|
||||||
# This is intended to be executed on VMs as a startup script on initial-boot.
|
# This is intended to be executed on VMs as a startup script on initial-boot.
|
||||||
# Alternativly, it may be executed with the '--list' option to return the list
|
# Alternatively, it may be executed with the '--list' option to return the list
|
||||||
# of systemd units defined for disablement (useful for testing).
|
# of systemd units defined for disablement (useful for testing).
|
||||||
|
|
||||||
EVIL_UNITS="cron crond atd apt-daily-upgrade apt-daily fstrim motd-news systemd-tmpfiles-clean"
|
EVIL_UNITS="cron crond atd apt-daily-upgrade apt-daily fstrim motd-news systemd-tmpfiles-clean"
|
||||||
|
@ -334,7 +334,7 @@ option to `false`. The environment variables passed in include `http_proxy`,
|
|||||||
those. This option is only needed when the host system must use a proxy but
|
those. This option is only needed when the host system must use a proxy but
|
||||||
the container should not use any proxy. Proxy environment variables specified
|
the container should not use any proxy. Proxy environment variables specified
|
||||||
for the container in any other way will override the values that would have
|
for the container in any other way will override the values that would have
|
||||||
been passed thru from the host. (Other ways to specify the proxy for the
|
been passed through from the host. (Other ways to specify the proxy for the
|
||||||
container include passing the values with the `--env` flag, or hard coding the
|
container include passing the values with the `--env` flag, or hard coding the
|
||||||
proxy environment at container build time.)
|
proxy environment at container build time.)
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ The write (and read) location for signatures is defined in YAML-based
|
|||||||
configuration files in /etc/containers/registries.d/. When you sign
|
configuration files in /etc/containers/registries.d/. When you sign
|
||||||
an image, Podman will use those configuration files to determine
|
an image, Podman will use those configuration files to determine
|
||||||
where to write the signature based on the the name of the originating
|
where to write the signature based on the the name of the originating
|
||||||
registry or a default storage value unless overriden with the --directory
|
registry or a default storage value unless overridden with the --directory
|
||||||
option. For example, consider the following configuration file.
|
option. For example, consider the following configuration file.
|
||||||
|
|
||||||
docker:
|
docker:
|
||||||
|
@ -17,7 +17,7 @@ Podman uses Buildah(1) internally to create container images. Both tools share i
|
|||||||
(not container) storage, hence each can use or manipulate images (but not containers)
|
(not container) storage, hence each can use or manipulate images (but not containers)
|
||||||
created by the other.
|
created by the other.
|
||||||
|
|
||||||
Podman-remote provides a local client interacting with a Podman backend node through a varlink ssh connection. In this context, a Podman node is a Linux system with Podman installed on it and the varlink service activated. Credentials for this session can be passed in using flags, enviroment variables, or in `podman-remote.conf`
|
Podman-remote provides a local client interacting with a Podman backend node through a varlink ssh connection. In this context, a Podman node is a Linux system with Podman installed on it and the varlink service activated. Credentials for this session can be passed in using flags, environment variables, or in `podman-remote.conf`
|
||||||
|
|
||||||
**podman [GLOBAL OPTIONS]**
|
**podman [GLOBAL OPTIONS]**
|
||||||
|
|
||||||
|
@ -341,7 +341,7 @@ option to `false`. The environment variables passed in include `http_proxy`,
|
|||||||
those. This option is only needed when the host system must use a proxy but
|
those. This option is only needed when the host system must use a proxy but
|
||||||
the container should not use any proxy. Proxy environment variables specified
|
the container should not use any proxy. Proxy environment variables specified
|
||||||
for the container in any other way will override the values that would have
|
for the container in any other way will override the values that would have
|
||||||
been passed thru from the host. (Other ways to specify the proxy for the
|
been passed through from the host. (Other ways to specify the proxy for the
|
||||||
container include passing the values with the `--env` flag, or hard coding the
|
container include passing the values with the `--env` flag, or hard coding the
|
||||||
proxy environment at container build time.)
|
proxy environment at container build time.)
|
||||||
|
|
||||||
|
@ -267,7 +267,7 @@ echo -e "\n${YEL}Removing and re-creating $GOSRC on $VMNAME.${NOR}"
|
|||||||
showrun $SSH_CMD --command "rm -rf $GOSRC"
|
showrun $SSH_CMD --command "rm -rf $GOSRC"
|
||||||
showrun $SSH_CMD --command "mkdir -p $GOSRC"
|
showrun $SSH_CMD --command "mkdir -p $GOSRC"
|
||||||
|
|
||||||
echo -e "\n${YEL}Transfering tarball to $VMNAME.${NOR}"
|
echo -e "\n${YEL}Transferring tarball to $VMNAME.${NOR}"
|
||||||
wait
|
wait
|
||||||
showrun $SCP_CMD $HOME/$TARBALL $SSHUSER@$VMNAME:/tmp/$TARBALL
|
showrun $SCP_CMD $HOME/$TARBALL $SSHUSER@$VMNAME:/tmp/$TARBALL
|
||||||
|
|
||||||
|
@ -2235,7 +2235,7 @@ func (s *BoltState) RemovePodContainers(pod *Pod) error {
|
|||||||
if ctr == nil {
|
if ctr == nil {
|
||||||
// This should never happen
|
// This should never happen
|
||||||
// State is inconsistent
|
// State is inconsistent
|
||||||
return errors.Wrapf(define.ErrNoSuchCtr, "pod %s referenced nonexistant container %s", pod.ID(), string(id))
|
return errors.Wrapf(define.ErrNoSuchCtr, "pod %s referenced nonexistent container %s", pod.ID(), string(id))
|
||||||
}
|
}
|
||||||
ctrDeps := ctr.Bucket(dependenciesBkt)
|
ctrDeps := ctr.Bucket(dependenciesBkt)
|
||||||
// This should never be nil, but if it is, we're
|
// This should never be nil, but if it is, we're
|
||||||
|
@ -167,7 +167,7 @@ type EventFilter func(*Event) bool
|
|||||||
|
|
||||||
var (
|
var (
|
||||||
// ErrEventTypeBlank indicates the event log found something done by podman
|
// ErrEventTypeBlank indicates the event log found something done by podman
|
||||||
// but it isnt likely an event
|
// but it isn't likely an event
|
||||||
ErrEventTypeBlank = errors.New("event type blank")
|
ErrEventTypeBlank = errors.New("event type blank")
|
||||||
|
|
||||||
// ErrEventNotFound indicates that the event was not found in the event log
|
// ErrEventNotFound indicates that the event was not found in the event log
|
||||||
|
@ -31,7 +31,7 @@ const (
|
|||||||
// HealthCheckNotDefined means the container has no health
|
// HealthCheckNotDefined means the container has no health
|
||||||
// check defined in it
|
// check defined in it
|
||||||
HealthCheckNotDefined HealthCheckStatus = iota
|
HealthCheckNotDefined HealthCheckStatus = iota
|
||||||
// HealthCheckInternalError means somes something failed obtaining or running
|
// HealthCheckInternalError means some something failed obtaining or running
|
||||||
// a given health check
|
// a given health check
|
||||||
HealthCheckInternalError HealthCheckStatus = iota
|
HealthCheckInternalError HealthCheckStatus = iota
|
||||||
// HealthCheckDefined means the healthcheck was found on the container
|
// HealthCheckDefined means the healthcheck was found on the container
|
||||||
|
@ -330,7 +330,7 @@ func (ir *Runtime) doPullImage(ctx context.Context, sc *types.SystemContext, goa
|
|||||||
if goal.usedSearchRegistries && len(goal.searchedRegistries) == 0 {
|
if goal.usedSearchRegistries && len(goal.searchedRegistries) == 0 {
|
||||||
return nil, errors.Errorf("image name provided is a short name and no search registries are defined in the registries config file.")
|
return nil, errors.Errorf("image name provided is a short name and no search registries are defined in the registries config file.")
|
||||||
}
|
}
|
||||||
// If the image passed in was fully-qualified, we will have 1 refpair. Bc the image is fq'd, we dont need to yap about registries.
|
// If the image passed in was fully-qualified, we will have 1 refpair. Bc the image is fq'd, we don't need to yap about registries.
|
||||||
if !goal.usedSearchRegistries {
|
if !goal.usedSearchRegistries {
|
||||||
if pullErrors != nil && len(pullErrors.Errors) > 0 { // this should always be true
|
if pullErrors != nil && len(pullErrors.Errors) > 0 { // this should always be true
|
||||||
return nil, errors.Wrap(pullErrors.Errors[0], "unable to pull image")
|
return nil, errors.Wrap(pullErrors.Errors[0], "unable to pull image")
|
||||||
|
@ -341,7 +341,7 @@ func libpodMountsToKubeVolumeMounts(c *Container) ([]v1.VolumeMount, []v1.Volume
|
|||||||
return vms, vos, nil
|
return vms, vos, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// generateKubeVolumeMount takes a user specfied mount and returns
|
// generateKubeVolumeMount takes a user specified mount and returns
|
||||||
// a kubernetes VolumeMount (to be added to the container) and a kubernetes Volume
|
// a kubernetes VolumeMount (to be added to the container) and a kubernetes Volume
|
||||||
// (to be added to the pod)
|
// (to be added to the pod)
|
||||||
func generateKubeVolumeMount(m specs.Mount) (v1.VolumeMount, v1.Volume, error) {
|
func generateKubeVolumeMount(m specs.Mount) (v1.VolumeMount, v1.Volume, error) {
|
||||||
|
@ -145,7 +145,7 @@ shm_struct_t *setup_lock_shm(char *path, uint32_t num_locks, int *error_code) {
|
|||||||
|
|
||||||
// Set mutexes to robust - if a process dies while holding a mutex, we'll get
|
// Set mutexes to robust - if a process dies while holding a mutex, we'll get
|
||||||
// a special error code on the next attempt to lock it.
|
// a special error code on the next attempt to lock it.
|
||||||
// This should prevent panicing processes from leaving the state unusable.
|
// This should prevent panicking processes from leaving the state unusable.
|
||||||
ret_code = pthread_mutexattr_setrobust(&attr, PTHREAD_MUTEX_ROBUST);
|
ret_code = pthread_mutexattr_setrobust(&attr, PTHREAD_MUTEX_ROBUST);
|
||||||
if (ret_code != 0) {
|
if (ret_code != 0) {
|
||||||
*error_code = -1 * ret_code;
|
*error_code = -1 * ret_code;
|
||||||
@ -298,7 +298,7 @@ int32_t close_lock_shm(shm_struct_t *shm) {
|
|||||||
// Allocate the first available semaphore
|
// Allocate the first available semaphore
|
||||||
// Returns a positive integer guaranteed to be less than UINT32_MAX on success,
|
// Returns a positive integer guaranteed to be less than UINT32_MAX on success,
|
||||||
// or negative errno values on failure
|
// or negative errno values on failure
|
||||||
// On sucess, the returned integer is the number of the semaphore allocated
|
// On success, the returned integer is the number of the semaphore allocated
|
||||||
int64_t allocate_semaphore(shm_struct_t *shm) {
|
int64_t allocate_semaphore(shm_struct_t *shm) {
|
||||||
int ret_code, i;
|
int ret_code, i;
|
||||||
bitmap_t test_map;
|
bitmap_t test_map;
|
||||||
|
@ -386,8 +386,7 @@ func WithNamespace(ns string) RuntimeOption {
|
|||||||
|
|
||||||
// WithVolumePath sets the path under which all named volumes
|
// WithVolumePath sets the path under which all named volumes
|
||||||
// should be created.
|
// should be created.
|
||||||
// The path changes based on whethe rthe user is running as root
|
// The path changes based on whether the user is running as root or not.
|
||||||
// or not.
|
|
||||||
func WithVolumePath(volPath string) RuntimeOption {
|
func WithVolumePath(volPath string) RuntimeOption {
|
||||||
return func(rt *Runtime) error {
|
return func(rt *Runtime) error {
|
||||||
if rt.valid {
|
if rt.valid {
|
||||||
|
@ -445,7 +445,7 @@ func (p *Pod) Inspect() (*PodInspect, error) {
|
|||||||
}
|
}
|
||||||
for _, c := range containers {
|
for _, c := range containers {
|
||||||
containerStatus := "unknown"
|
containerStatus := "unknown"
|
||||||
// Ignoring possible errors here because we dont want this to be
|
// Ignoring possible errors here because we don't want this to be
|
||||||
// catastrophic in nature
|
// catastrophic in nature
|
||||||
containerState, err := c.State()
|
containerState, err := c.State()
|
||||||
if err == nil {
|
if err == nil {
|
||||||
|
@ -59,7 +59,7 @@ func (r *Runtime) GetVolume(name string) (*Volume, error) {
|
|||||||
return vol, nil
|
return vol, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// LookupVolume retrieves a volume by unambigious partial name.
|
// LookupVolume retrieves a volume by unambiguous partial name.
|
||||||
func (r *Runtime) LookupVolume(name string) (*Volume, error) {
|
func (r *Runtime) LookupVolume(name string) (*Volume, error) {
|
||||||
r.lock.RLock()
|
r.lock.RLock()
|
||||||
defer r.lock.RUnlock()
|
defer r.lock.RUnlock()
|
||||||
|
@ -178,7 +178,7 @@ func (r *LocalRuntime) LookupContainersWithStatus(filters []string) ([]*Containe
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
// This is not performance savy; if this turns out to be a problematic series of lookups, we need to
|
// This is not performance savvy; if this turns out to be a problematic series of lookups, we need to
|
||||||
// create a new endpoint to speed things up
|
// create a new endpoint to speed things up
|
||||||
for _, ctr := range ctrs {
|
for _, ctr := range ctrs {
|
||||||
container, err := r.LookupContainer(ctr.Id)
|
container, err := r.LookupContainer(ctr.Id)
|
||||||
@ -617,7 +617,7 @@ func (r *LocalRuntime) Checkpoint(c *cliconfig.CheckpointValues) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if c.All {
|
if c.All {
|
||||||
// We dont have a great way to get all the running containers, so need to get all and then
|
// We don't have a great way to get all the running containers, so need to get all and then
|
||||||
// check status on them bc checkpoint considers checkpointing a stopped container an error
|
// check status on them bc checkpoint considers checkpointing a stopped container an error
|
||||||
var runningIds []string
|
var runningIds []string
|
||||||
for _, id := range ids {
|
for _, id := range ids {
|
||||||
@ -660,7 +660,7 @@ func (r *LocalRuntime) Restore(ctx context.Context, c *cliconfig.RestoreValues)
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if c.All {
|
if c.All {
|
||||||
// We dont have a great way to get all the exited containers, so need to get all and then
|
// We don't have a great way to get all the exited containers, so need to get all and then
|
||||||
// check status on them bc checkpoint considers restoring a running container an error
|
// check status on them bc checkpoint considers restoring a running container an error
|
||||||
var exitedIDs []string
|
var exitedIDs []string
|
||||||
for _, id := range ids {
|
for _, id := range ids {
|
||||||
|
@ -36,7 +36,7 @@ const (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// PodContainerStats is struct containing an adapter Pod and a libpod
|
// PodContainerStats is struct containing an adapter Pod and a libpod
|
||||||
// ContainerStats and is used primarily for outputing pod stats.
|
// ContainerStats and is used primarily for outputting pod stats.
|
||||||
type PodContainerStats struct {
|
type PodContainerStats struct {
|
||||||
Pod *Pod
|
Pod *Pod
|
||||||
ContainerStats map[string]*libpod.ContainerStats
|
ContainerStats map[string]*libpod.ContainerStats
|
||||||
|
@ -19,7 +19,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// PodContainerStats is struct containing an adapter Pod and a libpod
|
// PodContainerStats is struct containing an adapter Pod and a libpod
|
||||||
// ContainerStats and is used primarily for outputing pod stats.
|
// ContainerStats and is used primarily for outputting pod stats.
|
||||||
type PodContainerStats struct {
|
type PodContainerStats struct {
|
||||||
Pod *Pod
|
Pod *Pod
|
||||||
ContainerStats map[string]*libpod.ContainerStats
|
ContainerStats map[string]*libpod.ContainerStats
|
||||||
|
@ -450,7 +450,7 @@ func (r *LocalRuntime) GetFileFromRemoteHost(remoteFilePath, outputPath string,
|
|||||||
|
|
||||||
reader := r.Conn.Reader
|
reader := r.Conn.Reader
|
||||||
if _, err := io.CopyN(writer, reader, length); err != nil {
|
if _, err := io.CopyN(writer, reader, length); err != nil {
|
||||||
return errors.Wrap(err, "file transer failed")
|
return errors.Wrap(err, "file transfer failed")
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,7 @@ The default directory is `/usr/share/containers/oci/hooks.d`, but tools consumin
|
|||||||
|
|
||||||
If multiple directories are configured, a JSON filename in a preferred directory masks entries with the same filename in directories with lower precedence. For example, if a consuming tool watches for hooks in `/etc/containers/oci/hooks.d` and `/usr/share/containers/oci/hooks.d` (in order of decreasing precedence), then a hook definition in `/etc/containers/oci/hooks.d/01-my-hook.json` will mask any definition in `/usr/share/containers/oci/hooks.d/01-my-hook.json`.
|
If multiple directories are configured, a JSON filename in a preferred directory masks entries with the same filename in directories with lower precedence. For example, if a consuming tool watches for hooks in `/etc/containers/oci/hooks.d` and `/usr/share/containers/oci/hooks.d` (in order of decreasing precedence), then a hook definition in `/etc/containers/oci/hooks.d/01-my-hook.json` will mask any definition in `/usr/share/containers/oci/hooks.d/01-my-hook.json`.
|
||||||
|
|
||||||
Tools consuming this format may also opt to monitor the hook directries for changes, in which case they will notice additions, changes, and removals to JSON files without needing to be restarted or otherwise signaled. When the tool monitors multiple hooks directories, the precedence discussed in the previous paragraph still applies. For example, if a consuming tool watches for hooks in `/etc/containers/oci/hooks.d` and `/usr/share/containers/oci/hooks.d` (in order of decreasing precedence), then writing a new hook definition to `/etc/containers/oci/hooks.d/01-my-hook.json` will mask the hook previously loaded from `/usr/share/containers/oci/hooks.d/01-my-hook.json`. Subsequent changes to `/usr/share/containers/oci/hooks.d/01-my-hook.json` will have no effect on the consuming tool as long as `/etc/containers/oci/hooks.d/01-my-hook.json` exists. Removing `/etc/containers/oci/hooks.d/01-my-hook.json` will reload the hook from `/usr/share/containers/oci/hooks.d/01-my-hook.json`.
|
Tools consuming this format may also opt to monitor the hook directories for changes, in which case they will notice additions, changes, and removals to JSON files without needing to be restarted or otherwise signaled. When the tool monitors multiple hooks directories, the precedence discussed in the previous paragraph still applies. For example, if a consuming tool watches for hooks in `/etc/containers/oci/hooks.d` and `/usr/share/containers/oci/hooks.d` (in order of decreasing precedence), then writing a new hook definition to `/etc/containers/oci/hooks.d/01-my-hook.json` will mask the hook previously loaded from `/usr/share/containers/oci/hooks.d/01-my-hook.json`. Subsequent changes to `/usr/share/containers/oci/hooks.d/01-my-hook.json` will have no effect on the consuming tool as long as `/etc/containers/oci/hooks.d/01-my-hook.json` exists. Removing `/etc/containers/oci/hooks.d/01-my-hook.json` will reload the hook from `/usr/share/containers/oci/hooks.d/01-my-hook.json`.
|
||||||
|
|
||||||
Hooks are injected in the order obtained by sorting the JSON file names, after converting them to lower case, based on their Unicode code points.
|
Hooks are injected in the order obtained by sorting the JSON file names, after converting them to lower case, based on their Unicode code points.
|
||||||
For example, a matching hook defined in `01-my-hook.json` would be injected before matching hooks defined in `02-another-hook.json` and `01-UPPERCASE.json`.
|
For example, a matching hook defined in `01-my-hook.json` would be injected before matching hooks defined in `02-another-hook.json` and `01-UPPERCASE.json`.
|
||||||
|
@ -136,9 +136,9 @@ func (config *CreateConfig) parseVolumes(runtime *libpod.Runtime) ([]spec.Mount,
|
|||||||
unifiedMounts[initMount.Destination] = initMount
|
unifiedMounts[initMount.Destination] = initMount
|
||||||
}
|
}
|
||||||
|
|
||||||
// Before superceding, we need to find volume mounts which conflict with
|
// Before superseding, we need to find volume mounts which conflict with
|
||||||
// named volumes, and vice versa.
|
// named volumes, and vice versa.
|
||||||
// We'll delete the conflicts here as we supercede.
|
// We'll delete the conflicts here as we supersede.
|
||||||
for dest := range unifiedMounts {
|
for dest := range unifiedMounts {
|
||||||
if _, ok := baseVolumes[dest]; ok {
|
if _, ok := baseVolumes[dest]; ok {
|
||||||
delete(baseVolumes, dest)
|
delete(baseVolumes, dest)
|
||||||
@ -150,7 +150,7 @@ func (config *CreateConfig) parseVolumes(runtime *libpod.Runtime) ([]spec.Mount,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Supercede volumes-from/image volumes with unified volumes from above.
|
// Supersede volumes-from/image volumes with unified volumes from above.
|
||||||
// This is an unconditional replacement.
|
// This is an unconditional replacement.
|
||||||
for dest, mount := range unifiedMounts {
|
for dest, mount := range unifiedMounts {
|
||||||
baseMounts[dest] = mount
|
baseMounts[dest] = mount
|
||||||
@ -336,7 +336,7 @@ func (config *CreateConfig) getMounts() (map[string]spec.Mount, map[string]*libp
|
|||||||
|
|
||||||
// TODO(vrothberg): the manual parsing can be replaced with a regular expression
|
// TODO(vrothberg): the manual parsing can be replaced with a regular expression
|
||||||
// to allow a more robust parsing of the mount format and to give
|
// to allow a more robust parsing of the mount format and to give
|
||||||
// precise errors regarding supported format versus suppored options.
|
// precise errors regarding supported format versus supported options.
|
||||||
for _, mount := range config.MountsFlag {
|
for _, mount := range config.MountsFlag {
|
||||||
arr := strings.SplitN(mount, ",", 2)
|
arr := strings.SplitN(mount, ",", 2)
|
||||||
if len(arr) < 2 {
|
if len(arr) < 2 {
|
||||||
@ -820,7 +820,7 @@ func (config *CreateConfig) addContainerInitBinary(path string) (spec.Mount, err
|
|||||||
return mount, nil
|
return mount, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// Supercede existing mounts in the spec with new, user-specified mounts.
|
// Supersede existing mounts in the spec with new, user-specified mounts.
|
||||||
// TODO: Should we unmount subtree mounts? E.g., if /tmp/ is mounted by
|
// TODO: Should we unmount subtree mounts? E.g., if /tmp/ is mounted by
|
||||||
// one mount, and we already have /tmp/a and /tmp/b, should we remove
|
// one mount, and we already have /tmp/a and /tmp/b, should we remove
|
||||||
// the /tmp/a and /tmp/b mounts in favor of the more general /tmp?
|
// the /tmp/a and /tmp/b mounts in favor of the more general /tmp?
|
||||||
|
@ -139,7 +139,7 @@ func LoadAndMergeConfig(dirPath string) (*RegistryConfiguration, error) {
|
|||||||
return &mergedConfig, nil
|
return &mergedConfig, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// HaveMatchRegistry checks if trust settings for the registry have been configed in yaml file
|
// HaveMatchRegistry checks if trust settings for the registry have been configured in yaml file
|
||||||
func HaveMatchRegistry(key string, registryConfigs *RegistryConfiguration) *RegistryNamespace {
|
func HaveMatchRegistry(key string, registryConfigs *RegistryConfiguration) *RegistryNamespace {
|
||||||
searchKey := key
|
searchKey := key
|
||||||
if !strings.Contains(searchKey, "/") {
|
if !strings.Contains(searchKey, "/") {
|
||||||
|
@ -84,7 +84,7 @@ func ParseChanges(option string) (key string, vals []string, err error) {
|
|||||||
if len(tokens) < 2 {
|
if len(tokens) < 2 {
|
||||||
return "", []string{}, fmt.Errorf("invalid key value %s", option)
|
return "", []string{}, fmt.Errorf("invalid key value %s", option)
|
||||||
}
|
}
|
||||||
key = strings.Trim(tokens[0], " ") // Need to trim whitespace part of delimeter.
|
key = strings.Trim(tokens[0], " ") // Need to trim whitespace part of delimiter.
|
||||||
val = tokens[1]
|
val = tokens[1]
|
||||||
if strings.Contains(tokens[1], "[") && strings.Contains(tokens[1], "]") {
|
if strings.Contains(tokens[1], "[") && strings.Contains(tokens[1], "]") {
|
||||||
//Trim '[',']' if exist.
|
//Trim '[',']' if exist.
|
||||||
|
Reference in New Issue
Block a user