365 Commits

Author SHA1 Message Date
03cfe5ebbe Add authfile, cert-dir and creds params to build
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Closes: #280
Approved by: mheon
2018-02-01 14:43:54 +00:00
2dfd048545 Implment network == none
When network == none, the container should only have a
loopback interface and that's it.

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

Closes: #176
Approved by: baude
2018-01-31 21:47:07 +00:00
7f6a141839 libpod/runtime.go: Stick paths in arrays
To account for more path possibilities, we now iterate
a string array of possible paths to try and find paths
to runc and conmon.

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

Closes: #278
Approved by: baude
2018-01-31 20:23:36 +00:00
3c044f9267 Ginkgo Tests: ps, pull, push and rm
Migrate ps, pull, push, and rm from bats to ginkgo.

Also, fixed a conditional issue with adding ports
when an image defines the port and the user wants
to override it.

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

Closes: #277
Approved by: baude
2018-01-31 20:23:31 +00:00
ecb74aa406 libpod/runtime.go: runtime path
Ubuntu installs runc to /usr/sbin/runc so we now account
for that.  Also, added  small check when creating a new
runtime that if we cannot find the runc binary, we bail
out.

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

Closes: #276
Approved by: baude
2018-01-31 15:27:14 +00:00
b3f8eef8d8 docs/tutorials/podman_tutorial.md: Add Ubuntu
Adding in how to install and run podman on Ubuntu.

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

Closes: #275
Approved by: baude
2018-01-30 23:51:27 +00:00
f02d72fb76 libpod/container_api: Set hostname in ENV
The container's hostname should be set as an environment
variable for the container.

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

Closes: #273
Approved by: baude
2018-01-30 15:21:10 +00:00
4cb33035ce Migrate start, stats, stop to Ginkgo
Migrate the start, stats, and stop integration tests to the
Ginkgo style.

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

Closes: #274
Approved by: mheon
2018-01-30 10:40:00 +00:00
c60d8a0671 Add StopWithTimeout API function for containers
Normal Stop should not need a timeout, and should use the default
Add a function that does accept a timeout aside it

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

Closes: #272
Approved by: rhatdan
2018-01-30 05:02:12 +00:00
dd133a1ad2 Initial gingko work
This implements the ginkgo integration test framework for
podman.  As tests are migrated from bats to ginkgo, we will
still run both integration suites.  When a test is migrated,
we remove the tests from bats at that time.  All new tests
should be just for the ginkgo framework.

One exception is that we only run the ginkgo suit in the
travis/ubuntu environment.  The CentOS and Fedora PAPR nodes
will more than cover those.

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

Closes: #261
Approved by: baude
2018-01-29 19:12:20 +00:00
562a5dea57 Merge pull request #267 from mheon/remove_libkpod
Remove libkpod
2018-01-29 11:31:16 -05:00
099b5fb6f6 Ran spell checker through all man pages
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #269
Approved by: TomSweeneyRedHat
2018-01-29 15:21:34 +00:00
aa5798d28f Honor storage-driver flag
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-01-29 08:18:05 -05:00
d4d3f38018 Remove libkpod. Replace runtime generation function.
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-01-29 08:17:58 -05:00
cc5a6a3cb1 Merge pull request #266 from TomSweeneyRedHat/dev/tsweeney/installfix
Add containernetworking-cni to install reqs
2018-01-28 13:34:39 +01:00
eed32e3c57 Add containernetworking-cni to install reqs
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2018-01-27 11:14:18 -05:00
b96887bcaa Fix tab issue with --format flag
When the Go template was given with \t in between fields,
the \t was not being recognized as a tab.
Fixes that issue.

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

Closes: #265
Approved by: rhatdan
2018-01-27 08:25:54 +00:00
3aa63b2b94 Remove conmon, get package from CRI-O
conmon should not be built in two different places.
conmon is now a separate package in Fedora so we can just
add requires, for use on Ubuntu we can just require cri-o to
be installed.

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

Closes: #151
Approved by: mheon
2018-01-27 06:48:20 +00:00
fb58b87398 Strip unused format specifier
Signed-off-by: Matthew Heon <mheon@redhat.com>

Closes: #263
Approved by: umohnani8
2018-01-27 06:26:20 +00:00
36e6009f00 Close attach control file
From CRI-O #1288

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

Closes: #263
Approved by: umohnani8
2018-01-27 06:26:20 +00:00
e47fcdf170 Add results check and debug output in podman_stop
Add results check to make sure the container is not shows up after
it is stopped. And also add some debug lines to help to figure out
which step has problem if case failed.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>

Closes: #264
Approved by: rhatdan
2018-01-26 13:55:11 +00:00
50d4cd2868 Save --privileged state
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #255
Approved by: mheon
2018-01-25 04:30:15 +00:00
12e3d9d8a2 Fix podman stats based on QE feedback
QE found issues with formatting the go template and
the man page was lacking information.
Changed the format of the output to match latest docker.
Add shortID function that returns the truncated ID

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

Closes: #258
Approved by: rhatdan
2018-01-25 03:23:10 +00:00
4c7bab9812 Fixed Created At and Running For value
Changed the Created At value to match the format of docker ps
and fixed the value for Running For to reflect the time elapsed
since the container has been started. Initially it was showing
the time elapsed since the container was created.

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

Closes: #257
Approved by: rhatdan
2018-01-25 02:57:40 +00:00
49576a1fb1 Fix issue with order of flags
The order of the flags was casuing issue.
Enabled SkipArgReorder to fix the problem.

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

Closes: #259
Approved by: rhatdan
2018-01-25 02:28:07 +00:00
97f234190f Merge pull request #252 from baude/port
podman port
2018-01-24 21:24:54 +01:00
274908fd13 Merge pull request #251 from baude/psbatch
Use batched operations in ps
2018-01-23 21:15:02 -05:00
2803435624 Merge pull request #256 from baude/imageperf
Streamline image resolution
2018-01-23 21:12:28 -05:00
dd4e6920c2 Merge pull request #224 from ypu/import_test
Update podman_import test to use podman
2018-01-23 21:07:37 -05:00
49ec9b2e3e Streamline image resolution
When trying to determine if a user-provided string that describes
an image (ID, fq name, shortname, tagged), there were some
inefficiencies where we looked up images multiple times to derive
information about local images.

Signed-off-by: baude <bbaude@redhat.com>
2018-01-23 11:49:21 -06:00
b74e38b042 podman port
podman port reports the port mappings per container.  it can be used
to report the ports ofa single container or latest container or all
containers.

in the case of a single container, the user can add an option filter for
port and protocol.

Signed-off-by: baude <bbaude@redhat.com>
2018-01-23 08:54:57 -06:00
a03e040f0b libpod/oci.go: Perf issue
Matt Heon and I found that a defer statement was costing podman
run dearly.  We dont think the defer function was working (nor
needed) and was timing out as well.  Removing this defer statement
decreased podman runtime by 1.5s or more.

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

Closes: #253
Approved by: baude
2018-01-23 14:20:41 +00:00
cae415b91c Update podman_import test to use podman
Update the podman_import test to use podman run, and update the
check method for string check method.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
2018-01-23 13:58:16 +08:00
c04fb6c564 Use batched operations in ps
Because the podman ps command has to collection a lot of information
from various places, many of which are controlled by locks, it is a
good candidate for doing batch operations under a single lock.

Signed-off-by: baude <bbaude@redhat.com>
2018-01-22 14:31:50 -06:00
93765a9964 Fix issues with podman ps from QE
QE pointed out a few things missing/wrong with ps
This PR addresses those issues.
Added functionality for getting mounts and size also
Fixed a few issues with the --filter params, for
example filter with partial information.

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

Closes: #250
Approved by: rhatdan
2018-01-22 20:11:38 +00:00
e1c67e6c85 Expose ports from image
When an image has a port to expose, we need to expose it.  User's input overrides the
image's port information.

Also, enable port information in ps so we can see which random port is assigned.

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

Closes: #249
Approved by: rhatdan
2018-01-22 17:09:11 +00:00
5c3e4cfa62 Override hostname for container
Adds the ability to override the container's hostname.  Also, uses
the first twelve characters of the container ID as the default hostname
if none is provided.

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

Closes: #248
Approved by: baude
2018-01-21 17:24:49 +00:00
946b4ced54 Enable port bindings
Set up nbetworking ports for the following use cases:

* bind the same port between host and container
* bind a specific host port to a different container port
* bind a random host port to a specific container port

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

Closes: #214
Approved by: baude
2018-01-20 18:51:21 +00:00
67f06cf1cf Touchup build to add missing -q flag
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Closes: #247
Approved by: rhatdan
2018-01-20 05:41:24 +00:00
94000cc263 Add dns tests
In the dns commit, tests were accidently omitted due to a
rebase against master.

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

Closes: #245
Approved by: baude
2018-01-19 18:23:32 +00:00
70306466d0 Cleanup of podman stats
Fix errors when containers are not running.
--all, --latest, containers can not be used at same time.
Should match the output of docker stats, 0 values replaced by "--"
Should return stats right away if container is not running.

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

Closes: #244
Approved by: TomSweeneyRedHat
2018-01-19 17:00:15 +00:00
a4701b5631 Add --dns-search, --dns-opt, --dns-server and --add-host.
Each of these options are destructive in nature, meaning if the user
adds one of them, all current ones are removed from the produced
resolv.conf.

* dns-server allows the user to specify dns servers.
* dns-opt allows the user to specify special resolv.conf options
* dns-search allows the user to specify search domains

The add-host option is not destructive and truly just adds the host
to /etc/hosts.

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

Closes: #231
Approved by: mheon
2018-01-19 15:42:25 +00:00
1710acd18a Set NOTEST variable to skip tests in papr
The papr test with ansible is really handy for setting up test nodes.  However,
most of the time you want to run the tests manually, specifically the integration
tests.  Passing NOTEST=1 will allow you to skip gofmt, lint, and friends and will
exit before the integration tests.

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

Closes: #242
Approved by: mheon
2018-01-19 14:56:30 +00:00
8657d70e72 Touchup README.md and fix whitespace issues
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Closes: #243
Approved by: mheon
2018-01-19 01:12:40 +00:00
f773605821 Merge pull request #240 from mheon/refactor_container
Refactor container.go
2018-01-18 15:23:53 -05:00
858116f648 Merge pull request #216 from rhatdan/docker
Add support for mimicing docker CLI
2018-01-18 14:51:46 -05:00
dd2ba36ed3 Merge pull request #230 from TomSweeneyRedHat/dev/tsweeney/readme
Slim down README.md and make tutorials page
2018-01-18 14:49:09 -05:00
05317d8f91 Fix output for created containers
Created containers that haven't hit runc yet should still
be considered created (not dead).

Also, fixed loop for deleting containers as leftover code
still exited there that prevented proper deletion of containers
that could be deleted.

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

Closes: #238
Approved by: rhatdan
2018-01-18 18:32:10 +00:00
1d7884b9a4 Fix test syntax
Remove the use of bash -c unless it involves a bash pipe. Also, use
run test_runner.sh inside script so that centos can be happy.

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

Closes: #239
Approved by: baude
2018-01-18 17:53:36 +00:00
ae2ffc31d3 Fix gofmt
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-01-18 11:59:38 -05:00