460 Commits

Author SHA1 Message Date
f2041b51f3 Add FFJSON encoding/decoding for our container structs
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #323
Approved by: mheon
2018-02-16 16:46:09 +00:00
445aaf87fa images --all developer note
podman does not implement --all for images

intermediate images are only generated during the build process.  they are
children to the image once built. until buildah supports caching builds,
it will not generate these intermediate images.

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

Closes: #344
Approved by: rhatdan
2018-02-16 16:08:08 +00:00
57b910a031 Add podman version
Copy the way cri-o does this by adding a libpod/version
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #343
Approved by: mheon
2018-02-15 20:13:08 +00:00
ab88304162 Touch up tutorial location and install reqs
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Closes: #337
Approved by: rhatdan
2018-02-15 19:51:46 +00:00
a67fdeaf0d No registries warning
When no /etc/containers/registries.conf is found, log a warning message.

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

Closes: #338
Approved by: mheon
2018-02-15 19:17:37 +00:00
409ed259c6 Return imageid from podman pull
When using podman to pull an image, print the image id after
the image is pulled.

Resolves issue #329

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

Closes: #342
Approved by: rhatdan
2018-02-15 17:18:08 +00:00
ce7a0171d1 Squash logged errors from failed SQL rollbacks
Currently we unconditionally roll back transactions after error,
even if a commit has already been attempted. Commit is guaranteed
to end a transaction, though, whether by successfully committing
or by rolling back if that fails. As such, we attempt a double
rollback if a transaction fails at commit (for example, for a
constraint violation), which doesn't error but does log angry
warning messages. Ensure we don't try rolling back after commit
runs to prevent this.

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

Closes: #327
Approved by: rhatdan
2018-02-15 15:47:59 +00:00
e814936915 No entrpoint, cmd, or command
When an image does not have an ENTRYPOINT nor a CMD and the
user does not provide a command in the CLI, we should fail
gracefully.

This resolves issue #328

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

Closes: #333
Approved by: mheon
2018-02-15 00:48:13 +00:00
be9ed1cfac Privileged containers should inherit host devices
When running a privileged container, it should inherit the same
devices the host has.

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

Closes: #330
Approved by: mheon
2018-02-15 00:20:47 +00:00
d051dc38d8 Bump podman version to match release version
Signed-off-by: baude <bbaude@redhat.com>

Closes: #331
Approved by: baude
2018-02-14 22:03:26 +00:00
d3b432a06c Add copr deps
The COPR spec needs to require:
* atomic-registries
* iptables
* containernetworking-cni

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

Closes: #332
Approved by: baude
2018-02-14 22:02:51 +00:00
4fa341e56a PS performance cleanups
By not getting data that we don't need and adding more locking
functions under the batch, we are able to cut the time for listing
50 containers in half.  More to come.

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

Closes: #325
Approved by: mheon
2018-02-14 15:18:43 +00:00
4a39327bc5 Disable default Seccomp profile with privileged containers
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #326
Approved by: baude
2018-02-13 19:42:07 +00:00
35e1ad78fb Make libpod build on 32-bit systems
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #324
Approved by: rhatdan
2018-02-13 15:39:07 +00:00
3d0100bb44 Address review comment
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #184
Approved by: baude
v0.2
2018-02-12 14:28:07 +00:00
de737c150a Add buckets for all containers and all pods
Now, we don't need to use the global ID registry to iterate - we
can iterate only through containers or only through pods, without
having to iterate through both.

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

Closes: #184
Approved by: baude
2018-02-12 14:28:07 +00:00
dc6a99df4c Containers in a pod can only join namespaces in that pod
This solves some dependency problems in the state, and makes
sense from a design standpoint.

Containers not in a pod can still depend on the namespaces of
containers joined to a pod, which we might also want to change in
the future.

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

Closes: #184
Approved by: baude
2018-02-12 14:28:07 +00:00
3962d10bd4 Fix gofmt and lint
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #184
Approved by: baude
2018-02-12 14:28:07 +00:00
a7889f8d6a Check error when checking ctr dependencies
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #184
Approved by: baude
2018-02-12 14:28:07 +00:00
4f225b47c9 Refactor Pod to use a Config struct
This allows us to JSON it and stuff it in the DB - previously,
all pod fields were private, so JSON couldn't encode them. This
allows us to keep all pod fields private by having a substruct
with public fields.

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

Closes: #184
Approved by: baude
2018-02-12 14:28:07 +00:00
aa85ae212e Add pod functions to BoltDB state
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #184
Approved by: baude
2018-02-12 14:28:07 +00:00
363a82e668 Add pod buckets
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #184
Approved by: baude
2018-02-12 14:28:07 +00:00
b4cdc27b31 Add implementation for BoltDB-backed state
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #184
Approved by: baude
2018-02-12 14:28:07 +00:00
2e96acf300 Change json to match docker inspect
Changing these fields caused the output of podman inspect to more
closely match docker inspect.

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

Closes: #306
Approved by: mheon
2018-02-11 11:50:34 +00:00
d26266659d Honor ENTRYPOINT in image
When an image has an ENTRYPOINT defined, we should be honoring it. The
problem is described in issue #321.

Also, added buildah binary to test runtimes for testing entrypoint and
will also allow us to test podman build as well.

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

Closes: #322
Approved by: rhatdan
2018-02-11 10:21:46 +00:00
773aa61f66 Revert to md2man master
Upstream md2man is working again.  We can revert to using it instead
of a specific commit id.

Also, add make integration.CentOS for testing

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

Closes: #320
Approved by: rhatdan
2018-02-10 11:24:16 +00:00
b07c8d6a73 Fix libpod to use given CGroup parent instead of a hardcoded one
Signed-off-by: Matthew Heon <mheon@redhat.com>

Closes: #319
Approved by: TomSweeneyRedHat
2018-02-09 20:11:07 +00:00
4ea26aace4 libpod/finished_amd64.go -> libpod/finished64.go
Rename finished_amd64 to finished64.go to more accurately reflect
that it covers all 64bit arches.

Also, bumped the EPOCH for gitvalidation to speed up validations.

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

Closes: #318
Approved by: mheon
2018-02-09 17:00:04 +00:00
a8092a105b Rework port code
Rework port code for generalized clean up and to address
issue #269 where additional portbindings between host
and containers we being introduced by error.

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

Closes: #308
Approved by: mheon
2018-02-09 16:13:20 +00:00
fa9658cbfa podman logs: fix tailing
Fix issues with tailing of container logs as described
in issue #16.  Also add in the ability to use a duration or
known time stamp formats for the --since flag.

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

Closes: #317
Approved by: mheon
2018-02-09 15:27:52 +00:00
75914199f3 Fix further style issues
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #268
Approved by: rhatdan
2018-02-09 15:01:34 +00:00
c8e296c83e Allow removing pods with running containers if --force is given
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #268
Approved by: rhatdan
2018-02-09 15:01:34 +00:00
9e6855f348 Address style issues in in_memory_state
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #268
Approved by: rhatdan
2018-02-09 15:01:34 +00:00
86d549f2cd Fix gofmt and lint
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #268
Approved by: rhatdan
2018-02-09 15:01:34 +00:00
19840e0b3d Finish unit tests for pods
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #268
Approved by: rhatdan
2018-02-09 15:01:34 +00:00
cb28a1d284 Fix bugs identified by unit tests
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #268
Approved by: rhatdan
2018-02-09 15:01:34 +00:00
4bc9a6d633 HACK: monkey-patch gosqlite3 to rollback unconditionally after tx error
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #268
Approved by: rhatdan
2018-02-09 15:01:34 +00:00
4ecebf20b4 Rework state tests to avoid boilerplate. Begin adding pod tests.
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #268
Approved by: rhatdan
2018-02-09 15:01:34 +00:00
0920e8de5a Unify Pod and Container ID and Name registries for in-memory state
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #268
Approved by: rhatdan
2018-02-09 15:01:34 +00:00
044139dca9 Remove read-only from DB, it's in the spec
Don't need to store it separately

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

Closes: #268
Approved by: rhatdan
2018-02-09 15:01:34 +00:00
6b7b4b03a8 Add pod removal code
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #268
Approved by: rhatdan
2018-02-09 15:01:34 +00:00
cfd6da22df Implement pod operations in SQL state
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #268
Approved by: rhatdan
2018-02-09 15:01:34 +00:00
6214be07c2 Tear out pod containers map. Instead rely on state
This ensures that there is only one canonical place where
containers in a pod are stored, in the state itself.

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

Closes: #268
Approved by: rhatdan
2018-02-09 15:01:34 +00:00
bf981fc873 Update pause tests per QE suggestions and move to gingko
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Closes: #285
Approved by: mheon
2018-02-08 22:14:36 +00:00
9e3a5da69d Add some global options to build
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Closes: #312
Approved by: mheon
2018-02-08 20:17:17 +00:00
250ec9adc2 Merge pull request #316 from baude/copr3
Spec file changes for COPR
2018-02-08 13:53:45 -06:00
401953ed82 Spec file changes for COPR
COPR needed slight tweaks to our spec file.

Signed-off-by: baude <bbaude@redhat.com>
2018-02-08 13:52:41 -06:00
7ef886fe34 Merge pull request #315 from baude/copr2
COPR setup
2018-02-08 13:40:03 -06:00
7092d2d40d COPR setup
Changing the spec file location and adding a COPR Makefile
so the package can get a dynamic name.

Signed-off-by: baude <bbaude@redhat.com>
2018-02-08 13:38:41 -06:00
851bdc3251 Merge pull request #314 from baude/ginkgo_last
Final ginkgo migration
2018-02-08 14:19:58 -05:00