302 Commits

Author SHA1 Message Date
aa20a25ca0 Address review comments
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #229
Approved by: rhatdan
2018-01-17 15:26:43 +00:00
b814a94c34 Wire in logic for selecting backing state impl
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #229
Approved by: rhatdan
2018-01-17 15:26:43 +00:00
5696dfef6e Do no lint test helpers
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #229
Approved by: rhatdan
2018-01-17 15:26:43 +00:00
67b6c132d8 Modify unit tests for state to run on all state implementations
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #229
Approved by: rhatdan
2018-01-17 15:26:43 +00:00
65d643caeb Change handling for pods in libpod state
Add new functions to update pods and add/remove containers from them
Use these new functions in place of manually modifying pods

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

Closes: #229
Approved by: rhatdan
2018-01-17 15:26:43 +00:00
13f004aec5 Add ability to retrieve a pod's container from the state
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #229
Approved by: rhatdan
2018-01-17 15:26:43 +00:00
1735598d12 Add check for successful imageData call
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #234
Approved by: baude
2018-01-17 14:49:23 +00:00
d4e4878ec3 Remove --storage-opt from podman run/create
podman command has storage options as a global option,
these should be set there, rather then in the create and
run commands.

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

Closes: #234
Approved by: baude
2018-01-17 14:49:23 +00:00
f77bd95426 test/podman_networking.bats: kpod to podman
this test was still referring to KPOD_BINARY and not podman

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

Closes: #235
Approved by: baude
2018-01-17 01:44:36 +00:00
0985fce12a switch to bats-core
it seems the original bats project is deprecated and bats-core
is an active fork of it.  we dont have packages in distributions
but will build from source.

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

Closes: #232
Approved by: baude
2018-01-16 22:08:07 +00:00
0bc31724dc Ensure batched containers have locks
This won't matter during batched operatins, but if the container
leaks outside of the Batch() function it will segfault if asked
to do any operation that locks unless this is applied

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

Closes: #226
Approved by: rhatdan
2018-01-16 15:43:08 +00:00
4d70a6997c Minor change to --net parsing
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #220
Approved by: rhatdan
2018-01-16 14:58:06 +00:00
3cd647ccf6 Disable interfacer linter
I have not yet seen a useful warning produced by this one

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

Closes: #220
Approved by: rhatdan
2018-01-16 14:58:06 +00:00
a23dd7a789 Fix lint issues
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #220
Approved by: rhatdan
2018-01-16 14:58:06 +00:00
d90355ebe8 Prevent containers with dependencies from being removed
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #220
Approved by: rhatdan
2018-01-16 14:58:06 +00:00
20df2196f2 Add ability for states to track container dependencies
Also prevent containers with dependencies from being removed from
in memory states. SQLite already enforced this via FOREIGN KEY
constraints.

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

Closes: #220
Approved by: rhatdan
2018-01-16 14:58:06 +00:00
d2ec1f7628 Add API for sharing namespaces
Remove existing code for sharing namespaces and replace with use
of this API

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

Closes: #220
Approved by: rhatdan
2018-01-16 14:58:06 +00:00
2ac4192bd3 Add support for shared CGroup namespaces
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #220
Approved by: rhatdan
2018-01-16 14:58:06 +00:00
fe0e1cd11b Add support for joining shared namespaces in libpod
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #220
Approved by: rhatdan
2018-01-16 14:58:06 +00:00
333f664da7 When performing state-changing operations, don't exec runtime
If we start a container and it does not error, we can assume the
container is now running. Subsequent API calls will sync for us
to see if it died, so we can just set ContainerStateRunning
instead of launching the runtime to explicitly get state.

The same logic applies to pause and unpause.

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

Closes: #223
Approved by: rhatdan
2018-01-16 14:32:38 +00:00
a7ad6e75ab Make --net alias to --network
A compatibility option of --net should alias the --network
option.  The --net option will only override --network if
--network is not explicitly set and --net is.  Both default
to 'bridge'.

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

Closes: #228
Approved by: mheon
2018-01-15 21:17:59 +00:00
2e48c60bc5 Add DNS and security fields to DB
Also moves port mappings out of the SQL DB and into a file on
disk. These could get very sizable (hundred to thousands of
ports) so moving them out to a file will keep the DB small and
fast.

Finally, add a foreign key reference from container ID to
container state ID. This ensures we never get into an
inconsistent state where we have data in one table but not the
other.

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

Closes: #225
Approved by: baude
2018-01-15 19:50:59 +00:00
2bfb31ddf4 Implement and test the following flags for podman run and create
memory, memory-reservation, memory-swap, memory-swappiness, kernel-memory,
cpu-period, cou-quota, cpu-shares, cpus, cpuset-cpus, cpuset-mems,
blkio-weight, blkio-weight-device, sysctl, and ulimit

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

Closes: #221
Approved by: mheon
2018-01-15 19:27:10 +00:00
7853262a84 Fix gofmt
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #222
Approved by: rhatdan
2018-01-14 12:27:33 +00:00
3ab8eb2e9b Add Sync() function to updating ctr state in Batch()
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #222
Approved by: rhatdan
2018-01-14 12:27:33 +00:00
149640a4c8 Disable locking on functions in batch operations
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #222
Approved by: rhatdan
2018-01-14 12:27:33 +00:00
5599b64e72 Add initial function batching API
Disabling locking/syncing in a batched operation not yet implemented

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

Closes: #222
Approved by: rhatdan
2018-01-14 12:27:33 +00:00
9c5a42eb1f Remove unused fields from runtime config
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #212
Approved by: rhatdan
2018-01-12 17:01:36 +00:00
6e8100cf2e Merge pull request #211 from mheon/wireup_backends
Wire up API for CGroup Parent
2018-01-12 12:01:34 -05:00
198c91c2ea Merge pull request #219 from baude/gitvalidation
update gitvalidation epoch
2018-01-12 10:25:52 -05:00
3783c3fe21 Merge pull request #215 from mheon/update_cni
Update OCICNI vendor and plugin directories
2018-01-12 10:14:44 -05:00
378bed4869 Merge pull request #213 from baude/unitTestsSpec
Test user input to spec
2018-01-12 10:14:04 -05:00
77aa1bcaed Merge pull request #217 from mheon/remove_storage_pkg
Remove unused pkg/storage code
2018-01-12 10:13:36 -05:00
3eca5cd4ca update gitvalidation epoch
updating the gitvalidation epoch to speed up
git validations.

Signed-off-by: baude <bbaude@redhat.com>
2018-01-12 08:45:50 -06:00
af3df2842c Test user input to spec
Create a mocked CLI instance so we can test that user-input
functions to run (create) end up in the spec correctly.  It will
also help protect against regression include type changes.

We can decide if we want to test items one at a time or several
at a time.

Signed-off-by: baude <bbaude@redhat.com>
2018-01-11 18:42:54 -06:00
0e52d43962 Remove unused pkg/storage code
This code was refactored into libpod, so no need to keep the old
version around

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-01-11 18:44:05 -05:00
9adcb85929 podman run container id to file
podman run --cidfile /tmp/foo writes the container's id
to a file.

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

Closes: #205
Approved by: rhatdan
2018-01-11 21:27:26 +00:00
240e5789d4 Update CNI plugin directories to search default location as well
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-01-11 10:10:46 -05:00
5bc4d1d315 Fix build error after updating CNI vendor
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-01-11 10:03:16 -05:00
444afa65c5 Upgrade OCICNI vendor
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-01-11 10:00:01 -05:00
dd0d35deb0 Add support for shm-size.
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #206
Approved by: TomSweeneyRedHat
2018-01-11 12:39:06 +00:00
04e0687da1 Add ability to set CGroup Parent via API
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-01-10 16:21:54 -05:00
e6be800ec6 Update DB to add new fields required for planned features
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #209
Approved by: rhatdan
2018-01-10 20:16:21 +00:00
f0843e94cf Default to always copyup the underlying directory on top of tmpfs mounts
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #204
Approved by: mheon
2018-01-10 19:14:07 +00:00
6aae4a4da0 Turn on travis bot
Signed-off-by: baude <bbaude@redhat.com>

Closes: #208
Approved by: mheon
2018-01-10 18:23:26 +00:00
c1b2278a53 Podman tutorial
How to build, install, and use podman on Fedora.  The ubuntu instructions
are currently commented out due to issue #166.

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

Closes: #170
Approved by: baude
2018-01-10 14:07:43 +00:00
514bf4a813 Fix typo in label field option
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #203
Approved by: rhatdan
2018-01-10 12:08:58 +00:00
245a338f5a Add latest to wait
It is desirable to have a --latest switch on the podman wait
command so we can wait on the latest container created to end.

Also, fixes a panic with latest where no containers are available.

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

Closes: #201
Approved by: baude
2018-01-08 22:44:38 +00:00
da7556de4a Fix merge issues
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #189
Approved by: mheon
2018-01-08 20:48:31 +00:00
2188167909 Remove vendored files unnecessary after Kube hostport removal
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #189
Approved by: mheon
2018-01-08 20:48:31 +00:00