summaryrefslogtreecommitdiff
path: root/cmd
Commit message (Collapse)AuthorAge
* [CI:DOCS]Remove unnecesarry filesBrent Baude2022-04-26
| | | | | | | | | Removing two files that are not needed. One is likely an accidental check-in and the other is a empty file. [NO NEW TESTS NEEDED] Signed-off-by: Brent Baude <bbaude@redhat.com>
* Merge pull request #13996 from cdoern/machineOpenShift Merge Robot2022-04-26
|\ | | | | machine starting status
| * machine starting statuscdoern2022-04-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | podman machine was using the file modification time to get the running status add three new config entries Starting (bool) Created (time) LastUp (time) to actually keep track of when these events happened. This means we can use the config file to actually store this data and not mess up the created/last-up time. This fixes the issues where the machine would report running 15 seconds before it was up. Also fixes the issue of modifying the file manually and saying the machine is "up" [NO NEW TESTS NEEDED] resolves #13711 Signed-off-by: cdoern <cbdoer23@g.holycross.edu>
* | Merge pull request #13908 from n1hility/win-mountsOpenShift Merge Robot2022-04-26
|\ \ | | | | | | Implement Windows volume/mount support
| * | Implements Windows volume/mount supportJason T. Greene2022-04-25
| | | | | | | | | | | | | | | | | | | | | Based on WSL2 9p support: remaps windows paths to /mnt/<drive> locations for both podman and Docker API clients. Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
* | | Add podman machine test suiteBrent Baude2022-04-25
|/ / | | | | | | | | | | | | | | | | | | | | | | | | This PR introduces a test suite for podman machine. It can currently be run on developers' local machines and is not part of the official CI testing; however, the expectation is that any work on machine should come with an accompanying test. At present, the test must be run on Linux. It is untested on Darwin. There is no Makefile target for the test. It can be run like `ginkgo -v pkg/machine/test/.`. It should be run as a unprivileged user. Signed-off-by: Brent Baude <bbaude@redhat.com>
* | Merge pull request #13999 from Luap99/go1.18-deprecatedOpenShift Merge Robot2022-04-25
|\ \ | | | | | | [CI:DOCS] fix staticcheck linter warning for deprecated function
| * | fix staticcheck linter warning for deprecated functionPaul Holzinger2022-04-25
| | | | | | | | | | | | | | | | | | | | | | | | go1.18 deprecates `strings.Title()`. However for our use case this is still fine. The recommended replacement is adding about 400kb binary size so lets keep using this for now. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* | | Merge pull request #13978 from Luap99/unparamOpenShift Merge Robot2022-04-25
|\ \ \ | | | | | | | | enable unparam linter
| * | | enable unparam linterPaul Holzinger2022-04-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The unparam linter is useful to detect unused function parameters and return values. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* | | | Merge pull request #13995 from ashley-cui/revrootfulOpenShift Merge Robot2022-04-25
|\ \ \ \ | |_|/ / |/| | | Rootfull -> Rootful
| * | | Revert "Switch all rootful to rootfull"Ashley Cui2022-04-25
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit cc3790f332d989440eb1720e24e3619fc97c74ee. We can't change rootful to rootfull because `rootful` is written into the machine config. Changing this will break json unmarshalling, which will break existing machines. [NO NEW TESTS NEEDED] Signed-off-by: Ashley Cui <acui@redhat.com>
* / | Add support for passing --volumepathDaniel J Walsh2022-04-23
|/ / | | | | | | | | | | Fixes: https://github.com/containers/podman/issues/13860 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | Merge pull request #13973 from Luap99/linter-reviveOpenShift Merge Robot2022-04-23
|\ \ | |/ |/| replace golint with revive linter
| * replace golint with revive linterPaul Holzinger2022-04-22
| | | | | | | | | | | | | | | | | | | | | | | | golint, scopelint and interfacer are deprecated. golint is replaced by revive. This linter is better because it will also check for our error style: `error strings should not be capitalized or end with punctuation or a newline` scopelint is replaced by exportloopref (already endabled) interfacer has no replacement but I do not think this linter is important. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* | Merge pull request #13881 from rhatdan/usernsOpenShift Merge Robot2022-04-22
|\ \ | |/ |/| Add support for --userns=nomap
| * Add support for --userns=nomapDaniel J Walsh2022-04-21
| | | | | | | | | | | | | | | | | | | | | | From a security point of view, it would be nice to be able to map a rootless usernamespace that does not use your own UID within the container. This would add protection against a hostile process escapping the container and reading content in your homedir. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | Merge pull request #13972 from Luap99/staticcheckOpenShift Merge Robot2022-04-22
|\ \ | | | | | | enable staticcheck linter
| * | enable staticcheck linterPaul Holzinger2022-04-22
| | | | | | | | | | | | | | | | | | | | | Fix many problems reported by the staticcheck linter, including many real bugs! Signed-off-by: Paul Holzinger <pholzing@redhat.com>
| * | move golang.org/x/crypto/ssh/terminal to golang.org/x/termPaul Holzinger2022-04-22
| |/ | | | | | | | | | | | | | | golang.org/x/crypto/ssh/terminal is deprecated. The package was moved to golang.org/x/term. golang.org/x/crypto/ssh/terminal was already just calling golang.org/x/term itslef so there are no functional changes. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* | Merge pull request #13964 from rhatdan/rootfullOpenShift Merge Robot2022-04-22
|\ \ | | | | | | Switch all rootful to rootfull
| * | Switch all rootful to rootfullDaniel J Walsh2022-04-21
| |/ | | | | | | | | | | | | | | | | We are inconsistent on the name, we should stick with rootfull. [NO NEW TESTS NEEDED] Existing tests should handle this and no tests for machines exists yet. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | Merge pull request #13943 from cdoern/cloneOpenShift Merge Robot2022-04-22
|\ \ | |/ |/| podman container clone -f
| * podman container clone -fcdoern2022-04-21
| | | | | | | | | | | | | | | | add the option -f to force remove the parent container if --destory is specified resolves #13917 Signed-off-by: cdoern <cbdoer23@g.holycross.edu>
* | Merge pull request #13505 from rst0git/checkpoint-image-1OpenShift Merge Robot2022-04-21
|\ \ | | | | | | Add support for checkpoint image
| * | Add support for checkpoint imageRadostin Stoyanov2022-04-20
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is an enhancement proposal for the checkpoint / restore feature of Podman that enables container migration across multiple systems with standard image distribution infrastructure. A new option `--create-image <image>` has been added to the `podman container checkpoint` command. This option tells Podman to create a container image. This is a standard image with a single layer, tar archive, that that contains all checkpoint files. This is similar to the current approach with checkpoint `--export`/`--import`. This image can be pushed to a container registry and pulled on a different system. It can also be exported locally with `podman image save` and inspected with `podman inspect`. Inspecting the image would display additional information about the host and the versions of Podman, criu, crun/runc, kernel, etc. `podman container restore` has also been extended to support image name or ID as input. Suggested-by: Adrian Reber <areber@redhat.com> Signed-off-by: Radostin Stoyanov <radostin@redhat.com>
* / system service: remove unnecessary pointer to listnerPaul Holzinger2022-04-21
|/ | | | | | | Since the listener is already an interface there is no reason to use a extra pointer for it. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* Add missing events to podman-events man pageDaniel J Walsh2022-04-19
| | | | | | [NO NEW TESTS NEEDED] Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* Add --quiet to machine lsBrent Baude2022-04-16
| | | | | | | | | | | | | The podman machine ls command would benefit from a --quiet flag which would only print the machine names without the extra information. It also implies --noheader as well. This can be helpful for scripting with the podman cli. Signed-off-by: Brent Baude <bbaude@redhat.com> [NO NEW TESTS NEEDED] Signed-off-by: Brent Baude <bbaude@redhat.com>
* Merge pull request #13849 from baude/defaultvolumessOpenShift Merge Robot2022-04-15
|\ | | | | Mount $HOME:$HOME by default in podman machine init
| * Add container.conf default volume to initBrent Baude2022-04-14
| | | | | | | | | | | | | | | | | | | | | | containers.conf now has a default volumes field for podman machine. this pr inserts those values as the default volumes in init. Signed-off-by: Brent Baude <bbaude@redhat.com> [NO NEW TESTS NEEDED] Signed-off-by: Brent Baude <bbaude@redhat.com>
* | Merge pull request #13868 from cdoern/cloneSwapOpenShift Merge Robot2022-04-15
|\ \ | | | | | | Fix Memory Swappiness passing in Container Clone
| * | Fix Memory Swappiness passing in Container Clonecdoern2022-04-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | `DefineCreateFlags` was excluding clone from using the memory-swappiness flag leading the value to be zero when our deafult is -1. Rearrange the if/else to give clone these memory related options resolves #13856 Signed-off-by: cdoern <cdoern@redhat.com>
* | | Merge pull request #13616 from giuseppe/passwd-entryOpenShift Merge Robot2022-04-14
|\ \ \ | |_|/ |/| | run, create: add --passwd-entry
| * | run, create: add --passwd-entryGiuseppe Scrivano2022-04-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | It allows to customize the entry that is written to the `/etc/passwd` file when --passwd is used. Closes: https://github.com/containers/podman/issues/13185 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* | | Merge pull request #13872 from vrothberg/revert-sizeOpenShift Merge Robot2022-04-14
|\ \ \ | |/ / |/| | Revert "images --size"
| * | Revert "images --size"Valentin Rothberg2022-04-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit e133a06d2f4a3e94bfbd60b647046f2f515c9c24. @nalind found a proper fix in c/storage [1] to address the performance issue. So we really don't need the flag anymore. Note the flag has never made it into any release. [1] https://github.com/containers/storage/commit/d76b3606fc9ca975bf436379f91105f0fac1555f Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
* | | Merge pull request #13844 from Luap99/compat-netmodeOpenShift Merge Robot2022-04-13
|\ \ \ | | | | | | | | compat api: use network mode bridge as default
| * | | compat api: use network mode bridge as defaultPaul Holzinger2022-04-13
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For better docker compatibility we should use the bridge network mode as default for rootless. This was already done previously but commit 535818414c2a introduced this regression in v4.0. Since the apiv2 test are only run rootful we cannot catch this problem in CI. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* | | Merge pull request #13829 from baude/machineinspectOpenShift Merge Robot2022-04-13
|\ \ \ | |/ / |/| | Introduce machine inspect
| * | Introduce machine inspectBrent Baude2022-04-12
| |/ | | | | | | | | | | | | | | | | | | | | | | Allow users to inspect their podman virtual machines. This will be helpful for debug and development alike, because more details about the machine can be collected. Signed-off-by: Brent Baude <bbaude@redhat.com> [NO NEW TESTS NEEDED] Signed-off-by: Brent Baude <bbaude@redhat.com>
* | Merge pull request #13787 from Luap99/nohost-apiOpenShift Merge Robot2022-04-12
|\ \ | |/ |/| API: use no_hosts from containers.conf
| * API: use no_hosts from containers.confPaul Holzinger2022-04-11
| | | | | | | | | | | | | | | | | | The API endpoints should properly honour the `no_hosts=true` setting in containers.conf. Fixes #13719 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* | network create: add support for ipam-driver nonePaul Holzinger2022-04-11
|/ | | | | | | | | Add a new flag to set the ipam-driver. Also adds a new ipam driver none mode which only creates interfaces but does not assign addresses. Fixes #13521 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* images --sizeValentin Rothberg2022-04-08
| | | | | | | | | | Add a --size option to podman images to allow for disabling computing the size of listed images. If listing images is critical to performance, user may chose to turn off size computation to speed things up. Context: #13755 Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
* Merge pull request #13490 from gcalin/13266OpenShift Merge Robot2022-04-04
|\ | | | | pod logs enhancements: option to color logs
| * Add option for pod logs to display different colors per container.gcalin2022-03-29
| | | | | | | | | | Signed-off-by: Krzysztof Baran <krysbaran@gmail.com> Signed-off-by: gcalin <caling@protonmail.com>
* | specgen: do not set OOMScoreAdj by defaultGiuseppe Scrivano2022-04-04
| | | | | | | | | | | | | | | | | | do not force a value of OOMScoreAdj=0 if it is wasn't specified by the user. Closes: https://github.com/containers/podman/issues/13731 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* | cli commands: better error for unsupported commandsPaul Holzinger2022-03-31
|/ | | | | | | | | | | | | | | | When you run podman-remote unsahre for example you currently get: Error: unrecognized command `podman-remote unshare` This is because we do not add the command to the cobra tree when we run in remote mode. However this is a bad user experience since it is not clear that the command is only supported for local podman. Users are left wondering why this does not work and could think the documentation is wrong. To fix it we add a clear error message: Error: cannot use command "podman-remote unshare" with the remote podman client Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* Machine refactor - part 1Brent Baude2022-03-28
| | | | | | | | | | | | | | | | the way machine was written was very adjunct and as such is in dire need of refactoring to better structures and structure methods where appropriate. the weekest part is specifically around all the files that machine requires and how some are just dynamically built on the fly. this pr defines a new machinefile type which allows us to work with the file and also takes into account the use of symlinks which are going to be needed on macos due to its relatively short file length restriction. also, added unit tests for new methods as well as anywhere else I saw a need. Signed-off-by: Brent Baude <bbaude@redhat.com>