3481 Commits

Author SHA1 Message Date
8505c39d25 issue template: run podman info --debug
Ask users to run podman-info with `--debug` to the exact git commit,
compiler and go version.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-02-25 11:57:02 +01:00
553ac800c8 Merge pull request #2419 from rhatdan/play
Fix play to show up in podman help
2019-02-24 21:33:15 +01:00
53b147d215 Merge pull request #2416 from rhatdan/network
Allow dns settings with --net=host
2019-02-24 21:33:05 +01:00
cc4adddeb7 Merge pull request #2413 from baude/remotepodstop
Enable more podman-remote pod commands
2019-02-24 03:13:25 +01:00
8e4be923b8 Merge pull request #2400 from rhatdan/pull
Switch defaults for podman build versus buildah
2019-02-23 23:01:07 +01:00
3642ce837f Fix play to show up in podman help
Also change generate cli calls to match other commands.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-02-23 16:16:41 -05:00
3825db5aee Merge pull request #2404 from baude/remoteerrors
make remote-client error messaging more robust
2019-02-23 22:10:03 +01:00
bcc6b773e6 Switch defaults for podman build versus buildah
Switch defaults for --layers, --force-rm and --pull-always
from buildah to podman.

Only override default values.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-02-23 15:57:24 -05:00
c83e78277a In shared networkNS /etc/resolv.conf&/etc/hosts should be shared
We should just bind mount the original containers /etc/resolv.conf and /etchosts
into the new container.  Changes in the resolv.conf and hosts should be seen
by all containers,  This matches Docker behaviour.

In order to make this work the labels on these files need to have a shared
SELinux label.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-02-23 07:52:10 -05:00
ba62683cbf Allow dns settings with --net=host
This seems to be a needless restriction.  We make a copy of the
hosts /etc/resolv.conf file, so these changes to not modify the
host.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-02-23 07:19:30 -05:00
0969d725a3 Merge pull request #2393 from giuseppe/reexec-into-same-wd
rootless: force same cwd when re-execing
2019-02-23 11:49:07 +01:00
b87bdced1f Fix up handling of user defined network namespaces
If user specifies network namespace and the /etc/netns/XXX/resolv.conf
exists, we should use this rather then /etc/resolv.conf

Also fail cleaner if the user specifies an invalid Network Namespace.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-02-23 05:47:27 -05:00
4bf973a9f6 Enable more podman-remote pod commands
enable pod start, stop, and kill subcommands for the remote-client.

Signed-off-by: baude <bbaude@redhat.com>
2019-02-22 17:00:24 -06:00
b223d4e136 Merge pull request #2401 from TomSweeneyRedHat/dev/tsweeney/buildah1.7
Vendor Buildah v1.7
2019-02-22 23:56:06 +01:00
7e920e4865 tests, rootless: use relative path for export test
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-02-22 23:55:22 +01:00
8984ba7461 rootless: force same cwd when re-execing
when joining an existing namespace, we were not maintaining the
current working directory, causing commands like export -o to fail
when they weren't referring to absolute paths.

Closes: https://github.com/containers/libpod/issues/2381

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-02-22 23:55:21 +01:00
c00bf28f24 Merge pull request #2406 from rhatdan/errors
Exit with errors not just logging error
2019-02-22 23:30:13 +01:00
e6cc5706cd Merge pull request #2410 from giuseppe/cp-rootless-support
cmd: support rootless mode for cp command
2019-02-22 22:52:39 +01:00
ff0b4652ef Vendor Buildah v1.7
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Vendors in Buildah 1.7 into Podman.
Also the latest imagebuilder and changes for
`build --target`

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2019-02-22 16:40:05 -05:00
4d9f4cf71c Merge pull request #2403 from giuseppe/fix-runtime
podman: --runtime has higher priority on runtime_path
2019-02-22 22:32:33 +01:00
3775c6dc63 Exit with errors not just logging error
Several commands were logging errors but exiting with a 0
exit code.  This patch cleans these up.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-02-22 16:28:42 -05:00
84b3f2a7f6 Merge pull request #2386 from baude/cobravalidation
Improve command line validation
2019-02-22 22:10:07 +01:00
d47a9a6c4d cmd: support rootless mode for cp command
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-02-22 21:36:46 +01:00
6ab6e2c307 hide --latest on the remote-client
in the case of the remote-client, it was decided to hide the latest
flag to avoid confusion for end-users on what the "last" container,
volume, or pod are.

Signed-off-by: baude <bbaude@redhat.com>
2019-02-22 14:13:08 -06:00
328250e7be Improve command line validation
Use the checkallandlatest function to validate flag usage as part
of the cobra command args validation.

Signed-off-by: baude <bbaude@redhat.com>
2019-02-22 14:13:08 -06:00
c757cb23ca Merge pull request #2402 from baude/remotepodinspect
podman-remote pod inspect|exists
2019-02-22 21:12:49 +01:00
6208d53464 make remote-client error messaging more robust
the remote-client is currently weak for carrying error messages
over the varlink interface and displaying something useful to users
and developers for the purposes of debug.  this is a starting point
to improve that user experience.

Signed-off-by: baude <bbaude@redhat.com>
2019-02-22 14:12:36 -06:00
56714d14fd podman: --runtime has higher priority on runtime_path
if --runtime is specified, then it has higher priority on the
runtime_path option, which was added for backward compatibility.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-02-22 21:11:03 +01:00
8039ccf4d5 Merge pull request #2411 from cevich/ubuntu_go111
Cirrus: Install Go 1.11 on Ubuntu VMs
2019-02-22 14:27:43 -05:00
bc6b4aa39c podman-remote pod inspect|exists
enable the remote client to be able to inspect a pod.  also, bonus of
enabling the podman pod exists command which returns a 0 or 1 depending
on whether the given pod exists.

Signed-off-by: baude <bbaude@redhat.com>
2019-02-22 11:08:04 -06:00
69c91e044a Cirrus: Install Go 1.11 on Ubuntu VMs
There is no native package for this, so the packaged version must also
be installed, otherwise all the support/dependencies would be removed
also (like go-md2man).  Fix this by installing from the google released
tarball, into /usr/local/go and set $GOROOT to point there.

Also, include a small fix for hack/get_ci_vm.sh not installing
testing dependencies because of an old assumption.

***CIRRUS: REBUILD IMAGES***

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-02-22 12:07:36 -05:00
7184efe939 Cirrus: Add 20m extra timeout for Ubuntu
Tests running slower than normally-slow, bump timeout to allow them to
pass until better solution (for slow Ubuntu tests) can be found.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-02-22 12:07:34 -05:00
0463334579 Introduce how to start to hack on libpod.
Introduce a new part inside the contribution guide
who explain how to start to hack on libpod:
- setup environment
- install tools
- using make
- building podman
- test your changes locally

Signed-off-by: Hervé Beraud <hberaud@redhat.com>
2019-02-22 17:12:18 +01:00
1788addd04 Merge pull request #2389 from baude/issue2388
add newline to images output
2019-02-22 00:03:40 +01:00
eb6243226a Merge pull request #2350 from mheon/lock_renumber
Add lock renumbering
2019-02-21 23:11:24 +01:00
3447edd2ec Merge pull request #4 from edsantiago/pr2389_update
update: remove duplicate newline
2019-02-21 15:21:27 -06:00
bd354ad3cc update: remove duplicate newline
Signed-off-by: Ed Santiago <santiago@redhat.com>
2019-02-21 13:49:42 -07:00
19eb72f420 Fix typo in comment
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-02-21 14:19:50 -05:00
b4c10790d5 Merge pull request #2385 from baude/remoteload
podman-remote load image
2019-02-21 18:29:47 +01:00
71db80ddb1 podman-remote load image
enable the ability to load an image into remote storage
using the remote client.

Signed-off-by: baude <bbaude@redhat.com>
2019-02-21 10:11:19 -06:00
af922fb2c6 Merge pull request #2394 from vrothberg/vendor-image-v1.4
vendor containers/image v1.4
2019-02-21 17:07:48 +01:00
d2b77f8b33 Do not make renumber shut down the runtime
The original intent behind the requirement was to ensure that, if
two SHM lock structs were open at the same time, we should not
make such a runtime available to the user, and should clean it up
instead.

It turns out that we don't even need to open a second SHM lock
struct - if we get an error mapping the first one due to a lock
count mismatch, we can just delete it, and it cleans itself up
when it errors. So there's no reason not to return a valid
runtime.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-02-21 10:51:42 -05:00
e0a6873d78 Add podman system renumber command
This command allows for renumbering Podman locks after an upgrade
to Podman with SHM locks from a 1.0 or earlier branch, or after
the number of locks was changed.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-02-21 10:51:42 -05:00
43db7734e8 Add ability to get a runtime that renumbers
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-02-21 10:51:42 -05:00
f9c548219b Recreate SHM locks when renumbering on count mismatch
When we're renumbering locks, we're destroying all existing
allocations anyways, so destroying the old lock struct is not a
particularly big deal. Existing long-lived libpod instances will
continue to use the old locks, but that will be solved in a
followon.

Also, solve an issue with returning error values in the C code.
There were a few places where we return ERRNO where it was not
set, so make them return actual error codes).

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-02-21 10:51:42 -05:00
a72025d6fd Move RenumberLocks into runtime init
We can't do renumbering after init - we need to open a
potentially invalid locks file (too many/too few locks), and then
potentially delete the old locks and make new ones.

We need to be in init to bypass the checks that would otherwise
make this impossible.

This leaves us with two choices: make RenumberLocks a separate
entrypoint from NewRuntime, duplicating a lot of configuration
load code (we need to know where the locks live, how many there
are, etc) - or modify NewRuntime to allow renumbering during it.
Previous experience says the first is not really a viable option
and produces massive code bloat, so the second it is.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-02-21 10:51:42 -05:00
ca8ae877c1 Remove locks from volumes
I was looking into why we have locks in volumes, and I'm fairly
convinced they're unnecessary.

We don't have a state whose accesses we need to guard with locks
and syncs. The only real purpose for the lock was to prevent
concurrent removal of the same volume.

Looking at the code, concurrent removal ought to be fine with a
bit of reordering - one or the other might fail, but we will
successfully evict the volume from the state.

Also, remove the 'prune' bool from RemoveVolume. None of our
other API functions accept it, and it only served to toggle off
more verbose error messages.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-02-21 10:51:42 -05:00
9353a3e8ec Expand renumber to also renumber pod locks
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-02-21 10:51:42 -05:00
a3dbb7a837 Add ability to rewrite pod configs in the database
Necessary for rewriting lock IDs as part of renumber.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-02-21 10:51:42 -05:00
7fdd20ae5a Add initial version of renumber backend
Renumber is a way of renumbering container locks after the number
of locks available has changed.

For now, renumber only works with containers.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-02-21 10:51:42 -05:00