summaryrefslogtreecommitdiff
path: root/pkg/domain/infra/tunnel/containers.go
Commit message (Collapse)AuthorAge
* Fix Id->ID where possible for lintDaniel J Walsh2020-06-10
| | | | Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* Fixup issues found by golintDaniel J Walsh2020-06-10
| | | | Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* Add parallel operation to `podman stop`Matthew Heon2020-06-05
| | | | | | | | | | | | This is the other command that benefits greatly from being run in parallel, due to the potential 15-second timeout for containers that ignore SIGTERM. While we're at it, also clean up how stop timeout is set. This needs to be an optional parameter, so that the value set when the container is created with `--stop-timeout` will be respected. Signed-off-by: Matthew Heon <matthew.heon@pm.me>
* Merge pull request #6485 from QiWang19/remote-ignoreOpenShift Merge Robot2020-06-04
|\ | | | | fix remote test --ignore & turn on more tests
| * fix remote test --ignore & turn on more testsQi Wang2020-06-03
| | | | | | | | | | | | fix remote test --ignore & turn on more tests Signed-off-by: Qi Wang <qiwan@redhat.com>
* | turn on remote stop_testQi Wang2020-06-03
|/ | | | | | turn on stop_test --cidfile Signed-off-by: Qi Wang <qiwan@redhat.com>
* Turn on remote rm_test --cidfileQi Wang2020-06-02
| | | | | | Turn on remote rm_test --cidfile Signed-off-by: Qi Wang <qiwan@redhat.com>
* Enable detached exec for remoteMatthew Heon2020-06-02
| | | | | | | | | | | | | | | | | | | | | | | The biggest obstacle here was cleanup - we needed a way to remove detached exec sessions after they exited, but there's no way to tell if an exec session will be attached or detached when it's created, and that's when we must add the exit command that would do the removal. The solution was adding a delay to the exit command (5 minutes), which gives sufficient time for attached exec sessions to retrieve the exit code of the session after it exits, but still guarantees that they will be removed, even for detached sessions. This requires Conmon 2.0.17, which has the new `--exit-delay` flag. As part of the exit command rework, we can drop the hack we were using to clean up exec sessions (remove them as part of inspect). This is a lot cleaner, and I'm a lot happier about it. Otherwise, this is just plumbing - we need a bindings call for detached exec, and that needed to be added to the tunnel mode backend for entities. Signed-off-by: Matthew Heon <matthew.heon@pm.me>
* Add bindings for exec and enable attached remoteMatthew Heon2020-06-01
| | | | | | | | | | | This adds bindings for starting exec sessions, and then uses them to wire up detached exec. Code is heavily based on Attach code for containers, slightly modified to handle exec sessions. Bindings are presently attached-only, detached is pending on a Conmon update landing in CI. I'll probably get to that next. Signed-off-by: Matthew Heon <matthew.heon@pm.me>
* V2 enable remote logs and testingJhon Honce2020-05-22
| | | | | | | | | | * wire up bindings and handler for obtaining logs remotely * enable debug logging from podman in e2e test using DEBUG and DEBUG_SERVICE env variables * Fix error in streaming log frames * enable remote logs test Signed-off-by: Jhon Honce <jhonce@redhat.com>
* Merge pull request #6330 from rhatdan/startOpenShift Merge Robot2020-05-22
|\ | | | | Fix podman-remote start tests
| * Fix podman-remote start testsDaniel J Walsh2020-05-21
| | | | | | | | | | | | Also enable some tests for remote by removing -l flag. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | Fix podman-remote stop --all to handle not running containersDaniel J Walsh2020-05-21
|/ | | | Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* Get proper exit code when running or starting a container.Daniel J Walsh2020-05-21
| | | | | | | When we finish running a container, we need to call wait in order to get the exit code from the container. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* Merge pull request #6270 from mheon/detached_execOpenShift Merge Robot2020-05-21
|\ | | | | Implement detached exec
| * Add CLI frontend for detached execMatthew Heon2020-05-20
| | | | | | | | | | | | | | | | | | | | | | Add a new ContainerEngine method for creating a detached exec session, and wire in the frontend code to do this. As part of this, move Streams out of ExecOptions to the function signature in an effort to share the struct between both methods. Fixes #5884 Signed-off-by: Matthew Heon <matthew.heon@pm.me>
* | Merge pull request #6307 from baude/v2remoteinitOpenShift Merge Robot2020-05-21
|\ \ | | | | | | enable remote integration tests for init
| * | enable remote integration tests for initBrent Baude2020-05-20
| |/ | | | | | | Signed-off-by: Brent Baude <bbaude@redhat.com>
* / govern remote attach and startBrent Baude2020-05-20
|/ | | | | | fixes a race where container would start before attach could occur resulting in an error. Signed-off-by: Brent Baude <bbaude@redhat.com>
* v2 podman remote attach, start, and runBrent Baude2020-05-15
| | | | | | for the remote client, add the ability to attach to a container, start a container, and run a container. Signed-off-by: Brent Baude <bbaude@redhat.com>
* Fix checkpoint --leave-runningAdrian Reber2020-05-14
| | | | | | | There was typo in the variable name and in one place it was not correctly passed to the next layer. Signed-off-by: Adrian Reber <areber@redhat.com>
* add port to podman remote commandBrent Baude2020-05-11
| | | | Signed-off-by: Brent Baude <bbaude@redhat.com>
* container runlabelValentin Rothberg2020-05-07
| | | | | | Implement container runlabel for v2. Local client only. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* v2 podman statsbaude2020-05-05
| | | | Signed-off-by: baude <bbaude@redhat.com>
* enable integration tests for restartBrent Baude2020-04-27
| | | | | | enable integrations tests for container restart. fixed bug where --running was not being honored. Signed-off-by: Brent Baude <bbaude@redhat.com>
* V2 restore libpod.Shutdown() when exiting podman commandsJhon Honce2020-04-22
| | | | Signed-off-by: Jhon Honce <jhonce@redhat.com>
* podmanv2 cpBrent Baude2020-04-21
| | | | | | enable podman to copy files between container and host, local mode only. this is a straight port of v1 code to v2. Signed-off-by: Brent Baude <bbaude@redhat.com>
* v2podman portBrent Baude2020-04-21
| | | | | | add port command to podman. Signed-off-by: Brent Baude <bbaude@redhat.com>
* Ability to prune container in api V2Sujil022020-04-15
| | | | | | | Adds ability to prune containers for v2. Adds client side prompt with force flag and filters options to prune. Signed-off-by: Sujil02 <sushah@redhat.com>
* Add support for the global flags and config filesJhon Honce2020-04-14
| | | | | | | Note: This PR doesn't provide full rootless support that will be addressed in a future PR Signed-off-by: Jhon Honce <jhonce@redhat.com>
* Merge pull request #5808 from baude/v2psformat2OpenShift Merge Robot2020-04-14
|\ | | | | v2podman ps revert structure changes
| * v2podman ps revert structure changesBrent Baude2020-04-14
| | | | | | | | | | | | reverting name changes to the listcontainer structure because it negatively impacted the direct consumption of the restful API. instead we now use a local structure in the CLI to modify the output as needed. Signed-off-by: Brent Baude <bbaude@redhat.com>
* | podmanv2 mount and umountBrent Baude2020-04-14
|/ | | | | | add the ability to mount and unmount containers for the local client only Signed-off-by: Brent Baude <bbaude@redhat.com>
* v2podman add container initBrent Baude2020-04-13
| | | | | | add the ability to init a container both local and remote Signed-off-by: Brent Baude <bbaude@redhat.com>
* v2podman container cleanupBrent Baude2020-04-09
| | | | | | | | add the ability to clean up after a container has attempted to run. this is also important for podman run --rm --rmi. also included are fixes and tweaks to various code bits to correct regressions on output. Signed-off-by: Brent Baude <bbaude@redhat.com>
* Merge pull request #5754 from baude/v2psformatOpenShift Merge Robot2020-04-09
|\ | | | | v2podman ps alter formats
| * v2podman ps alter formatsBrent Baude2020-04-08
| | | | | | | | | | | | in order to get the go templating to work for custom input, we now use structure methods instead of template map funcs. this requires some manipulation of fields so that the funcs can have the proper names. Signed-off-by: Brent Baude <bbaude@redhat.com>
* | podmanV2: implement logsValentin Rothberg2020-04-09
|/ | | | | | | | | | | Implement the `podman {container} logs` for the v2 client. The remote client does not yet support it. There's some more work needed for the rest api; some options are missing (e.g., printing names) while others are broken (e.g., the until http parameter). The remote parts will be tackled in a future change. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* V2 podman diff(changes) supportJhon Honce2020-04-07
| | | | | | | | | * Ported CLI command * Added API endpoint * Added bindings * Updated swagger (TODO: n endpoints, one handler) Signed-off-by: Jhon Honce <jhonce@redhat.com>
* v2podman runBrent Baude2020-04-06
| | | | | | add the ability to run a container Signed-off-by: Brent Baude <bbaude@redhat.com>
* podmanv2 psBrent Baude2020-04-06
| | | | | | add the ability to list containers Signed-off-by: Brent Baude <bbaude@redhat.com>
* podmanv2 startBrent Baude2020-04-06
| | | | | | add the ability to start containers Signed-off-by: Brent Baude <bbaude@redhat.com>
* v2podman attach and execBrent Baude2020-04-05
| | | | | | | | add the ability to attach to a running container. the tunnel side of this is not enabled yet as we have work on the endpoints and plumbing to do yet. add the ability to exec a command in a running container. the tunnel side is also being deferred for same reason. Signed-off-by: Brent Baude <bbaude@redhat.com>
* v2podman container createBrent Baude2020-04-03
| | | | | | create a container in podmanv2 using specgen approach. this is the core implementation and still has quite a bit of code commented out specifically around volumes, devices, and namespaces. need contributions from smes on these parts. Signed-off-by: Brent Baude <bbaude@redhat.com>
* podmanv2 checkpoint and restoreBrent Baude2020-04-03
| | | | | | add the ability to checkpoint and restore containers on v2podman Signed-off-by: Brent Baude <bbaude@redhat.com>
* podmanv2 exportBrent Baude2020-04-01
| | | | | | add ability to export a container to a tarball Signed-off-by: Brent Baude <bbaude@redhat.com>
* V2 podman inspectJhon Honce2020-04-01
| | | | | | | * Expose podman container inspect * Expose podman image inspect Signed-off-by: Jhon Honce <jhonce@redhat.com>
* podmanv2 commitBrent Baude2020-03-28
| | | | | | add commit of a container to a container-image Signed-off-by: Brent Baude <bbaude@redhat.com>
* podmanV2: implement topValentin Rothberg2020-03-27
| | | | | | Implement the `top` command for podmanV2. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* podmanv2 container inspectBrent Baude2020-03-26
| | | | | | add ability to inspect a container Signed-off-by: Brent Baude <bbaude@redhat.com>