40 Commits

Author SHA1 Message Date
95bc917b49 runtime: Fix typo
Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
2019-11-02 01:44:22 +00:00
a4a70b4506 bump containers/image to v5.0.0, buildah to v1.11.4
Move to containers/image v5 and containers/buildah to v1.11.4.

Replace an equality check with a type assertion when checking for a
docker.ErrUnauthorizedForCredentials in `podman login`.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2019-10-29 13:35:18 -04:00
f60a814e4d Add parsing for UID, GID in volume "o" option
Everything else is a flag to mount, but "uid" and "gid" are not.
We need to parse them out of "o" and handle them separately.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-10-22 14:32:54 -04:00
d3f59bedb3 Update c/image to v4.0.1 and buildah to 1.11.3
This requires updating all import paths throughout, and a matching
buildah update to interoperate.

I can't figure out the reason for go.mod tracking
	github.com/containers/image v3.0.2+incompatible // indirect
((go mod graph) lists it as a direct dependency of libpod, but
(go list -json -m all) lists it as an indirect dependency),
but at least looking at the vendor subdirectory, it doesn't seem
to be actually used in the built binaries.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2019-10-04 20:18:23 +02:00
046178e55f Add function for looking up volumes by partial name
This isn't included in Docker, but seems handy enough.

Use the new API for 'volume rm' and 'volume inspect'.

Fixes #3891

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-09-09 12:06:10 -04:00
a760e325f3 Add ability for volumes with options to mount/umount
When volume options and the local volume driver are specified,
the volume is intended to be mounted using the 'mount' command.
Supported options will be used to volume the volume before the
first container using it starts, and unmount the volume after the
last container using it dies.

This should work for any local filesystem, though at present I've
only tested with tmpfs and btrfs.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-09-05 17:12:27 -04:00
9ced2488c9 Add --digestfile option to push
Add the digestfile option to the push command so the digest can
be stored away in a file when requested by the user.  Also have added
a debug statement to show the completion of the push.

Emulates Buildah's https://github.com/containers/buildah/pull/1799/files

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2019-08-21 10:11:52 -04:00
bd0b05f138 Merge pull request #3709 from mheon/volume_inspect
Change backend code for 'volume inspect'
2019-08-19 13:57:15 +02:00
76f327f73f Merge pull request #3617 from QiWang19/create_pull
add --pull flag for podman create&run
2019-08-17 14:55:14 +02:00
04d333f0ef runtime: honor --runtime flag to build
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-08-13 21:43:36 +02:00
2aa35d25b3 build: use the configured runtime
Now buildah honors the runtime configured with podman.

Closes: https://github.com/giuseppe/crun/issues/69

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-08-11 23:25:51 +02:00
decfea65be add --pull flag for podman create&run
Requirement from https://github.com/containers/libpod/issues/3575#issuecomment-512238393

Added --pull for podman create and pull to match the newly added flag in docker CLI.
`missing`: default value, podman will pull the image if it does not exist in the local.
`always`: podman will always pull the image.
`never`: podman will never pull the image.

Signed-off-by: Qi Wang <qiwan@redhat.com>
2019-08-09 15:21:34 -04:00
cd561cfe2f Swap 'volume inspect' frontend to use the new backend
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-08-02 15:08:30 -04:00
0ad374af6a podman events format json
Enable podman events to format the output as jsonline

Signed-off-by: Qi Wang <qiwan@redhat.com>
2019-08-02 11:47:43 -04:00
db826d5d75 golangci-lint round #3
this is the third round of preparing to use the golangci-lint on our
code base.

Signed-off-by: baude <bbaude@redhat.com>
2019-07-21 14:22:39 -05:00
8ae97b2f57 Add support for listing read/only and read/write images
When removing --all images prune images only attempt to remove read/write images,
ignore read/only images

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-07-19 06:59:49 -04:00
a78c885397 golangci-lint pass number 2
clean up and prepare to migrate to the golangci-linter

Signed-off-by: baude <bbaude@redhat.com>
2019-07-11 09:13:06 -05:00
d0a0a3fbd9 configure runtime without store
some podman commands do not require the use of a container/image store.
in those cases, it is more effecient to not open the store, because that
results in having to also close the store which can be costly when the
system is under heavy write I/O loads.

Signed-off-by: baude <bbaude@redhat.com>
2019-07-01 14:15:44 -05:00
8561b99644 libpod removal from main (phase 2)
this is phase 2 for the removal of libpod from main.

Signed-off-by: baude <bbaude@redhat.com>
2019-06-27 07:56:24 -05:00
a1c654de94 Add connection information to podman-remote info
Refactor client code to break out building connection string from
making the connection.

Example:

client:
  Connection: unix:/run/podman/io.podman
  Connection Type: DirectConnection
  .
  :

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2019-05-16 11:03:22 -07:00
d202e010af Add information when running podman version on client
* Include service version information and headers

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2019-05-08 11:29:03 -07:00
f49e0c19ed runtime: pass down the context
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-04-26 22:23:49 +02:00
01e79477ca Merge pull request #2850 from baude/eventsjournald
journald event logging
2019-04-25 12:20:39 -07:00
5c81a117f1 images: add context to GetParent/IsParent/Remove/Prune...
Add a context.Context parameter to Image.GetParent(), Image.IsParent(),
Image.GetChildren(), Image.Remove(), and Runtime.PruneImages().

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2019-04-25 08:57:58 -04:00
7bf7c177ab journald event logging
add the ability for podman to read and write events to journald instead
of just a logfile.  This can be controlled in libpod.conf with the
`events_logger` attribute of `journald` or `file`.  The default will be
set to `journald`.

Signed-off-by: baude <bbaude@redhat.com>
2019-04-24 16:00:04 -05:00
69962682e9 Refactor of 'podman prune' to better support remote
* Push iterations into the service not the client
* Add e2e tests
* Refactor to use new frameworks

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2019-04-18 15:13:56 -07:00
4319552cf8 Added remote pod prune
Signed-off-by: Peter Hunt <pehunt@redhat.com>
2019-04-16 11:23:18 -04:00
187de9f98e cmd, pkg: drop commented code
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-04-15 13:00:54 +02:00
80b2c097fe podman-remote generate kube
Allow the ability to generate kube YAML from the podman remote-client.

Signed-off-by: baude <bbaude@redhat.com>
2019-04-12 12:05:09 -05:00
09ff62429a Implement podman-remote rm
* refactor command output to use one function
* Add new worker pool parallel operations
* Implement podman-remote umount
* Refactored podman wait to use printCmdOutput()

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2019-04-09 11:55:26 -07:00
1759eb09e1 Merge pull request #2706 from giuseppe/rootless-single-usernamespace
rootless: single user namespace
2019-04-04 09:21:09 -07:00
576a80b0d7 add remote-client diff
the remote client now can run the diff command to report changes,
modifications, and deletions in an image or container.

Signed-off-by: baude <bbaude@redhat.com>
2019-04-03 09:52:38 -05:00
72382a12a7 rootless: use a single user namespace
simplify the rootless implementation to use a single user namespace
for all the running containers.

This makes the rootless implementation behave more like root Podman,
where each container is created in the host environment.

There are multiple advantages to it: 1) much simpler implementation as
there is only one namespace to join.  2) we can join namespaces owned
by different containers.  3) commands like ps won't be limited to what
container they can access as previously we either had access to the
storage from a new namespace or access to /proc when running from the
host.  4) rootless varlink works.  5) there are only two ways to enter
in a namespace, either by creating a new one if no containers are
running or joining the existing one from any container.

Containers created by older Podman versions must be restarted.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-04-01 15:32:58 +02:00
adad93342c Update vendor of Buildah and imagebuilder
Fixes the testing issues we are hitting.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-03-13 08:21:11 -04:00
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
231129e4dc rootless: fix pod stop|rm if uid in the container != 0
join the user namespace where the pod is running, so that we can both
manage the storage and correctly send the kill signal to a process
which is not running as root in the namespace.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-03-11 11:48:28 +01:00
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
4d13a80fa4 Support podman-remote stop container(s)
* Clean up adapter code
* Add GetContainersByContext to Varlink API
* Add missing comments
* Restore save command
* Restore error type mapping when using varlink

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2019-03-02 08:57:20 -07:00
ffefbda694 Fix build for non-Varlink-tagged Podman
Fixes #2459

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-02-27 10:27:08 -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