Commit graph

393 commits

Author SHA1 Message Date
OpenShift Merge Robot fc5951ad55
Merge pull request #1642 from kunalkushwaha/image-tree
Tree implementation for podman images
2019-03-14 09:53:49 -07:00
TomSweeneyRedHat d033452b3d Replace skopeo-containers with containers-common
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Replaces 'skopeo-containers' with 'containers-common' in the files that
I feel comfortable changing it in.  There are a number of rpm building
related files that still have it, but I was hesitant to do so.

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2019-03-14 09:01:30 -04:00
OpenShift Merge Robot 296c61d896
Merge pull request #2638 from jwhonce/issue/1959
Corrected detach man pages and code comments
2019-03-14 05:49:24 -07:00
OpenShift Merge Robot f6cfa8f4d8
Merge pull request #2640 from TomSweeneyRedHat/dev/tsweeney/builddocfix2
Replace buildah with podman in build doc
2019-03-14 01:12:19 -07:00
OpenShift Merge Robot fb5f8ebcb6
Merge pull request #2624 from edsantiago/inspect_usability
Usability cleanup for 'inspect'
2019-03-14 00:31:22 -07:00
Kunal Kushwaha a4b3b9ffbb Tree implementation for podman images
Signed-off-by: Kunal Kushwaha <kushwaha_kunal_v7@lab.ntt.co.jp>
2019-03-14 11:22:06 +09:00
TomSweeneyRedHat 4b41f05a91 Replace buildah with podman in build doc
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Remove the word buildah from the man page and replace it
with podman.  Cut and paste job gone bad apparently.

Fixes: #2639
2019-03-13 20:50:02 -04:00
Jhon Honce f29a765573 Corrected detach man pages and code comments
* Updated documentation to match code

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2019-03-13 14:16:37 -07:00
Ed Santiago 360487ab6d Add 'podman events' to podman(1)
Also: enforce noSubArgs for podman events

Also: remove unnecessary '[flags]' from Use message (Cobra
adds it automatically)

Signed-off-by: Ed Santiago <santiago@redhat.com>
2019-03-13 10:22:10 -06:00
Ed Santiago 3de5e4a99f Usability cleanup for 'inspect'
Make the usage messages (and options) different between
podman inspect, podman image inspect, and podman container inspect.

Disable inapplicable options (-l, -s) for podman image inspect

Disable -t (type) when the type is implicit through the subcommand.

Update man page to reflect differences in usage.

Fix broken test.

Uglier than desirable due to Go and Cobra limitations

Signed-off-by: Ed Santiago <santiago@redhat.com>
2019-03-13 08:29:52 -06:00
OpenShift Merge Robot 883566fbc0
Merge pull request #2562 from baude/healtcheckphase2
healthcheck phase 2
2019-03-12 13:09:13 -07:00
baude 03716cf7f3 healtcheck phase 2
integration of healthcheck into create and run as well as inspect.
healthcheck enhancements are as follows:

* add the following options to create|run so that non-docker images can
define healthchecks at the container level.
  * --healthcheck-command
  * --healthcheck-retries
  * --healthcheck-interval
  * --healthcheck-start-period

* podman create|run --healthcheck-command=none disables healthcheck as
described by an image.
* the healthcheck itself and the healthcheck "history" can now be
observed in podman inspect
* added the wiring for healthcheck history which logs the health history
of the container, the current failed streak attempts, and log entries
for the last five attempts which themselves have start and stop times,
result, and a 500 character truncated (if needed) log of stderr/stdout.

The timings themselves are not implemented in this PR but will be in
future enablement (i.e. next).

Signed-off-by: baude <bbaude@redhat.com>
2019-03-12 14:29:18 -05:00
baude ca1e76ff63 Add event logging to libpod, even display to podman
In lipod, we now log major events that occurr.  These events
can be displayed using the `podman events` command. Each
event contains:

* Type (container, image, volume, pod...)
* Status (create, rm, stop, kill, ....)
* Timestamp in RFC3339Nano format
* Name (if applicable)
* Image (if applicable)

The format of the event and the varlink endpoint are to not
be considered stable until cockpit has done its enablement.

Signed-off-by: baude <bbaude@redhat.com>
2019-03-11 15:08:59 -05:00
OpenShift Merge Robot 8656d2d887
Merge pull request #2538 from giuseppe/slirp4netns-path
libpod: allow to configure path to the slirp4netns binary
2019-03-11 07:56:50 -07:00
TomSweeneyRedHat 3e3fcd5422 Remove --rm and --detach don't coexist note
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

With later changes of Podman, you can now use both the
--rm and --detach in a single run command.  This PR removes
the documentation in the man pages saying this is not
allowed.

Fixes: #2601
2019-03-11 09:34:30 -04:00
Giuseppe Scrivano e02393ba70
libpod: allow to configure path to the network-cmd binary
allow to configure the path to the network-cmd binary, either via an
option flag --network-cmd-path or through the libpod.conf
configuration file.

This is currently used to customize the path to the slirp4netns
binary.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-03-11 09:29:04 +01:00
Ed Santiago 91e15bd802 add podman-healthcheck(1) to podman(1)
...caught by hack/podman-commands.sh script. Which had a little
buglet, which I fixed: add a special case for 'help', which
neither has nor needs a man page.

I believe the podman-commands.sh script is ready to be run in CI,
hint hint.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2019-03-07 14:33:25 -07:00
OpenShift Merge Robot ef714756b7
Merge pull request #2532 from QiWang19/i2520
add flag --extract tar file in podman cp
2019-03-06 09:40:39 -08:00
Qi Wang d9e1b2c470 add flag --extract tar file in podman cp
Signed-off-by: Qi Wang <qiwan@redhat.com>
2019-03-06 10:06:25 -05:00
baude 598bde52d0 podman healthcheck run (phase 1)
Add the ability to manually run a container's healthcheck command.
This is only the first phase of implementing the healthcheck.
Subsequent pull requests will deal with the exposing the results and
history of healthchecks as well as the scheduling.

Signed-off-by: baude <bbaude@redhat.com>
2019-03-05 14:03:55 -06:00
Giuseppe Scrivano 0b34327ad4
exec: support --preserve-fds
Allow to pass additional FDs to the process being executed.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-03-02 11:45:42 +01:00
OpenShift Merge Robot 8ee471f800
Merge pull request #2495 from baude/runlabelpulldefault
Pull image for runlabel if not local
2019-03-01 12:50:50 -08:00
baude a4b82c03d3 Pull image for runlabel if not local
In cases where a user issues the podman container runlabel
command and the image is not local, we now default to pulling
the image automatically to mimic the atomic cli behavior.

Fixes: BZ #1677905

Signed-off-by: baude <bbaude@redhat.com>
2019-03-01 09:20:12 -06:00
Ed Santiago 6f474c5704 Fix link inconsistencies in man pages
Found via:

    for i in docs/*.md;do x=$(perl -ne 'if (/\[(podman-.*?)\(1\)\]\((podman-.*?)\.1\.md/) { print "  $1 != $2\n" if $1 ne $2; print " ENOENT $2\n" unless -e "docs/$2.1.md" }' <$i); if [ -n "$x" ]; then echo $i; echo "$x";fi;done

...which is probably a good candidate for another CI hook,
except I have no idea how to rewrite it in awk.

Additionally, mark `podman refresh` and `podman container refresh`
as hidden, remove its man page, and remove references to it from
all other man pages.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2019-03-01 06:53:52 -07:00
Daniel J Walsh be0845936a
Move Alias lines to descriptions of commands
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-02-28 15:14:08 -05:00
Daniel J Walsh edfe644a0c
No podman container ps command exists
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-02-28 14:57:03 -05:00
Daniel J Walsh b4b7b298fc
Clean up man pages to match commands
Also add podman-commands.sh to compare man pages to commands.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-02-27 16:37:40 -05:00
Ed Santiago a20ff42134 Better usage synopses for subcommands
Conceptually simple: include, where applicable, a brief
description of command-line options for each subcommand.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2019-02-26 18:10:36 -07:00
Matthew Heon 5fcbe5baab Add volume path to default libpod.conf (and manpage)
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-02-26 09:38:02 -05:00
Valentin Rothberg 7fea0d7077 docs: cross-reference podman-{generate,play}-kube
Addresses: https://github.com/containers/libpod/pull/2428#discussion_r260200694
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-02-26 15:07:05 +01:00
OpenShift Merge Robot f9ef82ee7c
Merge pull request #2362 from mheon/add_locks_to_config
Add num_locks to the default libpod config
2019-02-26 10:37:59 +01:00
Matthew Heon 5b010ee58b Add num_locks to the default libpod config
Allow adjusting number of locks in libpod.conf via an already
available knob we previously didn't expose in the default config
file.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-02-25 17:43:25 -05:00
OpenShift Merge Robot e45c442080
Merge pull request #2358 from rhatdan/namespace
Fix up handling of user defined network namespaces
2019-02-25 21:31:50 +01:00
Daniel J Walsh fe4c0c3780
Change exit code to 1 on podman rmi nosuch image
Make it easy for scripts to determine if an image removal
failure.   If only errors were no such image exit with 1
versus 125.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-02-25 12:49:27 -05:00
Daniel J Walsh e41279b902
Change exit code to 1 on podman rm nosuch container
Make it easy for scripts to determine if a container removal
fails versus the container did not exist.

If only errors were no such container exit with 1 versus 125.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-02-25 10:31:04 -05:00
Daniel J Walsh 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
TomSweeneyRedHat 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
baude 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
Matthew Heon 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
TomSweeneyRedHat 675a202a1b Fifth chunk of Cobra Examples
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

The fifth and final chunk of examples for the Cobra
examples in the CLI help output.

Also includes a few man page touchups.

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2019-02-18 19:37:09 -05:00
OpenShift Merge Robot 3f32eae56f
Merge pull request #2357 from TomSweeneyRedHat/dev/tsweeney/cobrahelp3
Add 3rd chunk of Cobra examples
2019-02-17 22:44:04 +01:00
OpenShift Merge Robot 6aaf8d39a9
Merge pull request #2295 from haircommander/recursive-start
Recursively start a pod if a container is run in it
2019-02-17 21:04:33 +01:00
TomSweeneyRedHat b62c0e703d Add 3rd chunk of Cobra examples
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Adds the third chunk of Cobra examples to the cli help.
As were putting together a release tomorrow, tried to
hit the heavy commands with this PR.

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2019-02-17 13:49:05 -05:00
Peter Hunt 81804fc464 pod infra container is started before a container in a pod is run, started, or attached.
Prior, a pod would have to be started immediately when created, leading to confusion about what a pod state should be immediately after creation. The problem was podman run --pod ... would error out if the infra container wasn't started (as it is a dependency). Fix this by allowing for recursive start, where each of the container's dependencies are started prior to the new container. This is only applied to the case where a new container is attached to a pod.

Also rework container_api Start, StartAndAttach, and Init functions, as there was some duplicated code, which made addressing the problem easier to fix.

Signed-off-by: Peter Hunt <pehunt@redhat.com>
2019-02-15 16:39:24 -05:00
TomSweeneyRedHat 72b91eb87f Second chunk of Cobra help
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Adds examples to Cobra help for a second chunk of commands.

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2019-02-15 14:38:46 -05:00
OpenShift Merge Robot 40c6d5c98c
Merge pull request #2188 from TomSweeneyRedHat/dev/tsweeney/pullall
Add --all-tags to pull command
2019-02-15 14:45:03 +01:00
Giuseppe Scrivano 7899b738f4
docs: mention the new OCI runtime configuration
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-02-15 13:04:23 +01:00
OpenShift Merge Robot 81ace5caac
Merge pull request #2333 from TomSweeneyRedHat/dev/tsweeney/helpexamples
Add examples for Cobra
2019-02-15 00:07:34 +01:00
OpenShift Merge Robot 1a9128d1e4
Merge pull request #2320 from QiWang19/stdinPW
--password-stdin flag in `podman login`
2019-02-14 22:31:58 +01:00
OpenShift Merge Robot 18bf883eeb
Merge pull request #2151 from QiWang19/cp
'podman cp' copy between host and container
2019-02-14 22:31:52 +01:00