7113 Commits

Author SHA1 Message Date
a858b3a6a3 Merge pull request #5705 from rhatdan/reset
Cleanup whether to enter user namespace
2020-04-06 20:48:05 +02:00
e318b09b68 Merge pull request #5620 from cfelder/play-kube-networking
Add support for specifying CNI networks in podman play kube
2020-04-06 18:45:25 +02:00
09f553cc80 Merge pull request #5731 from baude/v2start
podmanv2 start
2020-04-06 18:03:34 +02:00
4b69cf0950 Merge pull request #5725 from containers/dependabot/go_modules/github.com/opencontainers/selinux-1.5.0
build(deps): bump github.com/opencontainers/selinux from 1.4.0 to 1.5.0
2020-04-06 16:47:06 +02:00
5e0b449736 podmanv2 start
add the ability to start containers

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-04-06 09:26:11 -05:00
5b853bb272 Merge pull request #5727 from containers/dependabot/go_modules/github.com/containers/common-0.8.1
build(deps): bump github.com/containers/common from 0.8.0 to 0.8.1
2020-04-06 16:06:25 +02:00
ba64186750 Merge pull request #5689 from sujil02/v2-pod-inspect
podmanv2 pod inspect
2020-04-06 15:23:19 +02:00
8dea3c3419 Merge pull request #5714 from baude/v2attach
v2podman attach
2020-04-06 14:52:25 +02:00
0b1b1710d3 Merge pull request #5713 from baude/v2version
podmanv2 version
2020-04-06 14:49:56 +02:00
6f733ecdbc build(deps): bump github.com/containers/common from 0.8.0 to 0.8.1
Bumps [github.com/containers/common](https://github.com/containers/common) from 0.8.0 to 0.8.1.
- [Release notes](https://github.com/containers/common/releases)
- [Commits](https://github.com/containers/common/compare/v0.8.0...v0.8.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-04-06 14:24:13 +02:00
12600afce9 build(deps): bump github.com/opencontainers/selinux from 1.4.0 to 1.5.0
Bumps [github.com/opencontainers/selinux](https://github.com/opencontainers/selinux) from 1.4.0 to 1.5.0.
- [Release notes](https://github.com/opencontainers/selinux/releases)
- [Commits](https://github.com/opencontainers/selinux/compare/v1.4.0...v1.5.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-04-06 14:15:36 +02:00
4d895dcb54 v2podman attach and exec
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>
2020-04-05 15:54:51 -05:00
f7dffedeb6 Merge pull request #5710 from baude/v2create
v2podman container create
2020-04-03 23:53:45 +02:00
6514a5c80e v2podman container create
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>
2020-04-03 15:43:03 -05:00
35f5867833 Merge pull request #5672 from baude/v2save
podmanv2 save image
2020-04-03 22:41:18 +02:00
9f2d9679d7 Cleanup whether to enter user namespace for rootless commands
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-04-03 15:25:57 -04:00
837aad724f podmanv2 save image
add ability to save an image for podman v2

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-04-03 13:07:35 -05:00
64cade0f71 Merge pull request #5638 from baude/v2containercheck
podmanv2 checkpoint and restore
2020-04-03 20:05:30 +02:00
3542700d6e Merge pull request #5707 from adrianreber/crun-checkpoint-1
Prepare for crun checkpoint support
2020-04-03 19:56:03 +02:00
9894fde732 podmanv2 version
this is only for the abi side and does not print out the remote information yet.  the remote information will need to be worked on and agreed upon later.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-04-03 12:45:57 -05:00
416fd4846f Merge pull request #5712 from rhatdan/path
Pass path environment down to the OCI runtime
2020-04-03 19:42:15 +02:00
2d9b9e81a3 Merge pull request #5676 from kolyshkin/volume-flags-alt
Fix/improve pkg/storage.InitFSMounts
2020-04-03 18:34:01 +02:00
a89d62ac3a Merge pull request #5701 from vrothberg/v2-push
podmanV2: implement push
2020-04-03 18:11:54 +02:00
001fe983df checkpoint: handle XDG_RUNTIME_DIR
For (almost) all commands which podman passes on to a OCI runtime
XDG_RUNTIME_DIR is set to the same value. This does not happen for the
checkpoint command.

Using crun to checkpoint a container without this change will lead to
crun using XDG_RUNTIME_DIR of the currently logged in user and so it
will not find the container Podman wants to checkpoint.

This bascially just copies a few lines from on of the other commands to
handle 'checkpoint' as all the other commands.

Thanks to Giuseppe for helping me with this.

For 'restore' it is not needed as restore goes through conmon and for
calling conmon Podman already configures XDG_RUNTIME_DIR correctly.

Signed-off-by: Adrian Reber <areber@redhat.com>
2020-04-03 18:00:57 +02:00
7660330ae2 checkpoint: change runtime checkpoint support test
Podman was checking if the runtime support checkpointing by running
'runtime checkpoint -h'. That works for runc.

crun, however, does not use '-h, --help' for help output but, '-?,
--help'.

This commit switches both checkpoint support detection from
 'runtime checkpoint -h'
to
 'runtime checkpoint --help'.

Podman can now correctly detect if 'crun' also support checkpointing.

Signed-off-by: Adrian Reber <areber@redhat.com>
2020-04-03 18:00:57 +02:00
84aa81fabe Pass path environment down to the OCI runtime
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-04-03 11:45:55 -04:00
a168dcc39c Merge pull request #5700 from containers/dependabot/go_modules/github.com/containers/common-0.8.0
Bump github.com/containers/common from 0.6.1 to 0.8.0
2020-04-03 17:12:03 +02:00
8a16674722 podmanv2 checkpoint and restore
add the ability to checkpoint and restore containers on v2podman

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-04-03 09:32:06 -05:00
eb86bfc344 Bump github.com/containers/common from 0.6.1 to 0.8.0
Bumps [github.com/containers/common](https://github.com/containers/common) from 0.6.1 to 0.8.0.
- [Release notes](https://github.com/containers/common/releases)
- [Commits](https://github.com/containers/common/compare/v0.6.1...v0.8.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-04-03 06:35:42 -04:00
ccb9e579c4 Merge pull request #5702 from kolyshkin/test-nitpicks
test/e2e/run_volume_test nitpicks
2020-04-03 11:52:28 +02:00
ccf0e0dd04 Merge pull request #5696 from rhatdan/cc
Fix environment handling from containers.conf
2020-04-03 01:02:57 +02:00
e39cf4cf59 test/e2e/run_volume_test: use unique mount point
For volume and bind mount tests, use the in-container mount point path
that has no common ancestor with any host path (except for root).

This might help to uncover bugs like [1]. Even if not, it seems
lile a good cleanup regardless.

[1] https://github.com/containers/libpod/pull/5676

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2020-04-02 10:19:40 -07:00
504f9082ee test/e2e/run_volume_test.go: mv dockerfile decl
Move declaration of a dockerfile closer to its use.
Since it is used only once, there's no sense in having it declared
globally.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2020-04-02 10:17:10 -07:00
ce38be7959 test/e2e/run_volume_test: only create dir once
Remove repeated mountPath directory creation.

 * For the first two hunks it is the same dir ("secrets") that was
   already created before.

 * For the last hunk ("scratchpad") it is not used at all.

Add an empty line after Mkdir for cases where dir is used more than once.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2020-04-02 10:17:10 -07:00
1f8569f7d7 Fix environment handling from containers.conf
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-04-02 13:10:08 -04:00
44a515015c podmanV2: implement push
* Implement `podman-push` and `podman-image-push` for the podmanV2
  client.

* Tests for `pkg/bindings` are not possible at the time of writing as we
  don't have a local registry running.

* Implement `/images/{name}/push` compat endpoint. Tests are not
  implemented for this v2 endpoint.  It has been tested manually.

General note: The auth config extraction from the http header is not
implement for push.  Since it's not yet supported for other endpoints
either, I deferred it to future work.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-04-02 17:01:32 +02:00
e0614367ca pkg/spec.InitFSMounts: optimize
Instead of getting mount options from /proc/self/mountinfo, which is
very costly to read/parse (and can even be unreliable), let's use
statfs(2) to figure out the flags we need.

[v2: move getting default options to pkg/util, make it linux-specific]

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2020-04-02 07:52:34 -07:00
c3c6a7c823 Merge pull request #5677 from giuseppe/avoid-lock-tty
exec: fix hang if control path is deleted
2020-04-02 16:43:11 +02:00
ffd2d78391 Merge pull request #5516 from cevich/remove_dupe_gate_cross
Cirrus: Remove darwin/windows builds in gate-job
2020-04-02 15:07:03 +02:00
82610d657d Merge pull request #5688 from baude/v2import
podmanv2 import
2020-04-02 14:20:57 +02:00
d172c98714 utils: delete dead code
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-04-02 09:15:58 +02:00
41fc891173 attach: skip shutdown on errors
skip doing a socket shutdown on an error, since we are not sure the
socket was already closed and we end up using the wrong fd.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-04-02 09:15:57 +02:00
4c02aa46c2 attach: fix hang if control path is deleted
if the control path file is deleted, libpod hangs waiting for a reader
to open it.  Attempt to open it as non blocking until it returns an
error different than EINTR or EAGAIN.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-04-02 09:15:56 +02:00
88455fe704 Merge pull request #5687 from TomSweeneyRedHat/dev/tsweeney/fixmaillist
Touch up mailing list address in README.md
2020-04-02 02:27:06 +02:00
a8cde905d5 Merge pull request #5699 from edsantiago/podmanv2-retry
podmanv2-retry - new helper for testing v2
2020-04-02 01:00:06 +02:00
f2c42a3958 pkg/spec.InitFSMounts: fix mount opts in place
... rather than create a new slice and then make the caller
replace the original with the new one.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2020-04-01 15:30:59 -07:00
79f191cb59 Merge pull request #5697 from baude/v2export
podmanv2 export
2020-04-02 00:13:21 +02:00
bb39051616 podmanv2 export
add ability to export a container to a tarball

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-04-01 16:02:53 -05:00
0433081983 podmanv2 import
add the ability to import a container image from a container export

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-04-01 15:56:26 -05:00
0f357be5ae Merge pull request #5686 from baude/v2load
podmanv2 load
2020-04-01 22:54:22 +02:00