Fix spelling "setup" -> "set up" and similar

* Replace "setup", "lookup", "cleanup", "backup" with
  "set up", "look up", "clean up", "back up"
  when used as verbs. Replace also variations of those.

* Improve language in a few places.

Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
This commit is contained in:
Erik Sjölund 2022-06-19 11:48:35 +02:00
parent ca26d44d3b
commit aa4279ae15
50 changed files with 98 additions and 98 deletions

View File

@ -162,7 +162,7 @@ spelled with complete minutiae.
release branch (`git checkout upstream/vX.Y`). release branch (`git checkout upstream/vX.Y`).
1. Create a new local working-branch to develop the release PR, 1. Create a new local working-branch to develop the release PR,
`git checkout -b bump_vX.Y.Z`. `git checkout -b bump_vX.Y.Z`.
1. Lookup the *COMMIT ID* of the last release, 1. Look up the *COMMIT ID* of the last release,
`git log -1 $(git tag | sort -V | tail -1)`. `git log -1 $(git tag | sort -V | tail -1)`.
1. Edit `version/version.go` and bump the `Version` value to the new 1. Edit `version/version.go` and bump the `Version` value to the new
release version. If there were API changes, also bump `APIVersion` value. release version. If there were API changes, also bump `APIVersion` value.

View File

@ -73,7 +73,7 @@ func getUserInfo(name string) (string, string, string, error) {
entry := readCapped(output) entry := readCapped(output)
elements := strings.Split(entry, ":") elements := strings.Split(entry, ":")
if len(elements) < 9 || elements[0] != name { if len(elements) < 9 || elements[0] != name {
return "", "", "", errors.New("Could not lookup user") return "", "", "", errors.New("Could not look up user")
} }
return elements[0], elements[2], elements[8], nil return elements[0], elements[2], elements[8], nil
@ -90,7 +90,7 @@ func getUser() (string, string, string, error) {
_, uid, home, err := getUserInfo(name) _, uid, home, err := getUserInfo(name)
if err != nil { if err != nil {
return "", "", "", fmt.Errorf("could not lookup user: %s", name) return "", "", "", fmt.Errorf("could not look up user: %s", name)
} }
id, err := strconv.Atoi(uid) id, err := strconv.Atoi(uid)
if err != nil { if err != nil {

View File

@ -23,7 +23,7 @@ var (
cleanupCommand = &cobra.Command{ cleanupCommand = &cobra.Command{
Annotations: map[string]string{registry.EngineMode: registry.ABIMode}, Annotations: map[string]string{registry.EngineMode: registry.ABIMode},
Use: "cleanup [options] CONTAINER [CONTAINER...]", Use: "cleanup [options] CONTAINER [CONTAINER...]",
Short: "Cleanup network and mountpoints of one or more containers", Short: "Clean up network and mountpoints of one or more containers",
Long: cleanupDescription, Long: cleanupDescription,
RunE: cleanup, RunE: cleanup,
Args: func(cmd *cobra.Command, args []string) error { Args: func(cmd *cobra.Command, args []string) error {

View File

@ -15,7 +15,7 @@ import (
) )
var ( var (
portDescription = `List port mappings for the CONTAINER, or lookup the public-facing port that is NAT-ed to the PRIVATE_PORT portDescription = `List port mappings for the CONTAINER, or look up the public-facing port that is NAT-ed to the PRIVATE_PORT
` `
portCommand = &cobra.Command{ portCommand = &cobra.Command{
Use: "port [options] CONTAINER [PORT]", Use: "port [options] CONTAINER [PORT]",

View File

@ -92,7 +92,7 @@ func setXdgDirs() error {
return nil return nil
} }
// Setup XDG_RUNTIME_DIR // Set up XDG_RUNTIME_DIR
if _, found := os.LookupEnv("XDG_RUNTIME_DIR"); !found { if _, found := os.LookupEnv("XDG_RUNTIME_DIR"); !found {
dir, err := util.GetRuntimeDir() dir, err := util.GetRuntimeDir()
if err != nil { if err != nil {
@ -110,7 +110,7 @@ func setXdgDirs() error {
} }
} }
// Setup XDG_CONFIG_HOME // Set up XDG_CONFIG_HOME
if _, found := os.LookupEnv("XDG_CONFIG_HOME"); !found { if _, found := os.LookupEnv("XDG_CONFIG_HOME"); !found {
cfgHomeDir, err := util.GetRootlessConfigHomeDir() cfgHomeDir, err := util.GetRootlessConfigHomeDir()
if err != nil { if err != nil {

View File

@ -188,7 +188,7 @@ func GetUserInfo(uri *url.URL) (*url.Userinfo, error) {
if u, found := os.LookupEnv("_CONTAINERS_ROOTLESS_UID"); found { if u, found := os.LookupEnv("_CONTAINERS_ROOTLESS_UID"); found {
usr, err = user.LookupId(u) usr, err = user.LookupId(u)
if err != nil { if err != nil {
return nil, errors.Wrapf(err, "failed to lookup rootless user") return nil, errors.Wrapf(err, "failed to look up rootless user")
} }
} else { } else {
usr, err = user.Current() usr, err = user.Current()

View File

@ -73,9 +73,9 @@ func CheckAllLatestAndIDFile(c *cobra.Command, args []string, ignoreArgLen bool,
specifiedLatest, _ = c.Flags().GetBool("latest") specifiedLatest, _ = c.Flags().GetBool("latest")
if c.Flags().Lookup("all") == nil || c.Flags().Lookup("latest") == nil { if c.Flags().Lookup("all") == nil || c.Flags().Lookup("latest") == nil {
if idFileFlag == "" { if idFileFlag == "" {
return errors.New("unable to lookup values for 'latest' or 'all'") return errors.New("unable to look up values for 'latest' or 'all'")
} else if c.Flags().Lookup(idFileFlag) == nil { } else if c.Flags().Lookup(idFileFlag) == nil {
return errors.Errorf("unable to lookup values for 'latest', 'all', or '%s'", idFileFlag) return errors.Errorf("unable to look up values for 'latest', 'all', or '%s'", idFileFlag)
} }
} }
} }

View File

@ -131,7 +131,7 @@ func removePathFromRegistry(path string) error {
k, err := registry.OpenKey(registry.CURRENT_USER, Environment, registry.READ|registry.WRITE) k, err := registry.OpenKey(registry.CURRENT_USER, Environment, registry.READ|registry.WRITE)
if err != nil { if err != nil {
if errors.Is(err, fs.ErrNotExist) { if errors.Is(err, fs.ErrNotExist) {
// Nothing to cleanup, the Environment registry key does not exist. // Nothing to clean up, the Environment registry key does not exist.
return nil return nil
} }
return err return err

View File

@ -11,7 +11,7 @@
| [podman-commit(1)](https://podman.readthedocs.io/en/latest/markdown/podman-commit.1.html) | Create new image based on the changed container | | [podman-commit(1)](https://podman.readthedocs.io/en/latest/markdown/podman-commit.1.html) | Create new image based on the changed container |
| [podman-container(1)](https://podman.readthedocs.io/en/latest/managecontainers.html) | Manage Containers | | [podman-container(1)](https://podman.readthedocs.io/en/latest/managecontainers.html) | Manage Containers |
| [podman-container-checkpoint(1)](https://podman.readthedocs.io/en/latest/markdown/podman-container-checkpoint.1.html) | Checkpoints one or more running containers | | [podman-container-checkpoint(1)](https://podman.readthedocs.io/en/latest/markdown/podman-container-checkpoint.1.html) | Checkpoints one or more running containers |
| [podman-container-cleanup(1)](https://podman.readthedocs.io/en/latest/markdown/podman-container-cleanup.1.html) | Cleanup the container's network and mountpoints | | [podman-container-cleanup(1)](https://podman.readthedocs.io/en/latest/markdown/podman-container-cleanup.1.html) | Clean up the container's network and mountpoints |
| [podman-container-exists(1)](https://podman.readthedocs.io/en/latest/markdown/podman-container-exists.1.html) | Check if an container exists in local storage | | [podman-container-exists(1)](https://podman.readthedocs.io/en/latest/markdown/podman-container-exists.1.html) | Check if an container exists in local storage |
| [podman-container-prune(1)](https://podman.readthedocs.io/en/latest/markdown/podman-container-prune.1.html) | Remove all stopped containers from local storage | | [podman-container-prune(1)](https://podman.readthedocs.io/en/latest/markdown/podman-container-prune.1.html) | Remove all stopped containers from local storage |
| [podman-container-restore(1)](https://podman.readthedocs.io/en/latest/markdown/podman-container-restore.1.html) | Restores one or more containers from a checkpoint | | [podman-container-restore(1)](https://podman.readthedocs.io/en/latest/markdown/podman-container-restore.1.html) | Restores one or more containers from a checkpoint |

View File

@ -173,7 +173,7 @@ setup_rootless() {
ssh-keygen -t ed25519 -P "" -f "/home/$ROOTLESS_USER/.ssh/id_ed25519" ssh-keygen -t ed25519 -P "" -f "/home/$ROOTLESS_USER/.ssh/id_ed25519"
ssh-keygen -t rsa -P "" -f "/home/$ROOTLESS_USER/.ssh/id_rsa" ssh-keygen -t rsa -P "" -f "/home/$ROOTLESS_USER/.ssh/id_rsa"
msg "Setup authorized_keys" msg "Set up authorized_keys"
cat $HOME/.ssh/*.pub /home/$ROOTLESS_USER/.ssh/*.pub >> $HOME/.ssh/authorized_keys cat $HOME/.ssh/*.pub /home/$ROOTLESS_USER/.ssh/*.pub >> $HOME/.ssh/authorized_keys
cat $HOME/.ssh/*.pub /home/$ROOTLESS_USER/.ssh/*.pub >> /home/$ROOTLESS_USER/.ssh/authorized_keys cat $HOME/.ssh/*.pub /home/$ROOTLESS_USER/.ssh/*.pub >> /home/$ROOTLESS_USER/.ssh/authorized_keys
@ -186,9 +186,9 @@ setup_rootless() {
# never be any non-localhost connections made from tests (using strict-mode). # never be any non-localhost connections made from tests (using strict-mode).
# If there are, it's either a security problem or a broken test, both of which # If there are, it's either a security problem or a broken test, both of which
# we want to lead to test failures. # we want to lead to test failures.
msg " setup known_hosts for $USER" msg " set up known_hosts for $USER"
ssh-keyscan localhost > /root/.ssh/known_hosts ssh-keyscan localhost > /root/.ssh/known_hosts
msg " setup known_hosts for $ROOTLESS_USER" msg " set up known_hosts for $ROOTLESS_USER"
# Maintain access-permission consistency with all other .ssh files. # Maintain access-permission consistency with all other .ssh files.
install -Z -m 700 -o $ROOTLESS_USER -g $ROOTLESS_USER \ install -Z -m 700 -o $ROOTLESS_USER -g $ROOTLESS_USER \
/root/.ssh/known_hosts /home/$ROOTLESS_USER/.ssh/known_hosts /root/.ssh/known_hosts /home/$ROOTLESS_USER/.ssh/known_hosts

View File

@ -4,11 +4,11 @@ Tutorials
========= =========
Here are a number of useful tutorials to get you up and running with Podman. If you are familiar with the Docker `Container Engine`_ the command in Podman_ should be quite familiar. If you are brand new to containers, take a look at our `Introduction`. Here are a number of useful tutorials to get you up and running with Podman. If you are familiar with the Docker `Container Engine`_ the command in Podman_ should be quite familiar. If you are brand new to containers, take a look at our `Introduction`.
* `Basic Setup and Use of Podman <https://github.com/containers/podman/blob/main/docs/tutorials/podman_tutorial.md>`_: Learn how to setup Podman and perform some basic commands with the utility. * `Basic Setup and Use of Podman <https://github.com/containers/podman/blob/main/docs/tutorials/podman_tutorial.md>`_: Learn how to set up Podman and perform some basic commands with the utility.
* `Basic Setup and Use of Podman in a Rootless environment <https://github.com/containers/podman/blob/main/docs/tutorials/rootless_tutorial.md>`_: The steps required to setup rootless Podman are enumerated. * `Basic Setup and Use of Podman in a Rootless environment <https://github.com/containers/podman/blob/main/docs/tutorials/rootless_tutorial.md>`_: The steps required to set up rootless Podman are enumerated.
* `Podman for Windows <https://github.com/containers/podman/blob/main/docs/tutorials/podman-for-windows.md>`_: A guide to installing and using Podman on Windows. * `Podman for Windows <https://github.com/containers/podman/blob/main/docs/tutorials/podman-for-windows.md>`_: A guide to installing and using Podman on Windows.
* `Podman Remote Clients on Mac/Windows <https://github.com/containers/podman/blob/main/docs/tutorials/mac_win_client.md>`_: Advanced setup for connecting to a remote Linux system using the Podman remote client on Mac and Windows. * `Podman Remote Clients on Mac/Windows <https://github.com/containers/podman/blob/main/docs/tutorials/mac_win_client.md>`_: Advanced setup for connecting to a remote Linux system using the Podman remote client on Mac and Windows.
* `How to sign and distribute container images using Podman <https://github.com/containers/podman/blob/main/docs/tutorials/image_signing.md>`_: Learn how to setup and use image signing with Podman. * `How to sign and distribute container images using Podman <https://github.com/containers/podman/blob/main/docs/tutorials/image_signing.md>`_: Learn how to set up and use image signing with Podman.
* `Podman remote-client tutorial <https://github.com/containers/podman/blob/main/docs/tutorials/remote_client.md>`_: A brief how-to on using the Podman remote-client. * `Podman remote-client tutorial <https://github.com/containers/podman/blob/main/docs/tutorials/remote_client.md>`_: A brief how-to on using the Podman remote-client.
* `How to use libpod for custom/derivative projects <https://github.com/containers/podman/blob/main/docs/tutorials/podman-derivative-api.md>`_: How the libpod API can be used within your own project. * `How to use libpod for custom/derivative projects <https://github.com/containers/podman/blob/main/docs/tutorials/podman-derivative-api.md>`_: How the libpod API can be used within your own project.
* `How to use Podman's Go RESTful bindings <https://github.com/containers/podman/tree/main/pkg/bindings>`_: An introduction to using our RESTful Golang bindings in an external application. * `How to use Podman's Go RESTful bindings <https://github.com/containers/podman/tree/main/pkg/bindings>`_: An introduction to using our RESTful Golang bindings in an external application.

View File

@ -1,7 +1,7 @@
% podman-container-cleanup(1) % podman-container-cleanup(1)
## NAME ## NAME
podman\-container\-cleanup - Cleanup the container's network and mountpoints podman\-container\-cleanup - Clean up the container's network and mountpoints
## SYNOPSIS ## SYNOPSIS
**podman container cleanup** [*options*] *container* [*container* ...] **podman container cleanup** [*options*] *container* [*container* ...]
@ -13,7 +13,7 @@ Sometimes container mount points and network stacks can remain if the podman com
## OPTIONS ## OPTIONS
#### **--all**, **-a** #### **--all**, **-a**
Cleanup all *containers*.\ Clean up all *containers*.\
The default is **false**.\ The default is **false**.\
*IMPORTANT: This OPTION does not need a container name or ID as input argument.* *IMPORTANT: This OPTION does not need a container name or ID as input argument.*
@ -40,12 +40,12 @@ After cleanup, remove the image entirely.\
The default is **false**. The default is **false**.
## EXAMPLES ## EXAMPLES
Cleanup the container "mywebserver". Clean up the container "mywebserver".
``` ```
$ podman container cleanup mywebserver $ podman container cleanup mywebserver
``` ```
Cleanup the containers with the names "mywebserver", "myflaskserver", "860a4b23". Clean up the containers with the names "mywebserver", "myflaskserver", "860a4b23".
``` ```
$ podman container cleanup mywebserver myflaskserver 860a4b23 $ podman container cleanup mywebserver myflaskserver 860a4b23
``` ```

View File

@ -15,7 +15,7 @@ The container command allows you to manage containers
| --------- | --------------------------------------------------- | ---------------------------------------------------------------------------- | | --------- | --------------------------------------------------- | ---------------------------------------------------------------------------- |
| attach | [podman-attach(1)](podman-attach.1.md) | Attach to a running container. | | attach | [podman-attach(1)](podman-attach.1.md) | Attach to a running container. |
| checkpoint | [podman-container-checkpoint(1)](podman-container-checkpoint.1.md) | Checkpoints one or more running containers. | | checkpoint | [podman-container-checkpoint(1)](podman-container-checkpoint.1.md) | Checkpoints one or more running containers. |
| cleanup | [podman-container-cleanup(1)](podman-container-cleanup.1.md) | Cleanup the container's network and mountpoints. | | cleanup | [podman-container-cleanup(1)](podman-container-cleanup.1.md) | Clean up the container's network and mountpoints. |
| clone | [podman-container-clone(1)](podman-container-clone.1.md) | Creates a copy of an existing container. | | clone | [podman-container-clone(1)](podman-container-clone.1.md) | Creates a copy of an existing container. |
| commit | [podman-commit(1)](podman-commit.1.md) | Create new image based on the changed container. | | commit | [podman-commit(1)](podman-commit.1.md) | Create new image based on the changed container. |
| cp | [podman-cp(1)](podman-cp.1.md) | Copy files/folders between a container and the local filesystem. | | cp | [podman-cp(1)](podman-cp.1.md) | Copy files/folders between a container and the local filesystem. |

View File

@ -654,7 +654,7 @@ Current supported mount TYPEs are **bind**, **volume**, **image**, **tmpfs** and
· bind-propagation: shared, slave, private, unbindable, rshared, rslave, runbindable, or rprivate(default). See also mount(2). · bind-propagation: shared, slave, private, unbindable, rshared, rslave, runbindable, or rprivate(default). See also mount(2).
. bind-nonrecursive: do not setup a recursive bind mount. By default it is recursive. . bind-nonrecursive: do not set up a recursive bind mount. By default it is recursive.
. relabel: shared, private. . relabel: shared, private.

View File

@ -9,7 +9,7 @@ podman\-port - List port mappings for a container
**podman container port** [*options*] *container* [*private-port*[/*proto*]] **podman container port** [*options*] *container* [*private-port*[/*proto*]]
## DESCRIPTION ## DESCRIPTION
List port mappings for the *container* or lookup the public-facing port that is NAT-ed to the *private-port*. List port mappings for the *container* or look up the public-facing port that is NAT-ed to the *private-port*.
## OPTIONS ## OPTIONS

View File

@ -679,7 +679,7 @@ Current supported mount TYPEs are **bind**, **volume**, **image**, **tmpfs** and
· bind-propagation: shared, slave, private, unbindable, rshared, rslave, runbindable, or rprivate(default). See also mount(2). · bind-propagation: shared, slave, private, unbindable, rshared, rslave, runbindable, or rprivate(default). See also mount(2).
. bind-nonrecursive: do not setup a recursive bind mount. By default it is recursive. . bind-nonrecursive: do not set up a recursive bind mount. By default it is recursive.
. relabel: shared, private. . relabel: shared, private.
@ -1883,7 +1883,7 @@ $ podman run --uidmap 0:30000:7000 --gidmap 0:30000:7000 fedora echo hello
Podman allows for the configuration of storage by changing the values Podman allows for the configuration of storage by changing the values
in the _/etc/container/storage.conf_ or by using global options. This in the _/etc/container/storage.conf_ or by using global options. This
shows how to setup and use fuse-overlayfs for a one time run of busybox shows how to set up and use fuse-overlayfs for a one time run of busybox
using global options. using global options.
``` ```

View File

@ -6,11 +6,11 @@
**[Introduction Tutorial](podman_tutorial.md)** **[Introduction Tutorial](podman_tutorial.md)**
Learn how to setup Podman and perform some basic commands with the utility. Learn how to set up Podman and perform some basic commands with the utility.
**[Basic Setup and Use of Podman in a Rootless environment](rootless_tutorial.md)** **[Basic Setup and Use of Podman in a Rootless environment](rootless_tutorial.md)**
The steps required to setup rootless Podman are enumerated. The steps required to set up rootless Podman are enumerated.
**[Setup Mac/Windows](mac_win_client.md)** **[Setup Mac/Windows](mac_win_client.md)**
@ -26,7 +26,7 @@ How the libpod API can be used within your own project.
**[Image Signing](image_signing.md)** **[Image Signing](image_signing.md)**
Learn how to setup and use image signing with Podman. Learn how to set up and use image signing with Podman.
**[Basic Networking](basic_networking.md)** **[Basic Networking](basic_networking.md)**

View File

@ -142,7 +142,7 @@ podman rm --latest
You can verify the deletion of the container by running *podman ps -a*. You can verify the deletion of the container by running *podman ps -a*.
## Integration Tests ## Integration Tests
For more information on how to setup and run the integration tests in your environment, checkout the Integration Tests [README.md](../../test/README.md) For more information on how to set up and run the integration tests in your environment, checkout the Integration Tests [README.md](../../test/README.md)
## More information ## More information

View File

@ -518,7 +518,7 @@ func (c *Container) PortMappings() ([]types.PortMapping, error) {
if len(c.config.NetNsCtr) > 0 { if len(c.config.NetNsCtr) > 0 {
netNsCtr, err := c.runtime.GetContainer(c.config.NetNsCtr) netNsCtr, err := c.runtime.GetContainer(c.config.NetNsCtr)
if err != nil { if err != nil {
return nil, errors.Wrapf(err, "unable to lookup network namespace for container %s", c.ID()) return nil, errors.Wrapf(err, "unable to look up network namespace for container %s", c.ID())
} }
return netNsCtr.PortMappings() return netNsCtr.PortMappings()
} }
@ -657,7 +657,7 @@ func (c *Container) Hostname() string {
utsNsCtr, err := c.runtime.GetContainer(c.config.UTSNsCtr) utsNsCtr, err := c.runtime.GetContainer(c.config.UTSNsCtr)
if err != nil { if err != nil {
// should we return an error here? // should we return an error here?
logrus.Errorf("unable to lookup uts namespace for container %s: %v", c.ID(), err) logrus.Errorf("unable to look up uts namespace for container %s: %v", c.ID(), err)
return "" return ""
} }
return utsNsCtr.Hostname() return utsNsCtr.Hostname()

View File

@ -290,7 +290,7 @@ func (c *Container) handleRestartPolicy(ctx context.Context) (_ bool, retErr err
return false, err return false, err
} }
// setup slirp4netns again because slirp4netns will die when conmon exits // set up slirp4netns again because slirp4netns will die when conmon exits
if c.config.NetMode.IsSlirp4netns() { if c.config.NetMode.IsSlirp4netns() {
err := c.runtime.setupSlirp4netns(c, c.state.NetNS) err := c.runtime.setupSlirp4netns(c, c.state.NetNS)
if err != nil { if err != nil {
@ -298,7 +298,7 @@ func (c *Container) handleRestartPolicy(ctx context.Context) (_ bool, retErr err
} }
} }
// setup rootlesskit port forwarder again since it dies when conmon exits // set up rootlesskit port forwarder again since it dies when conmon exits
// we use rootlesskit port forwarder only as rootless and when bridge network is used // we use rootlesskit port forwarder only as rootless and when bridge network is used
if rootless.IsRootless() && c.config.NetMode.IsBridge() && len(c.config.PortMappings) > 0 { if rootless.IsRootless() && c.config.NetMode.IsBridge() && len(c.config.PortMappings) > 0 {
err := c.runtime.setupRootlessPortMappingViaRLK(c, c.state.NetNS.Path(), c.state.NetworkStatus) err := c.runtime.setupRootlessPortMappingViaRLK(c, c.state.NetNS.Path(), c.state.NetworkStatus)
@ -589,7 +589,7 @@ func (c *Container) teardownStorage() error {
} }
if err := c.cleanupStorage(); err != nil { if err := c.cleanupStorage(); err != nil {
return errors.Wrapf(err, "failed to cleanup container %s storage", c.ID()) return errors.Wrapf(err, "failed to clean up container %s storage", c.ID())
} }
if err := c.runtime.storageService.DeleteContainer(c.ID()); err != nil { if err := c.runtime.storageService.DeleteContainer(c.ID()); err != nil {
@ -1784,7 +1784,7 @@ func (c *Container) cleanupStorage() error {
overlayBasePath := filepath.Dir(c.state.Mountpoint) overlayBasePath := filepath.Dir(c.state.Mountpoint)
if err := overlay.Unmount(overlayBasePath); err != nil { if err := overlay.Unmount(overlayBasePath); err != nil {
if cleanupErr != nil { if cleanupErr != nil {
logrus.Errorf("Failed to cleanup overlay mounts for %s: %v", c.ID(), err) logrus.Errorf("Failed to clean up overlay mounts for %s: %v", c.ID(), err)
} }
cleanupErr = err cleanupErr = err
} }
@ -1801,7 +1801,7 @@ func (c *Container) cleanupStorage() error {
if err := c.cleanupOverlayMounts(); err != nil { if err := c.cleanupOverlayMounts(); err != nil {
// If the container can't remove content report the error // If the container can't remove content report the error
logrus.Errorf("Failed to cleanup overlay mounts for %s: %v", c.ID(), err) logrus.Errorf("Failed to clean up overlay mounts for %s: %v", c.ID(), err)
cleanupErr = err cleanupErr = err
} }
@ -1880,7 +1880,7 @@ func (c *Container) cleanup(ctx context.Context) error {
// we cannot use the dependency container lock due ABBA deadlocks // we cannot use the dependency container lock due ABBA deadlocks
if lock, err := lockfile.GetLockfile(hoststFile); err == nil { if lock, err := lockfile.GetLockfile(hoststFile); err == nil {
lock.Lock() lock.Lock()
// make sure to ignore ENOENT error in case the netns container was cleanup before this one // make sure to ignore ENOENT error in case the netns container was cleaned up before this one
if err := etchosts.Remove(hoststFile, getLocalhostHostEntry(c)); err != nil && !errors.Is(err, os.ErrNotExist) { if err := etchosts.Remove(hoststFile, getLocalhostHostEntry(c)); err != nil && !errors.Is(err, os.ErrNotExist) {
// this error is not fatal we still want to do proper cleanup // this error is not fatal we still want to do proper cleanup
logrus.Errorf("failed to remove hosts entry from the netns containers /etc/hosts: %v", err) logrus.Errorf("failed to remove hosts entry from the netns containers /etc/hosts: %v", err)

View File

@ -311,7 +311,7 @@ func (c *Container) cleanupNetwork() error {
// Stop the container's network namespace (if it has one) // Stop the container's network namespace (if it has one)
if err := c.runtime.teardownNetNS(c); err != nil { if err := c.runtime.teardownNetNS(c); err != nil {
logrus.Errorf("Unable to cleanup network for container %s: %q", c.ID(), err) logrus.Errorf("Unable to clean up network for container %s: %q", c.ID(), err)
} }
c.state.NetNS = nil c.state.NetNS = nil
@ -1210,7 +1210,7 @@ func (c *Container) createCheckpointImage(ctx context.Context, options Container
if err != nil { if err != nil {
return err return err
} }
// Clean-up buildah working container // Clean up buildah working container
defer func() { defer func() {
if err := importBuilder.Delete(); err != nil { if err := importBuilder.Delete(); err != nil {
logrus.Errorf("Image builder delete failed: %v", err) logrus.Errorf("Image builder delete failed: %v", err)
@ -1504,7 +1504,7 @@ func (c *Container) checkpoint(ctx context.Context, options ContainerCheckpointO
c.state.Restored = false c.state.Restored = false
c.state.RestoredTime = time.Time{} c.state.RestoredTime = time.Time{}
// Cleanup Storage and Network // Clean up Storage and Network
if err := c.cleanup(ctx); err != nil { if err := c.cleanup(ctx); err != nil {
return nil, 0, err return nil, 0, err
} }

View File

@ -26,7 +26,7 @@ const (
func (r *Runtime) HealthCheck(name string) (define.HealthCheckStatus, error) { func (r *Runtime) HealthCheck(name string) (define.HealthCheckStatus, error) {
container, err := r.LookupContainer(name) container, err := r.LookupContainer(name)
if err != nil { if err != nil {
return define.HealthCheckContainerNotFound, errors.Wrapf(err, "unable to lookup %s to perform a health check", name) return define.HealthCheckContainerNotFound, errors.Wrapf(err, "unable to look up %s to perform a health check", name)
} }
hcStatus, err := checkHealthCheckCanBeRun(container) hcStatus, err := checkHealthCheckCanBeRun(container)
if err == nil { if err == nil {

View File

@ -291,7 +291,7 @@ func (r *RootlessNetNS) Do(toRun func() error) error {
return err return err
} }
// Cleanup the rootless network namespace if needed. // Clean up the rootless network namespace if needed.
// It checks if we have running containers with the bridge network mode. // It checks if we have running containers with the bridge network mode.
// Cleanup() expects that r.Lock is locked // Cleanup() expects that r.Lock is locked
func (r *RootlessNetNS) Cleanup(runtime *Runtime) error { func (r *RootlessNetNS) Cleanup(runtime *Runtime) error {
@ -783,7 +783,7 @@ func (r *Runtime) teardownNetwork(ns string, opts types.NetworkOptions) error {
// execute the cni setup in the rootless net ns // execute the cni setup in the rootless net ns
err = rootlessNetNS.Do(tearDownPod) err = rootlessNetNS.Do(tearDownPod)
if cerr := rootlessNetNS.Cleanup(r); cerr != nil { if cerr := rootlessNetNS.Cleanup(r); cerr != nil {
logrus.WithError(err).Error("failed to cleanup rootless netns") logrus.WithError(err).Error("failed to clean up rootless netns")
} }
rootlessNetNS.Lock.Unlock() rootlessNetNS.Lock.Unlock()
} else { } else {

View File

@ -120,7 +120,7 @@ func (r *ConmonOCIRuntime) Attach(c *Container, params *AttachOptions) error {
// conmon will then send the exit code of the exec process, or an error in the exec session // conmon will then send the exit code of the exec process, or an error in the exec session
// startFd must be the input side of the fd. // startFd must be the input side of the fd.
// newSize resizes the tty to this size before the process is started, must be nil if the exec session has no tty // newSize resizes the tty to this size before the process is started, must be nil if the exec session has no tty
// conmon will wait to start the exec session until the parent process has setup the console socket. // conmon will wait to start the exec session until the parent process has set up the console socket.
// Once attachToExec successfully attaches to the console socket, the child conmon process responsible for calling runtime exec // Once attachToExec successfully attaches to the console socket, the child conmon process responsible for calling runtime exec
// will read from the output side of start fd, thus learning to start the child process. // will read from the output side of start fd, thus learning to start the child process.
// Thus, the order goes as follow: // Thus, the order goes as follow:

View File

@ -1812,7 +1812,7 @@ func WithHostDevice(dev []specs.LinuxDevice) CtrCreateOption {
} }
} }
// WithSelectedPasswordManagement makes it so that the container either does or does not setup /etc/passwd or /etc/group // WithSelectedPasswordManagement makes it so that the container either does or does not set up /etc/passwd or /etc/group
func WithSelectedPasswordManagement(passwd *bool) CtrCreateOption { func WithSelectedPasswordManagement(passwd *bool) CtrCreateOption {
return func(c *Container) error { return func(c *Container) error {
if c.valid { if c.valid {

View File

@ -135,7 +135,7 @@ func SetXdgDirs() error {
return nil return nil
} }
// Setup XDG_RUNTIME_DIR // Set up XDG_RUNTIME_DIR
runtimeDir := os.Getenv("XDG_RUNTIME_DIR") runtimeDir := os.Getenv("XDG_RUNTIME_DIR")
if runtimeDir == "" { if runtimeDir == "" {
@ -156,7 +156,7 @@ func SetXdgDirs() error {
} }
} }
// Setup XDG_CONFIG_HOME // Set up XDG_CONFIG_HOME
if cfgHomeDir := os.Getenv("XDG_CONFIG_HOME"); cfgHomeDir == "" { if cfgHomeDir := os.Getenv("XDG_CONFIG_HOME"); cfgHomeDir == "" {
cfgHomeDir, err := util.GetRootlessConfigHomeDir() cfgHomeDir, err := util.GetRootlessConfigHomeDir()
if err != nil { if err != nil {
@ -450,7 +450,7 @@ func makeRuntime(runtime *Runtime) (retErr error) {
} }
}() }()
// Setup the eventer // Set up the eventer
eventer, err := runtime.newEventer() eventer, err := runtime.newEventer()
if err != nil { if err != nil {
return err return err
@ -539,7 +539,7 @@ func makeRuntime(runtime *Runtime) (retErr error) {
} }
} }
// the store is only setup when we are in the userns so we do the same for the network interface // the store is only set up when we are in the userns so we do the same for the network interface
if !needsUserns { if !needsUserns {
netBackend, netInterface, err := network.NetworkBackend(runtime.store, runtime.config, runtime.syslog) netBackend, netInterface, err := network.NetworkBackend(runtime.store, runtime.config, runtime.syslog)
if err != nil { if err != nil {

View File

@ -755,7 +755,7 @@ func (r *Runtime) removeContainer(ctx context.Context, c *Container, force, remo
if cleanupErr == nil { if cleanupErr == nil {
cleanupErr = err cleanupErr = err
} else { } else {
logrus.Errorf("Cleanup storage: %v", err) logrus.Errorf("Cleaning up storage: %v", err)
} }
} }
@ -810,11 +810,11 @@ func (r *Runtime) removeContainer(ctx context.Context, c *Container, force, remo
// Ignore error, since podman will report original error // Ignore error, since podman will report original error
volumesFrom, _ := c.volumesFrom() volumesFrom, _ := c.volumesFrom()
if len(volumesFrom) > 0 { if len(volumesFrom) > 0 {
logrus.Debugf("Cleanup volume not possible since volume is in use (%s)", v) logrus.Debugf("Cleaning up volume not possible since volume is in use (%s)", v)
continue continue
} }
} }
logrus.Errorf("Cleanup volume (%s): %v", v, err) logrus.Errorf("Cleaning up volume (%s): %v", v, err)
} }
} }
} }
@ -964,7 +964,7 @@ func (r *Runtime) evictContainer(ctx context.Context, idOrName string, removeVol
continue continue
} }
if err := r.removeVolume(ctx, volume, false, timeout); err != nil && err != define.ErrNoSuchVolume && err != define.ErrVolumeBeingUsed { if err := r.removeVolume(ctx, volume, false, timeout); err != nil && err != define.ErrNoSuchVolume && err != define.ErrVolumeBeingUsed {
logrus.Errorf("Cleanup volume (%s): %v", v, err) logrus.Errorf("Cleaning up volume (%s): %v", v, err)
} }
} }
} }
@ -1111,7 +1111,7 @@ func (r *Runtime) GetContainersByList(containers []string) ([]*Container, error)
for _, inputContainer := range containers { for _, inputContainer := range containers {
ctr, err := r.LookupContainer(inputContainer) ctr, err := r.LookupContainer(inputContainer)
if err != nil { if err != nil {
return ctrs, errors.Wrapf(err, "unable to lookup container %s", inputContainer) return ctrs, errors.Wrapf(err, "unable to look up container %s", inputContainer)
} }
ctrs = append(ctrs, ctr) ctrs = append(ctrs, ctr)
} }

View File

@ -58,7 +58,7 @@ func StatsContainer(w http.ResponseWriter, r *http.Request) {
flusher.Flush() flusher.Flush()
} }
// Setup JSON encoder for streaming. // Set up JSON encoder for streaming.
coder.SetEscapeHTML(true) coder.SetEscapeHTML(true)
var preRead time.Time var preRead time.Time
var preCPUStats CPUStats var preCPUStats CPUStats

View File

@ -66,7 +66,7 @@ func StatsContainer(w http.ResponseWriter, r *http.Request) {
flusher.Flush() flusher.Flush()
} }
// Setup JSON encoder for streaming. // Set up JSON encoder for streaming.
coder := json.NewEncoder(w) coder := json.NewEncoder(w)
coder.SetEscapeHTML(true) coder.SetEscapeHTML(true)

View File

@ -11,7 +11,7 @@ import (
// ListenUnix follows stdlib net.Listen() API, providing a unix listener for given path // ListenUnix follows stdlib net.Listen() API, providing a unix listener for given path
// ListenUnix will delete and create files/directories as needed // ListenUnix will delete and create files/directories as needed
func ListenUnix(network string, path string) (net.Listener, error) { func ListenUnix(network string, path string) (net.Listener, error) {
// setup custom listener for API server // set up custom listener for API server
err := os.MkdirAll(filepath.Dir(path), 0770) err := os.MkdirAll(filepath.Dir(path), 0770)
if err != nil { if err != nil {
return nil, errors.Wrapf(err, "api.ListenUnix() failed to create %s", filepath.Dir(path)) return nil, errors.Wrapf(err, "api.ListenUnix() failed to create %s", filepath.Dir(path))

View File

@ -95,7 +95,7 @@ func NewConnectionWithIdentity(ctx context.Context, uri string, identity string)
return nil, errors.Wrapf(err, "Value of CONTAINER_HOST is not a valid url: %s", uri) return nil, errors.Wrapf(err, "Value of CONTAINER_HOST is not a valid url: %s", uri)
} }
// Now we setup the http Client to use the connection above // Now we set up the http Client to use the connection above
var connection Connection var connection Connection
switch _url.Scheme { switch _url.Scheme {
case "ssh": case "ssh":

View File

@ -38,7 +38,7 @@ import (
) )
// getContainersAndInputByContext gets containers whether all, latest, or a slice of names/ids // getContainersAndInputByContext gets containers whether all, latest, or a slice of names/ids
// is specified. It also returns a list of the corresponding input name used to lookup each container. // is specified. It also returns a list of the corresponding input name used to look up each container.
func getContainersAndInputByContext(all, latest bool, names []string, runtime *libpod.Runtime) (ctrs []*libpod.Container, rawInput []string, err error) { func getContainersAndInputByContext(all, latest bool, names []string, runtime *libpod.Runtime) (ctrs []*libpod.Container, rawInput []string, err error) {
var ctr *libpod.Container var ctr *libpod.Container
ctrs = []*libpod.Container{} ctrs = []*libpod.Container{}
@ -183,7 +183,7 @@ func (ic *ContainerEngine) ContainerStop(ctx context.Context, namesOrIds []strin
if err != nil { if err != nil {
// Issue #7384 and #11384: If the container is configured for // Issue #7384 and #11384: If the container is configured for
// auto-removal, it might already have been removed at this point. // auto-removal, it might already have been removed at this point.
// We still need to to cleanup since we do not know if the other cleanup process is successful // We still need to clean up since we do not know if the other cleanup process is successful
if c.AutoRemove() && (errors.Is(err, define.ErrNoSuchCtr) || errors.Is(err, define.ErrCtrRemoved)) { if c.AutoRemove() && (errors.Is(err, define.ErrNoSuchCtr) || errors.Is(err, define.ErrCtrRemoved)) {
return nil return nil
} }
@ -488,7 +488,7 @@ func (ic *ContainerEngine) ContainerTop(ctx context.Context, options entities.To
container, err = ic.Libpod.LookupContainer(options.NameOrID) container, err = ic.Libpod.LookupContainer(options.NameOrID)
} }
if err != nil { if err != nil {
return nil, errors.Wrap(err, "unable to lookup requested container") return nil, errors.Wrap(err, "unable to look up requested container")
} }
// Run Top. // Run Top.
@ -635,13 +635,13 @@ func (ic *ContainerEngine) ContainerRestore(ctx context.Context, namesOrIds []st
containers, err = getContainersByContext(false, options.Latest, namesOrIds, ic.Libpod) containers, err = getContainersByContext(false, options.Latest, namesOrIds, ic.Libpod)
default: default:
for _, nameOrID := range namesOrIds { for _, nameOrID := range namesOrIds {
logrus.Debugf("lookup container: %q", nameOrID) logrus.Debugf("look up container: %q", nameOrID)
ctr, err := ic.Libpod.LookupContainer(nameOrID) ctr, err := ic.Libpod.LookupContainer(nameOrID)
if err == nil { if err == nil {
containers = append(containers, ctr) containers = append(containers, ctr)
} else { } else {
// If container was not found, check if this is a checkpoint image // If container was not found, check if this is a checkpoint image
logrus.Debugf("lookup image: %q", nameOrID) logrus.Debugf("look up image: %q", nameOrID)
img, _, err := ic.Libpod.LibimageRuntime().LookupImage(nameOrID, nil) img, _, err := ic.Libpod.LibimageRuntime().LookupImage(nameOrID, nil)
if err != nil { if err != nil {
return nil, fmt.Errorf("no such container or image: %s", nameOrID) return nil, fmt.Errorf("no such container or image: %s", nameOrID)
@ -1194,12 +1194,12 @@ func (ic *ContainerEngine) ContainerCleanup(ctx context.Context, namesOrIds []st
var timeout *uint var timeout *uint
err = ic.Libpod.RemoveContainer(ctx, ctr, false, true, timeout) err = ic.Libpod.RemoveContainer(ctx, ctr, false, true, timeout)
if err != nil { if err != nil {
report.RmErr = errors.Wrapf(err, "failed to cleanup and remove container %v", ctr.ID()) report.RmErr = errors.Wrapf(err, "failed to clean up and remove container %v", ctr.ID())
} }
} else { } else {
err := ctr.Cleanup(ctx) err := ctr.Cleanup(ctx)
if err != nil { if err != nil {
report.CleanErr = errors.Wrapf(err, "failed to cleanup container %v", ctr.ID()) report.CleanErr = errors.Wrapf(err, "failed to clean up container %v", ctr.ID())
} }
} }

View File

@ -393,7 +393,7 @@ func (ic *ContainerEngine) PodTop(ctx context.Context, options entities.PodTopOp
pod, err = ic.Libpod.LookupPod(options.NameOrID) pod, err = ic.Libpod.LookupPod(options.NameOrID)
} }
if err != nil { if err != nil {
return nil, errors.Wrap(err, "unable to lookup requested container") return nil, errors.Wrap(err, "unable to look up requested container")
} }
// Run Top. // Run Top.
@ -494,7 +494,7 @@ func (ic *ContainerEngine) PodInspect(ctx context.Context, options entities.PodI
pod, err = ic.Libpod.LookupPod(options.NameOrID) pod, err = ic.Libpod.LookupPod(options.NameOrID)
} }
if err != nil { if err != nil {
return nil, errors.Wrap(err, "unable to lookup requested container") return nil, errors.Wrap(err, "unable to look up requested container")
} }
inspect, err := pod.Inspect() inspect, err := pod.Inspect()
if err != nil { if err != nil {

View File

@ -404,9 +404,9 @@ func (ic *ContainerEngine) Unshare(ctx context.Context, args []string, options e
} }
// Make sure to unlock, unshare can run for a long time. // Make sure to unlock, unshare can run for a long time.
rootlessNetNS.Lock.Unlock() rootlessNetNS.Lock.Unlock()
// We do not want to cleanup the netns after unshare. // We do not want to clean up the netns after unshare.
// The problem is that we cannot know if we need to cleanup and // The problem is that we cannot know if we need to clean up and
// secondly unshare should allow user to setup the namespace with // secondly unshare should allow user to set up the namespace with
// special things, e.g. potentially macvlan or something like that. // special things, e.g. potentially macvlan or something like that.
return rootlessNetNS.Do(unshare) return rootlessNetNS.Do(unshare)
} }

View File

@ -342,7 +342,7 @@ func ParseIDMapping(mode namespaces.UsernsMode, uidMapSlice, gidMapSlice []strin
options.HostUIDMapping = false options.HostUIDMapping = false
options.HostGIDMapping = false options.HostGIDMapping = false
// Simply ignore the setting and do not setup an inner namespace for root as it is a no-op // Simply ignore the setting and do not set up an inner namespace for root as it is a no-op
return &options, nil return &options, nil
} }
@ -394,7 +394,7 @@ func ParseIDMapping(mode namespaces.UsernsMode, uidMapSlice, gidMapSlice []strin
// StartWatcher starts a new SIGHUP go routine for the current config. // StartWatcher starts a new SIGHUP go routine for the current config.
func StartWatcher(rt *libpod.Runtime) { func StartWatcher(rt *libpod.Runtime) {
// Setup the signal notifier // Set up the signal notifier
ch := make(chan os.Signal, 1) ch := make(chan os.Signal, 1)
signal.Notify(ch, syscall.SIGHUP) signal.Notify(ch, syscall.SIGHUP)

View File

@ -20,7 +20,7 @@ func getContainersByContext(contextWithConnection context.Context, all, ignore b
func getContainersAndInputByContext(contextWithConnection context.Context, all, ignore bool, namesOrIDs []string) ([]entities.ListContainer, []string, error) { func getContainersAndInputByContext(contextWithConnection context.Context, all, ignore bool, namesOrIDs []string) ([]entities.ListContainer, []string, error) {
if all && len(namesOrIDs) > 0 { if all && len(namesOrIDs) > 0 {
return nil, nil, errors.New("cannot lookup containers and all") return nil, nil, errors.New("cannot look up containers and all")
} }
options := new(containers.ListOptions).WithAll(true).WithSync(true) options := new(containers.ListOptions).WithAll(true).WithSync(true)
allContainers, err := containers.List(contextWithConnection, options) allContainers, err := containers.List(contextWithConnection, options)
@ -77,7 +77,7 @@ func getContainersAndInputByContext(contextWithConnection context.Context, all,
func getPodsByContext(contextWithConnection context.Context, all bool, namesOrIDs []string) ([]*entities.ListPodsReport, error) { func getPodsByContext(contextWithConnection context.Context, all bool, namesOrIDs []string) ([]*entities.ListPodsReport, error) {
if all && len(namesOrIDs) > 0 { if all && len(namesOrIDs) > 0 {
return nil, errors.New("cannot lookup specific pods and all") return nil, errors.New("cannot look up specific pods and all")
} }
allPods, err := pods.List(contextWithConnection, nil) allPods, err := pods.List(contextWithConnection, nil)

View File

@ -93,7 +93,7 @@ func NewIgnitionFile(ign DynamicIgnition) error {
tz string tz string
) )
// local means the same as the host // local means the same as the host
// lookup where it is pointing to on the host // look up where it is pointing to on the host
if ign.TimeZone == "local" { if ign.TimeZone == "local" {
tz, err = getLocalTimeZone() tz, err = getLocalTimeZone()
if err != nil { if err != nil {
@ -348,7 +348,7 @@ Delegate=memory pids cpu io
}, },
}) })
// Setup /etc/subuid and /etc/subgid // Set up /etc/subuid and /etc/subgid
for _, sub := range []string{"/etc/subuid", "/etc/subgid"} { for _, sub := range []string{"/etc/subuid", "/etc/subgid"} {
files = append(files, File{ files = append(files, File{
Node: Node{ Node: Node{

View File

@ -209,7 +209,7 @@ func migrateVM(configPath string, config []byte, vm *MachineVM) error {
vm.Rootful = old.Rootful vm.Rootful = old.Rootful
vm.UID = old.UID vm.UID = old.UID
// Backup the original config file // Back up the original config file
if err := os.Rename(configPath, configPath+".orig"); err != nil { if err := os.Rename(configPath, configPath+".orig"); err != nil {
return err return err
} }
@ -580,7 +580,7 @@ func (v *MachineVM) Start(name string, _ machine.StartOptions) error {
if !errors.Is(err, os.ErrNotExist) { if !errors.Is(err, os.ErrNotExist) {
return err return err
} }
// lookup qemu again maybe the path was changed, https://github.com/containers/podman/issues/13394 // look up qemu again maybe the path was changed, https://github.com/containers/podman/issues/13394
cfg, err := config.Default() cfg, err := config.Default()
if err != nil { if err != nil {
return err return err
@ -1142,7 +1142,7 @@ func (p *Provider) CheckExclusiveActiveVM() (bool, string, error) {
} }
// startHostNetworking runs a binary on the host system that allows users // startHostNetworking runs a binary on the host system that allows users
// to setup port forwarding to the podman virtual machine // to set up port forwarding to the podman virtual machine
func (v *MachineVM) startHostNetworking() (string, apiForwardingState, error) { func (v *MachineVM) startHostNetworking() (string, apiForwardingState, error) {
cfg, err := config.Default() cfg, err := config.Default()
if err != nil { if err != nil {

View File

@ -112,7 +112,7 @@ func (n UsernsMode) IsDefaultValue() bool {
return n == "" || n == defaultType return n == "" || n == defaultType
} }
// GetAutoOptions returns a AutoUserNsOptions with the settings to setup automatically // GetAutoOptions returns a AutoUserNsOptions with the settings to automatically set up
// a user namespace. // a user namespace.
func (n UsernsMode) GetAutoOptions() (*types.AutoUserNsOptions, error) { func (n UsernsMode) GetAutoOptions() (*types.AutoUserNsOptions, error) {
parts := strings.SplitN(string(n), ":", 2) parts := strings.SplitN(string(n), ":", 2)

View File

@ -154,7 +154,7 @@ func tryMappingTool(uid bool, pid int, hostID int, mappings []idtools.IDMap) err
if output, err := cmd.CombinedOutput(); err != nil { if output, err := cmd.CombinedOutput(); err != nil {
logrus.Errorf("running `%s`: %s", strings.Join(args, " "), output) logrus.Errorf("running `%s`: %s", strings.Join(args, " "), output)
errorStr := fmt.Sprintf("cannot setup namespace using %q", path) errorStr := fmt.Sprintf("cannot set up namespace using %q", path)
if isSet, err := unshare.IsSetID(cmd.Path, mode, cap); err != nil { if isSet, err := unshare.IsSetID(cmd.Path, mode, cap); err != nil {
logrus.Errorf("Failed to check for %s on %s: %v", idtype, path, err) logrus.Errorf("Failed to check for %s on %s: %v", idtype, path, err)
} else if !isSet { } else if !isSet {
@ -303,7 +303,7 @@ func becomeRootInUserNS(pausePid, fileToRead string, fileOutput *os.File) (_ boo
if retErr != nil && pid > 0 { if retErr != nil && pid > 0 {
if err := unix.Kill(pid, unix.SIGKILL); err != nil { if err := unix.Kill(pid, unix.SIGKILL); err != nil {
if err != unix.ESRCH { if err != unix.ESRCH {
logrus.Errorf("Failed to cleanup process %d: %v", pid, err) logrus.Errorf("Failed to clean up process %d: %v", pid, err)
} }
} }
C.reexec_in_user_namespace_wait(C.int(pid), 0) C.reexec_in_user_namespace_wait(C.int(pid), 0)

View File

@ -204,7 +204,7 @@ func generateContainerInfo(ctr *libpod.Container, options entities.GenerateSyste
} else { } else {
runRoot = ctr.Runtime().RunRoot() runRoot = ctr.Runtime().RunRoot()
if runRoot == "" { if runRoot == "" {
return nil, errors.Errorf("could not lookup container's runroot: got empty string") return nil, errors.Errorf("could not look up container's runroot: got empty string")
} }
} }

View File

@ -8,7 +8,7 @@ Contributors are more than welcomed to help with this work. If you decide to ca
* The kernel does not allow processes without CAP_NET_BIND_SERVICE to bind to low ports. * The kernel does not allow processes without CAP_NET_BIND_SERVICE to bind to low ports.
* You can modify the `net.ipv4.ip_unprivileged_port_start` sysctl to change the lowest port. For example `sysctl net.ipv4.ip_unprivileged_port_start=443` allows rootless Podman containers to bind to ports >= 443. * You can modify the `net.ipv4.ip_unprivileged_port_start` sysctl to change the lowest port. For example `sysctl net.ipv4.ip_unprivileged_port_start=443` allows rootless Podman containers to bind to ports >= 443.
* “How To” documentation is patchy at best. * “How To” documentation is patchy at best.
* If /etc/subuid and /etc/subgid are not setup for a user, then podman commands * If /etc/subuid and /etc/subgid are not set up for a user, then podman commands
can easily fail can easily fail
* This can be a big issue on machines using Network Based Password information (FreeIPA, Active Directory, LDAP) * This can be a big issue on machines using Network Based Password information (FreeIPA, Active Directory, LDAP)
* We are working to get support for NSSWITCH on the /etc/subuid and /etc/subgid files. * We are working to get support for NSSWITCH on the /etc/subuid and /etc/subgid files.
@ -24,7 +24,7 @@ can easily fail
* NFS and parallel filesystems enforce file creation on different UIDs on the server side and does not understand User Namespace. * NFS and parallel filesystems enforce file creation on different UIDs on the server side and does not understand User Namespace.
* When a container root process like YUM attempts to create a file owned by a different UID, NFS Server/GPFS denies the creation. * When a container root process like YUM attempts to create a file owned by a different UID, NFS Server/GPFS denies the creation.
* Does not work with homedirs mounted with noexec/nodev * Does not work with homedirs mounted with noexec/nodev
* User can setup storage to point to other directories they can write to that are not mounted noexec/nodev * User can set up storage to point to other directories they can write to that are not mounted noexec/nodev
* Support for using native overlayfs as an unprivileged user is only available for Podman version >= 3.1 on a Linux kernel version >= 5.12, otherwise the slower _fuse-overlayfs_ may be used. * Support for using native overlayfs as an unprivileged user is only available for Podman version >= 3.1 on a Linux kernel version >= 5.12, otherwise the slower _fuse-overlayfs_ may be used.
* A few Linux distributions (e.g. Ubuntu) have supported even older Podman and Linux kernel versions by modifying the normal Linux kernel behaviour. * A few Linux distributions (e.g. Ubuntu) have supported even older Podman and Linux kernel versions by modifying the normal Linux kernel behaviour.
* Only other supported driver is VFS. * Only other supported driver is VFS.

View File

@ -322,7 +322,7 @@ func PodmanTestCreateUtil(tempDir string, remote bool) *PodmanTestIntegration {
} }
} }
// Setup registries.conf ENV variable // Set up registries.conf ENV variable
p.setDefaultRegistriesConfigEnv() p.setDefaultRegistriesConfigEnv()
// Rewrite the PodmanAsUser function // Rewrite the PodmanAsUser function
p.PodmanMakeOptions = p.makeOptions p.PodmanMakeOptions = p.makeOptions

View File

@ -25,7 +25,7 @@ var _ = Describe("Podman create with --ip flag", func() {
} }
podmanTest = PodmanTestCreate(tempdir) podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup() podmanTest.Setup()
// Cleanup the CNI networks used by the tests // Clean up the CNI networks used by the tests
os.RemoveAll("/var/lib/cni/networks/podman") os.RemoveAll("/var/lib/cni/networks/podman")
}) })

View File

@ -25,7 +25,7 @@ var _ = Describe("Podman run with --mac-address flag", func() {
} }
podmanTest = PodmanTestCreate(tempdir) podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup() podmanTest.Setup()
// Cleanup the CNI networks used by the tests // Clean up the CNI networks used by the tests
os.RemoveAll("/var/lib/cni/networks/podman") os.RemoveAll("/var/lib/cni/networks/podman")
}) })

View File

@ -28,7 +28,7 @@ var _ = Describe("Podman run with --ip flag", func() {
} }
podmanTest = PodmanTestCreate(tempdir) podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup() podmanTest.Setup()
// Cleanup the CNI networks used by the tests // Clean up the CNI networks used by the tests
os.RemoveAll("/var/lib/cni/networks/podman") os.RemoveAll("/var/lib/cni/networks/podman")
}) })

View File

@ -247,7 +247,7 @@ var _ = Describe("podman system connection", func() {
// podman-remote commands will be executed by ginkgo directly. // podman-remote commands will be executed by ginkgo directly.
SkipIfContainerized("sshd is not available when running in a container") SkipIfContainerized("sshd is not available when running in a container")
SkipIfRemote("connection heuristic requires both podman and podman-remote binaries") SkipIfRemote("connection heuristic requires both podman and podman-remote binaries")
SkipIfNotRootless(fmt.Sprintf("FIXME: setup ssh keys when root. uid(%d) euid(%d)", os.Getuid(), os.Geteuid())) SkipIfNotRootless(fmt.Sprintf("FIXME: set up ssh keys when root. uid(%d) euid(%d)", os.Getuid(), os.Geteuid()))
SkipIfSystemdNotRunning("cannot test connection heuristic if systemd is not running") SkipIfSystemdNotRunning("cannot test connection heuristic if systemd is not running")
SkipIfNotActive("sshd", "cannot test connection heuristic if sshd is not running") SkipIfNotActive("sshd", "cannot test connection heuristic if sshd is not running")
}) })

View File

@ -37,7 +37,7 @@ func NilFunc(f *TestFramework) error {
func (t *TestFramework) Setup() { func (t *TestFramework) Setup() {
// Global initialization for the whole framework goes in here // Global initialization for the whole framework goes in here
// Setup the actual test suite // Set up the actual test suite
gomega.Expect(t.setup(t)).To(gomega.Succeed()) gomega.Expect(t.setup(t)).To(gomega.Succeed())
} }

View File

@ -359,7 +359,7 @@ load helpers
run curl -s $SERVER/index.txt run curl -s $SERVER/index.txt
is "$output" "$random_1" "curl 127.0.0.1:/index.txt" is "$output" "$random_1" "curl 127.0.0.1:/index.txt"
# cleanup the container # clean up the container
run_podman rm -t 0 -f $cid run_podman rm -t 0 -f $cid
# test that we cannot remove the default network # test that we cannot remove the default network
@ -549,7 +549,7 @@ load helpers
run curl --max-time 3 -s $SERVER/index.txt run curl --max-time 3 -s $SERVER/index.txt
is "$output" "$random_1" "curl 127.0.0.1:/index.txt should still work" is "$output" "$random_1" "curl 127.0.0.1:/index.txt should still work"
# cleanup # clean up
run_podman rm -t 0 -f $cid $background_cid run_podman rm -t 0 -f $cid $background_cid
run_podman network rm -t 0 -f $netname $netname2 run_podman network rm -t 0 -f $netname $netname2
} }
@ -622,7 +622,7 @@ load helpers
run_podman rm -t 0 -f $cid run_podman rm -t 0 -f $cid
done done
# Cleanup network # Clean up network
run_podman network rm -t 0 -f $netname run_podman network rm -t 0 -f $netname
} }

View File

@ -321,7 +321,7 @@ under `/var/lib/containers/storage`.
# restorecon -R -v /srv/containers # restorecon -R -v /srv/containers
``` ```
The semanage command above tells SELinux to setup the default labeling of The semanage command above tells SELinux to set up the default labeling of
`/srv/containers` to match `/var/lib/containers`. The `restorecon` command `/srv/containers` to match `/var/lib/containers`. The `restorecon` command
tells SELinux to apply the labels to the actual content. tells SELinux to apply the labels to the actual content.
@ -387,7 +387,7 @@ error creating build container: Error committing the finished image: error addin
#### Solution #### Solution
Choose one of the following: Choose one of the following:
* Setup containers/storage in a different directory, not on an NFS share. * Set up containers/storage in a different directory, not on an NFS share.
* Create a directory on a local file system. * Create a directory on a local file system.
* Edit `~/.config/containers/containers.conf` and point the `volume_path` option to that local directory. (Copy `/usr/share/containers/containers.conf` if `~/.config/containers/containers.conf` does not exist) * Edit `~/.config/containers/containers.conf` and point the `volume_path` option to that local directory. (Copy `/usr/share/containers/containers.conf` if `~/.config/containers/containers.conf` does not exist)
* Otherwise just run Podman as root, via `sudo podman` * Otherwise just run Podman as root, via `sudo podman`