Commit Graph

6355 Commits

Author SHA1 Message Date
baude ef85dd7950 podman-remote build
add the ability to build images using files local to the remote-client
but over a varlink interface to a "remote" server.

Signed-off-by: baude <bbaude@redhat.com>
2019-02-13 15:36:36 -06:00
Miloslav Trmač a6707e4348 Vendor in latest c/storage and c/image
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2019-02-13 22:23:14 +01:00
OpenShift Merge Robot e86aec7855
Merge pull request #2331 from baude/issue846
show container ports of network namespace
2019-02-13 21:30:00 +01:00
baude dd74467fd8 show container ports of network namespace
in cases where a container is part of a network namespace, we should
show the network namespace's ports when dealing with ports. this
impacts ps, kube, and port.

fixes: #846

Signed-off-by: baude <bbaude@redhat.com>
2019-02-13 13:51:23 -06:00
OpenShift Merge Robot fa3b91dc12
Merge pull request #2316 from baude/remotevolumeinspect
podman-remote volume inspect|ls
2019-02-13 20:20:10 +01:00
baude 4f60f79a27 podman-remote volume inspect|ls
add the ability to list and inspect volumes using the remote
client and varlink

Signed-off-by: baude <bbaude@redhat.com>
2019-02-13 12:43:51 -06:00
baude d2601eeaa3 build varlink without GOPATH
when gopath was not explicitly set, make would fail due
to the varlink generator.  this symlink in the makefile
addresses that.

fixes: #1842

Signed-off-by: baude <bbaude@redhat.com>
2019-02-13 12:25:08 -06:00
OpenShift Merge Robot 8a16f83b0a
Merge pull request #2327 from baude/issue2175
Parse fq name correctly for images
2019-02-13 19:20:10 +01:00
Valentin Rothberg 4d72b9c3df completions: add --pod to run/create
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-02-13 19:04:28 +01:00
OpenShift Merge Robot 62d88558e7
Merge pull request #2322 from baude/remotepush
podman-remote push
2019-02-13 18:42:00 +01:00
baude f29a11c201 Parse fq name correctly for images
When parsing a string name for repo and tag (for images output), we
should be using parsenormalizedname and reference.Canonical to
get the proper output.

Resolves: #2175

Signed-off-by: baude <bbaude@redhat.com>
2019-02-13 11:05:20 -06:00
Matthew Heon 9d4e7fe58b Try disabling --rm on notify_socket test
We have a consistent CI failure with the notify_socket test that
I can't reproduce locally. There's no reason for the test to have
--rm, so try removing it.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-02-13 11:41:20 -05:00
baude 7dcc21f213 podman-remote push
enable podman-remote push so that users can push images from a
remote client.

change in push API to deal with the need to see output over the
varlink connection.

Signed-off-by: baude <bbaude@redhat.com>
2019-02-13 08:44:12 -06:00
OpenShift Merge Robot df52dac1e7
Merge pull request #2326 from edsantiago/esm/nosudo
get_ci_vm : allow running without sudo
2019-02-13 15:37:16 +01:00
Ed Santiago 17a5f39739 get_ci_vm : allow running without sudo
More complicated than one would think. The first problem is that,
on certain (but not all) Fedora systems, podman cannot mount
volumes read-only (issue #2312). This is baffling, and since
it's not easily reproducible it's likely that the dev team
will not spend much effort on it. Workaround: instead of bind-
mounting /tmp read-only, bind-mount a *tempdir* (subdirectory)
read-write. This is actually cleaner in some ways but it
leads to complications with the paths we use and with cleanup.

Next, allow overriding the default image and allow asking
for no sudo:

    export GCLOUD_IMAGE=quay.io/edsantiago/gcloud_centos:latest
    export GCLOUD_SUDO=

(yes, that's an equal-sign and EOL. Just an empty string).

The third part, unfortunately, requires a custom image because
the as_dollar_user.sh script (the one that runs gcloud in a
container) is hardwired in a cevich image and needs tweaks
in order to detect rootless and avoid sudo.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2019-02-13 05:27:56 -07:00
OpenShift Merge Robot 037107bc84
Merge pull request #2323 from baude/varlinkconditional
Only build varlink when buildtag is available
2019-02-13 07:19:48 +01:00
baude 2ea8cd1b4f Only build varlink when buildtag is available
Correct mistake that broke things like dlv where we should only
try to add the varlink command to podman when the 'varlink' build
tag is present.

Signed-off-by: baude <bbaude@redhat.com>
2019-02-12 15:53:19 -06:00
Matthew Heon b1770ecc5b Remove a lot of '--rm' options from unit tests
Previously, 'podman create --rm' did not work - it wouldn't error
but it did nothing.

It is now fixed, but unfortunately the unit tests used it a lot,
in ways that just do not work when it actually functions.

Begin the process of fixing now-failing tests.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-02-12 14:18:23 -05:00
Matthew Heon 28ee842b76 Address review comments on #2319
Signed-off-by: Matthew Heon <mheon@redhat.com>
2019-02-12 13:11:07 -05:00
Matthew Heon 19a03976f7 Retain a copy of container exit file on cleanup
When cleaning up containers, we presently remove the exit file
created by Conmon, to ensure that if we restart the container, we
won't have conflicts when Conmon tries writing a new exit file.

Unfortunately, we need to retain that exit file (at least until
we get a workable events system), so we can read it in cases
where the container has been removed before 'podman run' can read
its exit code.

So instead of removing it, rename it, so there's no conflict with
Conmon, and we can still read it later.

Fixes: #1640

Signed-off-by: Matthew Heon <mheon@redhat.com>
2019-02-12 12:57:11 -05:00
OpenShift Merge Robot ee27c39f85
Merge pull request #2264 from larskarlitski/varlink-api
Make varlink API more idiomatic
2019-02-12 16:59:45 +01:00
Matthew Heon b6775d5d22 Fix manual detach from containers to not wait for exit
At present, when manually detaching from an attached container
(using the detach hotkeys, default C-p C-q), Podman will still
wait for the container to exit to obtain its exit code (so we can
set Podman's exit code to match). This is correct in the case
where attach finished because the container exited, but very
wrong for the manual detach case.

As a result of this, we can no longer guarantee that the cleanup
and --rm functions will fire at the end of 'podman run' - we may
be exiting before we get that far. Cleanup is easy enough - we
swap to unconditionally using the cleanup processes we've used
for detached and rootless containers all along. To duplicate --rm
we need to also teach 'podman cleanup' to optionally remove
containers instead of cleaning them up.

(There is an argument for just using 'podman rm' instead of
'podman cleanup --rm', but cleanup does have different semantics
given that we only ever expect it to run when the container has
just exited. I think it might be useful to keep the two separate
for things like 'podman events'...)

Signed-off-by: Matthew Heon <mheon@redhat.com>
2019-02-12 10:14:57 -05:00
OpenShift Merge Robot bdf537f4fc
Merge pull request #2309 from rhatdan/help
Don't show global flags except for podman command
2019-02-12 15:45:54 +01:00
Lars Karlitski 2448129e4d varlink: Rename `SearchImage` to `SearchImages`
Also rename image result struct to `ImageSearchResult` and make `limit`
parameter optional.

Signed-off-by: Lars Karlitski <lars@karlitski.net>
2019-02-12 14:48:19 +01:00
Lars Karlitski 5a32518170 varlink: Rename `ContainerInList` to `Container`
Container more clearly describes what the type represents.

Signed-off-by: Lars Karlitski <lars@karlitski.net>
2019-02-12 14:48:19 +01:00
Lars Karlitski 8a51b11058 varlink: Rename `ImageInList` to `Image`
Image more clearly describes what the type represents.

Also, only include the image name in the `ImageNotFound` error returned
by `GetImage()`, not the full error message.

Signed-off-by: Lars Karlitski <lars@karlitski.net>
2019-02-12 14:48:19 +01:00
Lars Karlitski 27baf9970e varlink: Simplify GetVersion() call
Not having the `Version` wrapper type makes it easier for clients to
work with the returned data.

Signed-off-by: Lars Karlitski <lars@karlitski.net>
2019-02-12 14:47:49 +01:00
Lars Karlitski 29392b77e9 varlink: Return all times in RFC 3339 format
This is more consistent and eaiser to parse than the format that
golang's time.String() returns.

Fixes #2260

Signed-off-by: Lars Karlitski <lars@karlitski.net>
2019-02-12 14:47:49 +01:00
Lars Karlitski 38e42476cb Makefile: Don't include quotes around GIT_COMMIT
These quotes were included in the varlink `GetVersion()` call.

Signed-off-by: Lars Karlitski <lars@karlitski.net>
2019-02-12 14:47:49 +01:00
Lars Karlitski 608019b65b varlink: Remove the Ping() method
There are other ways for developers to "ensure their varlink setup is
working", for example by calling `GetVersion()` or any call on the
org.varlink.service interface.

Signed-off-by: Lars Karlitski <lars@karlitski.net>
2019-02-12 14:47:49 +01:00
Lars Karlitski 10982bcf84 podman: Show error when creating varlink listener failed
Signed-off-by: Lars Karlitski <lars@karlitski.net>
2019-02-12 14:47:49 +01:00
Lars Karlitski a097772cf7 varlink: Remove `NotImplemented` type
Remove the `NotImplemented` type and comment out the methods that use
it. This way we can keep track of the methods that still need to be
implemented without committing them to stable API.

Signed-off-by: Lars Karlitski <lars@karlitski.net>
2019-02-12 14:47:49 +01:00
OpenShift Merge Robot faafdcf1f3
Merge pull request #2315 from baude/remotevolumerm
podman-remote volume rm
2019-02-12 13:37:22 +01:00
Daniel J Walsh ccbc4fb006
Don't show global flags except for podman command
Subcommands should not be showing the global flags.  This causes the important
information to scroll off the screen.

Also fixed a typo on runCommmand (Too many 'm's)

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-02-12 05:14:38 -07:00
baude 3101364a3c podman-remote volume rm
add the ability to remove/delete volumes with the podman remote
client.

Signed-off-by: baude <bbaude@redhat.com>
2019-02-11 20:14:50 -06:00
OpenShift Merge Robot 89237033fd
Merge pull request #2300 from baude/cleanupurfave
Remove urfave/cli from libpod
2019-02-12 03:13:19 +01:00
OpenShift Merge Robot ea20ead35b
Merge pull request #2313 from baude/remotevolumecreate
podman-remote volume create
2019-02-12 02:54:34 +01:00
baude a1ab6788e4 Remove urfave/cli from libpod
This is the final cleanup to remove urfave/sli from libpod.  Removed
old, disabled tests that have not been run in over a year.

Signed-off-by: baude <bbaude@redhat.com>
2019-02-11 17:48:34 -06:00
baude 358da6c8c0 podman-remote volume create
create a volume using the remote client over varlink

Signed-off-by: baude <bbaude@redhat.com>
2019-02-11 14:48:07 -06:00
OpenShift Merge Robot 54a5584d84
Merge pull request #2307 from baude/repruneremote
Separate remote and local commands
2019-02-11 20:58:57 +01:00
OpenShift Merge Robot b7a3685cba
Merge pull request #2281 from rhatdan/deleteContainer
Remove container from storage on --force
2019-02-11 20:31:03 +01:00
baude 13d2354bc6 Separate remote and local commands
In the previous CLI, we had an accurate depiction of commands
available for the remote client and those available for the
local client.

Signed-off-by: baude <bbaude@redhat.com>
2019-02-11 12:53:21 -06:00
OpenShift Merge Robot 112a5ab20c
Merge pull request #2310 from baude/issue2304
lock and sync container before checking mountpoint
2019-02-11 17:22:25 +01:00
baude 440dd8c2ed lock and sync container before checking mountpoint
when checking for a container's mountpoint, you must lock and sync
the container or the result may be "".

Fixes: #2304

Signed-off-by: baude <bbaude@redhat.com>
2019-02-11 09:20:30 -06:00
OpenShift Merge Robot 8440b0734c
Merge pull request #2306 from baude/podstatsgotemplate
Podman pod stats -- fix GO template output
2019-02-11 16:02:53 +01:00
OpenShift Merge Robot acf2e91373
Merge pull request #2308 from giuseppe/pod-create-allow-rootless
pod: drop invalid check for rootless
2019-02-11 14:20:55 +01:00
Giuseppe Scrivano 41967e2601
oci: do not set XDG_RUNTIME_DIR twice
we are doing it few lines above.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-02-11 12:38:09 +01:00
OpenShift Merge Robot 6d7d90e626
Merge pull request #2302 from TomSweeneyRedHat/dev/tsweeney/testfix1
Add common_test.go to single test instructions
2019-02-11 10:44:46 +01:00
Giuseppe Scrivano 585f2963aa
pod: drop not valid check for rootless
rootless networks support port binding if the underlying slirp4netns
is new enough.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-02-11 10:19:45 +01:00
OpenShift Merge Robot 52c3d171ee
Merge pull request #2286 from rhatdan/troubleshooting
Add troubleshooting information about running a rootless containers.
2019-02-11 08:54:36 +01:00