1676 Commits

Author SHA1 Message Date
bbbbfa582b vendor containerd/cgroups
We need to vendor in the latest containerd/cgroups for a fix related to
slice delegation and systemd <= 239. The opencontainer/runtime-spec is
brought along for the ride.

Signed-off-by: baude <bbaude@redhat.com>

Closes: #1414
Approved by: mheon
2018-09-06 15:19:25 +00:00
2e6243b185 Fix up libpod.conf man pages and referencese to it.
Remove podman --config option, since it does not do anything.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #1410
Approved by: mheon
2018-09-06 14:48:51 +00:00
490cc82d0b Print errors from individual pull attempts
Right now, we don't print errors from c/image while trying to
pull images. This prints the errors when log-level=debug is set
so we can debug errors while pulling.

Signed-off-by: Matthew Heon <mheon@redhat.com>

Closes: #1409
Approved by: baude
2018-09-05 23:38:28 +00:00
9ae6d773b4 Added GOPATH/bin to PATH install.md
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Closes: #1408
Approved by: rhatdan
2018-09-05 23:38:19 +00:00
1ee466eee4 We should fail Podman with ExitCode 125 by default
$ ./bin/podman  --foo
$ echo $?
125
$ ./bin/podman  foo
Command "foo" not found.
See `podman --help`.
$ echo $?
1

After this change

$ ./bin/podman  foo
Command "foo" not found.
See `podman --help`.
$ echo $?
125

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #1398
Approved by: vrothberg
2018-09-05 14:04:50 +00:00
7ffb8a7900 Add CRI logs parsing to podman logs
Podman logs was not parsing CRI logs well, especially
the F and P logs. Now using the same parsing code as
in kube here.

Signed-off-by: umohnani8 <umohnani@redhat.com>

Closes: #1403
Approved by: rhatdan
2018-09-05 13:48:20 +00:00
4ddcbd7941 rmi remove all not error when no images are present
When running podman rm -a on a storage where no images exist,
the exit code should NOT be non-zero.

Signed-off-by: baude <bbaude@redhat.com>

Closes: #1402
Approved by: rhatdan
2018-09-05 11:06:59 +00:00
807f6f8d8f rootless: check uid with Geteuid() instead of Getuid()
change the tests to use chroot to set a numeric UID/GID.

Go syscall.Credential doesn't change the effective UID/GID of the
process.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #1372
Approved by: mheon
2018-09-04 14:36:57 +00:00
bdee681409 rootless, tests: add tests for the pod command
also refactor the rootless_test.go to facilitate running a test in a
rootless context.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #1372
Approved by: mheon
2018-09-04 14:36:57 +00:00
1ac1c54027 rootless, create: support --pod
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #1372
Approved by: mheon
2018-09-04 14:36:57 +00:00
8ca67d2794 rootless, run: support --pod
move re-exec later on, so that we can check whether we need to join
the infra container user namespace or we need to create another one.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #1372
Approved by: mheon
2018-09-04 14:36:57 +00:00
4d12974214 rootless: create compatible pod infra container
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #1372
Approved by: mheon
2018-09-04 14:36:57 +00:00
14c0f9d63c rootless: be in an userns to initialize the runtime
be sure to be in an userns for a rootless process before initializing
the runtime.  In case we are not running as uid==0, take advantage of
"podman info" that creates the runtime.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #1372
Approved by: mheon
2018-09-04 14:36:57 +00:00
daa28349c8 commandNotFoundHandler: use stderr and exit code 1
Fixes: #1395
Signed-off-by: Valentin Rothberg <vrothberg@suse.com>

Closes: #1397
Approved by: mheon
2018-09-01 19:26:24 +00:00
4a910e1c2b Merge pull request #1394 from mheon/bump-0.8.5
Bump to 0.8.5
2018-08-31 16:45:03 -04:00
73a1e81924 Bump gitvalidation epoch
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-08-31 16:43:59 -04:00
b5495910dc Bump to v0.9.1-dev
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-08-31 16:43:58 -04:00
dc5a711fb6 Bump to v0.8.5
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
v0.8.5
2018-08-31 16:43:52 -04:00
531387465c Merge pull request #1393 from mheon/release_notes_0.8.5
Update release notes for 0.8.5
2018-08-31 16:43:15 -04:00
ffae5660ed Update release notes for 0.8.5
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-08-31 16:42:21 -04:00
c65a8bad8f Merge pull request #1392 from mheon/up_wait_duration
Up time between checks for podman wait
2018-08-31 16:27:33 -04:00
2491f3d6b2 Merge pull request #1318 from rhatdan/systemd
Add proper support for systemd inside of podman
2018-08-31 16:27:01 -04:00
27ca091c08 Add proper support for systemd inside of podman
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2018-08-31 14:42:32 -04:00
a917f8fa2a We are mistakenly seeing repos as registries.
Currently `podman pull rhel7/rhel-tools` is failing because it
sees rhel7 as a registry.  This change will verify that the returned
registry from the parser is actually a registry and not a repo,
if a repo it will return the correct content, and we will pull the image.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #1387
Approved by: mtrmac
2018-08-31 18:02:14 +00:00
294c3f4cab container: resolve rootfs symlinks
Prevent a runc error that doesn't like symlinks as part
of the rootfs.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #1390
Approved by: rhatdan
2018-08-31 17:37:20 +00:00
4291a43a54 Up time between checks for podman wait
Prior to this patch, we were polling continuously to check if a
container had died. This patch changes this to poll 10 times a
second, which should be more than sufficient and drastically
reduce CPU utilization.

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-08-31 13:18:34 -04:00
6d067fcba2 Turn on test debugging
Signed-off-by: Jhon Honce <jhonce@redhat.com>

Closes: #1369
Approved by: rhatdan
2018-08-31 16:52:52 +00:00
8245f09428 Add support for remote commands
* Add support for commit, export, inspect, kill, logs, mount, pause
  port commands
* Refactored Report class to allow column lengths to be optionally
  driven by data
* Refactored Ps class to truncate image names on the left vs right
* Bug fixes

Signed-off-by: Jhon Honce <jhonce@redhat.com>

Closes: #1369
Approved by: rhatdan
2018-08-31 16:52:52 +00:00
de414c4354 fixup A few language changes and subuid(5)
Signed-off-by: Naja Melan <najamelan@autistici.org>

Closes: #1380
Approved by: rhatdan
2018-08-31 13:52:11 +00:00
357eff7235 Make the documentation of user namespace options in podman-run clearer
This proposes a more comprehensible man page.

A number of things have been lost in translation and this should be reviewed:
- the former docs from --userns say that it is disabled by default. I
  suppose that this is the same as --userns:host, but this should be confirmed.
  It also stated that is would use options like pid=host, which confuses me
  as pid namespaces are a totally different thing from user namespaces. It also
  mentions the enabling of --privileged. I think the difference between using
  --userns:host and not using any user namespace options at all is not clear
  and maybe not very logical. Also what would be the difference between using
  --userns:host and using --priveleged alone?
- I found the syntax for --gidmap at the bottom of the man page in the examples.
  In the example it doesn't use '=', eg. podman run `--gidmap 0:30000:2000`.
  For consistency with the other options I have used '=' for now, but if it is
  optional, I would remove it everywhere, as less tokens is usually improved
  readability. For now the inconsistency remains between the options doc and the
  examples section.
- It wasn't very clear to me whether one should hard wrap long lines or not as the
  contains a mix.
- I haven't for now looked at user namespace options on other commands, but
  that should be done surely before merging.
- I didn't know which command to run to generate the groff, so that needs doing still.

from issue #1374

Signed-off-by: Naja Melan <najamelan@autistici.org>

Signed-off-by: Naja Melan <najamelan@autistici.org>

Closes: #1380
Approved by: rhatdan
2018-08-31 13:52:11 +00:00
a34d6b54fa pod create: restore help flag
It is not necessary to hide podman-pod-create's help flag.  Therefore,
partially revert commit 6751b2c35040 to restore the help flag.

Signed-off-by: Valentin Rothberg <vrothberg@suse.com>

Closes: #1379
Approved by: rhatdan
2018-08-31 10:19:11 +00:00
bbcad6f572 catch command-not-found errors
Add a special handler to catch errors caused by specifying unknown
commands to Podman.  This allows printing a more helpful error message.

```
$ podman
Command "123123" not found.
See `podman --help`.

$ podman pod 123123
Command "123123" not found.
See `podman pod --help`.
```

Signed-off-by: Valentin Rothberg <vrothberg@suse.com>

Closes: #1379
Approved by: rhatdan
2018-08-31 10:19:11 +00:00
3839c00ae2 don't print help message for usage errors
Don't print potentially verbose help messages in case of usage errors,
but print only the usage error followed by a pointer to the command's
help.  This aligns with Docker.

```
$ podman run -h
flag needs an argument: -h
See 'podman run --help'.
```

Signed-off-by: Valentin Rothberg <vrothberg@suse.com>

Closes: #1379
Approved by: rhatdan
2018-08-31 10:19:11 +00:00
82a6b373a5 Vendor in latest containers/storage and containers/image
Update container/image to address a commit error when copying layers and metadata.
This change may require users to recreate containers.

container/storage added some new lock protection to prevent possible deadlock and
data corruption.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #1381
Approved by: mheon
2018-08-31 09:49:56 +00:00
89a580b374 Merge pull request #1382 from baude/addconmon
add conmon to copr spec
2018-08-30 19:33:30 -05:00
2caf1a9c33 add conmon to copr spec
For COPR rpms, it is desirable to have conmon built into the podman RPM.  No
code is impacted.

Signed-off-by: baude <bbaude@redhat.com>
2018-08-30 19:18:27 -05:00
1c0cd0796a docs: consistent format for example
All bash examples are now placed in a code section (```).  The PS1
prompt is set to `$`.

Signed-off-by: Valentin Rothberg <vrothberg@suse.com>

Closes: #1375
Approved by: rhatdan
2018-08-30 16:51:56 +00:00
1243bfa6f1 docs: consistent headings
Base heading is level 2, which is identical to the level 1.  However
level 3 will be indendet which is used a lot in the `## EXAMPLES`
sections.

Signed-off-by: Valentin Rothberg <vrothberg@suse.com>

Closes: #1375
Approved by: rhatdan
2018-08-30 16:51:56 +00:00
3f6426aeec docs: make HISTORY consistent
- second heading
 - consistent mail addresses <user@domain.com>
 - change order with latest changes first

Signed-off-by: Valentin Rothberg <vrothberg@suse.com>

Closes: #1375
Approved by: rhatdan
2018-08-30 16:51:56 +00:00
442742aa0a docs: fix headers
Signed-off-by: Valentin Rothberg <vrothberg@suse.com>

Closes: #1375
Approved by: rhatdan
2018-08-30 16:51:56 +00:00
bdce676307 varlink: fix --timeout usage
The varlink usage help looks like:

--timeout value, -t value  time until the varlink session expires in
  milliseconds. default is 1 second; 0 means no timeout. (default:
  1000)

Fix it to not repeat twice the default value.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #1377
Approved by: rhatdan
2018-08-30 15:52:08 +00:00
6751b2c350 run/create: reserve -h flag for hostname
Move the `-h` short flag from `--help` to `--hostname` for podman-run,
podman-create and podman-pod-create to be compatible with Docker.

Fixes: #1367
Signed-off-by: Valentin Rothberg <vrothberg@suse.com>

Closes: #1373
Approved by: rhatdan
2018-08-30 15:45:13 +00:00
65c31d49f9 podman,varlink: inform user about --timeout 0
Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>

Closes: #1363
Approved by: rhatdan
2018-08-30 10:46:54 +00:00
ecf84390ef rootless: show an error when stats is used
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #1371
Approved by: rhatdan
2018-08-29 16:25:20 +00:00
d8c2962188 rootless: show an error when pause/unpause are used
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #1371
Approved by: rhatdan
2018-08-29 16:25:20 +00:00
86aefb5de2 rootless: unexport GetUserNSForPid
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #1371
Approved by: rhatdan
2018-08-29 16:25:20 +00:00
46acded58d rootless, exec: use the new function to join the userns
since we have a way for joining an existing userns use it instead of
nsenter.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #1371
Approved by: rhatdan
2018-08-29 16:25:20 +00:00
2ed79f6315 rootless: fix top
join the user namespace used to create the container so that psgo can
work in the same way as with root containers.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #1371
Approved by: rhatdan
2018-08-29 16:25:20 +00:00
1789242933 rootless: add new function to join existing namespace
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #1371
Approved by: rhatdan
2018-08-29 16:25:20 +00:00
eb5fdebc84 Vendor in latest projectatomic/buildah
This will help document the defaults in podman build.

podman build --help will now show the defaults and mention
the environment variables that can be set to change them.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #1364
Approved by: mheon
2018-08-29 14:27:11 +00:00