21092 Commits

Author SHA1 Message Date
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
5c5c024e80 Remove Kubernetes hostport support
This can now be handled by CNI plugins, so let them manage ports
instead.

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

Closes: #189
Approved by: mheon
2018-01-08 20:48:31 +00:00
c246b9d24f Shortname deletion continued
With certain short name usages, rmi still was unable to delete
certain images. This was also reflected in several commit tests
that were temporarily disabled.

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

Closes: #200
Approved by: rhatdan
2018-01-08 20:12:20 +00:00
3d05f100f7 Save ContainerConfig.User to database
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #194
Approved by: rhatdan
2018-01-08 19:34:21 +00:00
7b08aa78e4 Shortcut for most recent container
It is desirable to have a shortcut for the most
recently created container.  We can now use "**latest"
to represent the most recent container instead of its
container ID or name.  For example:

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

Closes: #179
Approved by: baude
2018-01-08 19:12:17 +00:00
6baf6e461d Clean up network namespaces on container removal
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #197
Approved by: rhatdan
2018-01-08 18:45:17 +00:00
6847636c30 Remove by shortname
Removing by shortname was not working.  Also pruned
container storage's remove func from rmi and moved it into
an image.Remove func, which consolidates our usage of cs.

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

Closes: #188
Approved by: baude
2018-01-08 18:15:55 +00:00
f881a8d17c Add basic network inspection info
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #196
Approved by: rhatdan
2018-01-08 16:12:50 +00:00
d0fb2e48e5 Don't pull cached images
In our tests, each test instance is already seeded with images.  In that case,
we do not need to pull down an image that is already seeded.

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

Closes: #191
Approved by: baude
2018-01-08 15:44:49 +00:00
e2616d9acf Touchup rmi manpage
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Closes: #195
Approved by: rhatdan
2018-01-08 14:34:13 +00:00
69a415f033 cni: 98-podman-loopback.conf is not needed
ocicni internally handles the loopback so this file is not required.

Signed-off-by: Dan Williams <dcbw@redhat.com>

Closes: #193
Approved by: mheon
2018-01-08 14:10:51 +00:00