3044 Commits

Author SHA1 Message Date
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
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
df52dac1e7 Merge pull request #2326 from edsantiago/esm/nosudo
get_ci_vm : allow running without sudo
2019-02-13 15:37:16 +01:00
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
037107bc84 Merge pull request #2323 from baude/varlinkconditional
Only build varlink when buildtag is available
2019-02-13 07:19:48 +01:00
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
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
28ee842b76 Address review comments on #2319
Signed-off-by: Matthew Heon <mheon@redhat.com>
2019-02-12 13:11:07 -05:00
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
ee27c39f85 Merge pull request #2264 from larskarlitski/varlink-api
Make varlink API more idiomatic
2019-02-12 16:59:45 +01:00
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
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
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
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
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
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
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
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
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
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
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
faafdcf1f3 Merge pull request #2315 from baude/remotevolumerm
podman-remote volume rm
2019-02-12 13:37:22 +01:00
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
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
89237033fd Merge pull request #2300 from baude/cleanupurfave
Remove urfave/cli from libpod
2019-02-12 03:13:19 +01:00
ea20ead35b Merge pull request #2313 from baude/remotevolumecreate
podman-remote volume create
2019-02-12 02:54:34 +01:00
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
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
54a5584d84 Merge pull request #2307 from baude/repruneremote
Separate remote and local commands
2019-02-11 20:58:57 +01:00
b7a3685cba Merge pull request #2281 from rhatdan/deleteContainer
Remove container from storage on --force
2019-02-11 20:31:03 +01:00
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
112a5ab20c Merge pull request #2310 from baude/issue2304
lock and sync container before checking mountpoint
2019-02-11 17:22:25 +01:00
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
8440b0734c Merge pull request #2306 from baude/podstatsgotemplate
Podman pod stats -- fix GO template output
2019-02-11 16:02:53 +01:00
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
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
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
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
52c3d171ee Merge pull request #2286 from rhatdan/troubleshooting
Add troubleshooting information about running a rootless containers.
2019-02-11 08:54:36 +01:00
4994fecd46 Podman pod stats -- fix GO template output
Go templates were not being processed or printed correctly for podman
pod stats.  Added the ability to do templates as well as honor the
table identifier.

Fixes #2258

Signed-off-by: baude <bbaude@redhat.com>
2019-02-10 11:27:09 -06:00
62c8ba527e Add troubleshooting information about running a rootless containers.
Add a problem statement about shadow-utils and missing entries from
/etc/subuid and /etc/subgid.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-02-10 08:08:22 -07:00
1543a01be8 Add --all-tags to pull command
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Add --all-tags for the `podman pull` command so all tags
of an image will be pulled, not just ':latest'.  Emulates
the change in Buildah https://github.com/containers/buildah/pull/1263

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2019-02-09 20:00:19 -05:00
931af00bb0 Add common_test.go to single test instructions
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Add e2e/test/common_test.go to the single integration test
instructions.  Without it the documented process fails.
2019-02-09 11:28:13 -05:00
c86e8f180c Merge pull request #2280 from TomSweeneyRedHat/dev/tsweeney/trusty2
Update image-trust man with further comments
2019-02-09 14:02:10 +01:00
e1ce36384a Merge pull request #2296 from baude/psShowMount
Add volume mounts to PS output
2019-02-09 13:49:29 +01:00
233ba5bd89 Remove container from storage on --force
Currently we can get into a state where a container exists in
storage but does not exist in libpod.  If the user forces a
removal of this container, then we should remove it from storage
even if the container is owned by another tool.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-02-09 05:33:14 -07:00
1fd9be022f Merge pull request #2297 from baude/issue2246
do not crash when displaying dangling images
2019-02-09 13:14:50 +01:00
e071ac20f8 do not crash when displaying dangling images
the previous method required a populated image template to create
the headers and always selected the first image in the slice. when
dealing with dangling images, they are not populated and therefore
would panic.

Resolves: #2246

Signed-off-by: baude <bbaude@redhat.com>
2019-02-08 17:09:00 -06:00
4b40640c81 Add volume mounts to PS output
When listing containers, you should be able to list the mounts
with something like --format "table{{".Mounts}}".

Resolves: #2238

Signed-off-by: baude <bbaude@redhat.com>
2019-02-08 16:43:32 -06:00
afd4d5f4a4 Merge pull request #2274 from baude/cobraprep
Migrate to cobra CLI
2019-02-08 20:12:38 +01:00