890 Commits

Author SHA1 Message Date
8dfebd4607 varlink containers
first pass at adding in the container related endpoints/methods for the libpod
backend. Couple of important notes:

* endpoints that can use a console are not going to be done until we have "remote" console
* several of the container methods should probably be able to stream as opposed to a one-off return

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

Closes: #708
Approved by: baude
2018-05-03 17:31:33 +00:00
fae5033a01 Make podman commit to localhost rather then docker.io
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #715
Approved by: mheon
2018-05-03 13:12:46 +00:00
e6ec1aaffe Trivial refactor on volume addition
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #700
Approved by: rhatdan
2018-05-03 12:23:12 +00:00
6ebb90f951 When adding volumes to DB, handle nontrivial cases
We want to make sure we don't add anything but the host volume,
and the volumes can include options and container locations.

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #700
Approved by: rhatdan
2018-05-03 12:23:12 +00:00
dd569a91f4 Add accessors for new image fields in container config
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #700
Approved by: rhatdan
2018-05-03 12:23:12 +00:00
ab7e2a6956 Store user Volumes, Entrypoint, Command in database
We need these for commit, and they cannot be properly deduced
from just the OCI spec, so save them in the database so we can
retrieve them for commit.

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #700
Approved by: rhatdan
2018-05-03 12:23:12 +00:00
16c997de62 Further fix Godoc comments in options.go
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #700
Approved by: rhatdan
2018-05-03 12:23:12 +00:00
1ece5d3db7 Update hooks to use config bool to detect volume mounts
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #700
Approved by: rhatdan
2018-05-03 12:23:12 +00:00
7137ca81d9 Fix Godoc comments in options.go
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #700
Approved by: rhatdan
2018-05-03 12:23:12 +00:00
a0e8f88700 Add config bool to indicate there are user volumes
This allows us to accurately trigger OCI hooks that trigger on
the presence of volume mounts.

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #700
Approved by: rhatdan
2018-05-03 12:23:12 +00:00
f6d41abfb0 Print the Buildah comment from commit to given writer
Much better than unconditionally dumping to stdout

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #706
Approved by: rhatdan
2018-05-03 12:00:17 +00:00
25dc483f00 Do not print unnecessary Buildah details during commit
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #706
Approved by: rhatdan
2018-05-03 12:00:17 +00:00
64dc8039e9 remove options from create/run that we cannot support
Signed-off-by: baude <bbaude@redhat.com>

Closes: #711
Approved by: rhatdan
2018-05-02 18:54:14 +00:00
86e0c87a29 fix typos in the inspect json structs
Resolves: #633

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

Closes: #710
Approved by: rhatdan
2018-05-02 18:02:22 +00:00
03753712fc Fix podman logout --all flag
podman logout --all should remove cached credentials for all registries in
the auth.json file.
Before this, it was asking for a registry to be given with the --all flag also.

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

Closes: #712
Approved by: rhatdan
2018-05-02 16:55:31 +00:00
970eaf0033 podman should assign a host port to -p when omitted
If the user does not provide a host port when adding -p to create/run, podman should inject an available random port.

podman run -p 80 .... podman should assign a random port to the host and expose the container port 80 to it

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

Closes: #703
Approved by: rhatdan
2018-05-01 21:47:34 +00:00
e98ad5751d Vendor in latest buildah
Adds in --iidfile flag to podman build.

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

Closes: #707
Approved by: mheon
2018-05-01 20:23:45 +00:00
7a0a8552cb Fix misc stuff found by jhonce
During the python client implementation, jhonce found some return types
that needed correction as well as a panic related to history which is now
corrected.

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

Closes: #704
Approved by: rhatdan
2018-04-30 22:22:08 +00:00
2239093a63 libpod.conf: Podman's conmon path on openSUSE
Add the path to Podman's conmon for openSUSE and SLE.

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

Closes: #698
Approved by: mheon
2018-04-30 21:58:17 +00:00
40da888274 Add iidfile parame to build and commit man pages
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Closes: #693
Approved by: mheon
2018-04-30 21:31:46 +00:00
9924956dc8 do not commit default volumes from container
when performing a container commit, we should not add the default list of volumes
for a container to the resulting image.  it will cause the resulting image to crash
when run subsequently.

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

Closes: #699
Approved by: mheon
2018-04-30 21:07:59 +00:00
c8c39779a7 correct varlink command in service file
The struct of the varlink command changed to accept a URI
as input.  This was never updated in the service file

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

Closes: #691
Approved by: mheon
2018-04-30 20:45:33 +00:00
52ace66e76 Vendor in latest containers/image
Fixes podman pull to pull a public image even if $XDG_RUNTIME_DIR
does not exist for authentication. Public images don't require credentials
to access.

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

Closes: #701
Approved by: rhatdan
2018-04-30 20:22:29 +00:00
d5d6e68592 Make ':' a restricted character for file names
file names for podman load, save, export, and import cannot
contain ":" in them. It is a reserved character for parsing
filenames.

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

Closes: #694
Approved by: rhatdan
2018-04-30 19:58:22 +00:00
d1b03f470e Add more validation to --volume flag for run and create
Return error if the host and container  paths is a relative path.
Only absolute paths allowed.

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

Closes: #695
Approved by: rhatdan
2018-04-30 19:30:57 +00:00
9a2e267637 Fix libseccomp not working in travis
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #697
Approved by: mheon
2018-04-30 14:20:01 +00:00
eda0fd7468 CONTRIBUTING: Document PR approval and link to OWNERS
Remove a dead "Becoming a Maintainer" link and that stub section,
since libpod currently doesn't document that process.  By leaving it
undocumented, maintainer changes falls back to the usual pull-request
review process.

Signed-off-by: W. Trevor King <wking@tremily.us>

Closes: #688
Approved by: rhatdan
2018-04-28 07:45:30 +00:00
13290d65ba OWNERS: rename 'assignees' to 'approvers'
As CRI-O did in [1].  'assignees' is deprecated and 'approvers' is
effectively the same thing [2].

[1]: https://github.com/kubernetes-incubator/cri-o/pull/1103
[2]: https://github.com/kubernetes/test-infra/issues/3851

Signed-off-by: W. Trevor King <wking@tremily.us>

Closes: #688
Approved by: rhatdan
2018-04-28 07:45:30 +00:00
6774425872 Merge pull request #689 from mheon/bump_0_4_4
Bump to v0.4.4
2018-04-27 17:27:06 -04:00
d9cced240b Bump gitvalidation epoch
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-04-27 17:25:27 -04:00
d91b24e2eb Bump to v0.5.1-dev
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-04-27 17:24:46 -04:00
888927abaa Bump to v0.4.4
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
v0.4.4
2018-04-27 17:23:43 -04:00
a824186ac9 Use buildah commit and bud in podman
Vendor in buildah and use as much of commit and bug as possible for podman
build and commit.

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

Closes: #681
Approved by: mheon
2018-04-27 20:51:07 +00:00
4e468ce83d README: Link to CONTRIBUTING.md
Make that information more easily discoverable.  And since
CONTRIBUTING.md already mentions IRC, we can drop the IRC reference
from the README to DRY things up.

Also update CONTRIBUTING.md to replace the stale #cri-o reference left
over from the initial libpod/podman fork.  While I was touching this
line, I also shuffled some of the wording around to tighten that
sentence up.

Signed-off-by: W. Trevor King <wking@tremily.us>

Closes: #687
Approved by: rhatdan
2018-04-27 19:05:46 +00:00
93eb21d156 Remove systemd-cat support
- CI does not support systemd-cat

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

Closes: #683
Approved by: rhatdan
2018-04-27 14:11:13 +00:00
32db403b5e Refactor unittest for varlink component
- Allow unittest's to run as normal user
- Refactor tests to use unittest features
- Refactor tests to use fixtures to track resources
- Update test runner script to clean up on failure

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

Closes: #683
Approved by: rhatdan
2018-04-27 14:11:13 +00:00
37619de39a Update .gitignore for python work
Signed-off-by: Jhon Honce <jhonce@redhat.com>

Closes: #683
Approved by: rhatdan
2018-04-27 14:11:13 +00:00
51a5cdc636 Modify secrets pkg
Made a mistake in my earlier patch. I though that if you add an empty string
to an array, the length of the array would still be 0...
Realised this when vendoring the secrets pkg into cri-o.

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

Closes: #685
Approved by: mheon
2018-04-27 14:07:54 +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
0ccfd7dc20 Retrieve IP addresses for container from DB
Instead of execing out to the host's IP, use the IP address we
got back from CNI to populate Inspect's IP address information.

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

Closes: #680
Approved by: umohnani8
2018-04-26 17:26:13 +00:00
6ac8a24db4 Add --default-mounts-file hidden flag
The hidden flag is used to override the path of the default mounts file
for testing purposes.
Also modified the secrets pkg to allow for this override to happen.

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

Closes: #678
Approved by: mheon
2018-04-26 16:33:25 +00:00
d7d0e13837 Add isolation note to build man page
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Closes: #677
Approved by: rhatdan
2018-04-26 14:11:12 +00:00
99d180efcc Modify man pages so they compile correctly in mandb
This fixes an issue where if you did
man -k podman-run

podman-run (1)    - (unknown subject)

Now you will see

man -k podman-run
podman-run (1)       - Run a command in a new container

More importantly

man -k containers | grep podman
podman (1)           - Simple management tool for containers and images
podman-kill (1)      - Kills one or more containers with a signal
podman-pause (1)     - Pause one or more containers
podman-ps (1)        - Prints out information about containers
podman-rm (1)        - Remove one or more containers
podman-start (1)     - Start one or more containers
podman-stats (1)     - Display a live stream of 1 or more containers' resource usage statistics
podman-stop (1)      - Stop one or more containers
podman-unpause (1)   - Unpause one or more containers
podman-wait (1)      - Waits on one or more containers to stop and prints exit code

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

Closes: #676
Approved by: mheon
2018-04-26 13:46:14 +00:00
cc03743c0f Strip transport from image name when looking for local image
When a user pulls an image using a transport, like docker-daemon, we try to lookup
the new image in storage by the input name after the pull.  Because the input name
has a transport (different than local storage), that lookup would fail.

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

Closes: #644
Approved by: rhatdan
2018-04-26 11:17:47 +00:00
5973841f52 Merge pull request #674 from TomasTomecek/readme-fix-formatting
readme: improve formatting, add links
2018-04-26 07:17:05 -04:00
b3947e58f2 readme: improve formatting, add links
Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>
2018-04-26 07:41:16 +02:00
58cb8f742b updated epoch for bad dco
Signed-off-by: baude <bbaude@redhat.com>

Closes: #673
Approved by: mheon
2018-04-25 21:44:27 +00:00
57359619e8 Only generate the varlink glue code if needed and from the vendor dir
Closes: #671
Approved by: baude
2018-04-25 19:49:42 +00:00
d7acf72688 Latest revendoring deleted the cmd dir in varlink
Signed-off-by: baude <bbaude@redhat.com>

Closes: #672
Approved by: baude
2018-04-25 19:19:57 +00:00
aa247f950c Remove more Errorf in favor of Wrapf
Signed-off-by: Matthew Heon <mheon@redhat.com>

Closes: #668
Approved by: rhatdan
2018-04-25 18:34:55 +00:00