27 Commits

Author SHA1 Message Date
e0847f5457 V2 podman system service
* Added support for system service
* Enabled linting on the varlinkapi source, needed to support V2
  service command
* Added support for PODMAN_SOCKET

Skip linting deprecated code

Rather than introduce bugs by correcting deprecated code, linting the
code is being skipped. Code that is being ported into V2 is being
checked.

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2020-04-07 19:22:10 -07:00
e20ecc733c refactor info
the current implementation of info, while typed, is very loosely done so.  we need stronger types for our apiv2 implmentation and bindings.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-04-06 12:45:42 -05:00
7a12e01556 V2 Move varlink home
* move cmd/podman/varlink/* to pkg/varlink to support podmanV2 refactor
* update Makefile
* reformatted all impacted code

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2020-03-30 08:18:35 -07:00
651ddd3560 Reduce CPU usage when --timeout=0
* Add second go routine for when a Timer is not needed.
* goimports updated some project files

Fixes #5531

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2020-03-18 10:27:25 -07:00
d52a4dc2d4 Fix podman-remote info to show registry data
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-01-07 19:38:46 -05:00
79bf5010ed Add podman system reset command
This command will destroy all data created via podman.
It will remove containers, images, volumes, pods.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-11-29 05:34:52 -05:00
b2b284111e Return information about mount_program (fuse-overlayfs)
We want to get podman info to tell us about the version of
the mount program to help us diagnose issues users are having.

Also if in rootless mode and slirp4netns is installed reveal package
info on slirp4netns.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-09-06 07:32:42 -04:00
63eef5a234 add eventlogger to info
to help with future debugging, we now display the type of event logger
being used inside podman info -> host.

Signed-off-by: baude <bbaude@redhat.com>
2019-08-02 20:05:27 -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
38199f4c28 add varlink bridge
allow the user to define a remote host and remote username for their
remote podman sessions.  this is then feed to the varlink "bridge" as
the ssh credentials and endpoint.

Signed-off-by: baude <bbaude@redhat.com>
2019-05-08 13:12:08 -05:00
ba65301c95 podman-remote create|run
add the ability to create and run containers via the podman-remote
client.

we now create an intermediate layer from the the create/run cli flags.
the intermediate layer can be converted into a createconfig or into a
varlink struct.  Once transported, the varlink struct can be converted
back to an intermediate layer and then to a createconfig.

remote terminals are not supported yet.

Signed-off-by: baude <bbaude@redhat.com>
2019-04-08 09:05:31 -05:00
55e24c65ce Initialize field in InfoHost struct
Fixes #2016

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2019-03-11 07:30:32 -07: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
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
5c8e7ed0de enable podman-remote version
initial enablement of podman-remote version.  includes add a APIVersion const
that will allow us to check compatibility between host/client when connections
are made.

also added client related information to podman info.

Signed-off-by: baude <bbaude@redhat.com>
2019-01-21 15:23:30 -06:00
41fb81d074 Add ability to build golang remote client
Add the ability to build a remote client in golang that uses all
the same front-end cli code and output code. The initial limitations
here are that it can only be a local client while the bridge and
resolver code is being written for the golang varlink client.

Tests and docs will be added in subsequent PRs.

Signed-off-by: baude <bbaude@redhat.com>
2019-01-07 12:43:57 -06:00
b2fef1a8ba Fix setting of version information
It was setting the wrong variable (CamelCase)
in the wrong module ("main", not "libpod")...

Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
2018-10-31 00:27:08 +01:00
6db7027e97 Add buildah version and distribution to info
For the sake of debug and problem reporting, we would benefit from knowing
what buildah version was vendored into podman.  Also, knowing the distribution
and distribution version would also be handy.

Signed-off-by: baude <bbaude@redhat.com>
2018-09-28 10:48:16 -05:00
6f47eb0b28 add registry information to varlink info
when using the varlink api, we should pass on the registries information
as is present in the cli info command.

Signed-off-by: baude <bbaude@redhat.com>
2018-09-14 10:13:07 -05:00
d20f3a5146 switch projectatomic to containers
Need to get some small changes into libpod to pull back into buildah
to complete buildah transition.

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

Closes: #1270
Approved by: mheon
2018-08-16 17:12:36 +00:00
bd9d3a8fa5 Rename varlink socket and interface
io.projectatomic.podman -> io.podman

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

Closes: #1204
Approved by: mheon
2018-08-06 14:49:11 +00:00
a1e3e542ff Make one runtime for the varlink service
Rather than making a runtime each time a client hits a varlink endpoint, we now
make a single runtime when the varlink service starts up.  This fixes a problem
where we hit a max inotify limit from CNI.

Resolves: #1211

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

Closes: #1215
Approved by: rhatdan
2018-08-05 10:43:32 +00:00
834f1f641e varlink info
The varlinfo info returns the same information as podman info but always includes
the so-called debug information.

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

Closes: #745
Approved by: baude
2018-05-11 14:00:25 +00:00
21ebdb558c Allow streaming on some varlink container methods
The following methods should support streaming requests from the client:

* GetContainerLogs

A reference for a python stream implementation can be found here:

https://github.com/varlink/python/blob/master/varlink/tests/test_orgexamplemore.py#L29-L42

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

Closes: #724
Approved by: mheon
2018-05-08 15:44:38 +00:00
39a7a773a6 varlink images
implement varlink image functions for working with libpod with the exception of a
couple due to incompletions on the libpod side of things (build).

also, created a first pass at a libpodpy package which will stand as a client to
working with libpod's varlink methods using python.

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

Closes: #669
Approved by: baude
2018-04-26 19:14:44 +00:00
8493dba23c Initial varlink implementation
Signed-off-by: baude <bbaude@redhat.com>

Closes: #627
Approved by: mheon
2018-04-23 14:29:45 +00:00