7982 Commits

Author SHA1 Message Date
d8f099bb5a Check for mutually exclusive flags
Error out if more than one mutually exclusive flags are passed
in to kpod ps

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

Closes: #128
Approved by: rhatdan
2017-12-14 14:14:34 +00:00
05f4dd9f41 Clear up fragments of the old api
As everything is being moved over to the new container api
removing files that depended on the old api

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

Closes: #116
Approved by: rhatdan
2017-12-14 13:56:20 +00:00
900afc929f Handle artifacts not found more gracefully
If the artifacts file "create-config" is not found
when doing kpod inspect, just print the error and
move on to print out the rest of the inspect info

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

Closes: #134
Approved by: mheon
2017-12-14 01:29:48 +00:00
f820309413 Copy resolv.conf into container
For DNS to work properly, we need to copy the host's /etc/resolv.conf
into the container during Init().  We do this by copying it into the
containers rundir and then bind mounting it into the container.

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

Closes: #130
Approved by: baude
2017-12-14 01:12:10 +00:00
5330d3da7c Update kpod info to use new libpod api
Signed-off-by: umohnani8 <umohnani@redhat.com>

Closes: #124
Approved by: mheon
2017-12-14 00:54:21 +00:00
40f01d56ab .papr.yml
Add CNI networking packages to our test hosts. Also
upgrade to f27 where possible

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

Closes: #127
Approved by: baude
2017-12-13 21:38:36 +00:00
9cc0c8ae14 kpod stats
Move kpod stats to the libpod backend.

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

Closes: #113
Approved by: baude
2017-12-13 21:15:09 +00:00
61f606e192 Add fix_gofmt target
fix_gofmt will run gofmt -s -w on files that need to be
formatted.  Useful for developers prior to checking code
in.

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

Closes: #125
Approved by: baude
2017-12-13 20:52:51 +00:00
4db4947661 selinux issues
Signed-off-by: baude <bbaude@redhat.com>

Closes: #133
Approved by: rhatdan
2017-12-13 20:10:48 +00:00
e456c07813 Merge pull request #106 from umohnani8/kpod_inspect
Update kpod inspect to use the new container state
2017-12-13 09:36:14 -05:00
cfb4e15e43 \t was not being recognized as tab in --format
When doing kpod images --format "{{.ID}}\t{{.Tag}}"
the "\t" was being passed in as a string of "\" and "t"
instead of as a tab character.

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

Closes: #123
Approved by: rhatdan
2017-12-12 21:53:53 +00:00
39b697d9af document missing commands between docker and kpod
The list was incomplete. Some commands implemented in both were
missing from the main table. We also add a list of commands
implemented only in Docker, and only in kpod.

Signed-off-by: Antoine Beaupré <anarcat@debian.org>

Closes: #122
Approved by: mheon
2017-12-12 15:03:05 +00:00
74ee579375 Update kpod inspect to use the new container state
kpod inspect now uses the new libpod container state
and closely matches the output of docker inspect
some aspects of it are still WIP as the libpod container state
is still being worked on

Signed-off-by: umohnani8 <umohnani@redhat.com>
2017-12-12 09:46:23 -05:00
88121e0747 We don't support VolumesFrom or links
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #118
Approved by: mheon
2017-12-12 14:24:13 +00:00
7f5aa42de0 Remove tutorial link from README.md
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Closes: #120
Approved by: rhatdan
2017-12-12 14:23:15 +00:00
f38e2d0cd2 Merge pull request #103 from surajssd/fix-debug-statement
Use debugf to allow parsing of format specifier
2017-12-11 14:03:21 -06:00
e64da85ccb Use debugf to allow parsing of format specifier
Signed-off-by: Suraj Deshmukh <surajd.service@gmail.com>
2017-12-12 00:13:44 +05:30
b85d0fa4ea Merge pull request #112 from umohnani8/kpod_load
Fix misleading print statement in kpod load
2017-12-11 13:12:43 -05:00
622d5e3b9a Fix misleading print statement in kpod load
When loading an image, kpod load would print something like
"Trying to pull docker.io/library/alpine...", which is misleading
and makes it sound like its pulling it form the registry.
Fixed this by removing these print statements for kpod load

Signed-off-by: umohnani8 <umohnani@redhat.com>
2017-12-11 12:07:54 -05:00
12682aa475 Merge pull request #72 from mheon/file_locking
Move containers to file locks from c/storage
2017-12-11 10:48:29 -06:00
62e19beeec Merge pull request #94 from mheon/restart
Add handling for system restart in libpod
2017-12-11 10:47:50 -06:00
915410aaff Merge pull request #111 from mheon/crio_1206
Carry CRI-O #1206 to fix a potential runtime issue
2017-12-11 10:44:57 -06:00
7e179b6ddb Merge pull request #115 from umohnani8/containers
Vendor in latest upstream containers/image
2017-12-11 10:42:36 -06:00
0e328de08d Merge pull request #93 from baude/kpod_exec
kpod exec
2017-12-11 10:41:58 -06:00
eaf4d6c8c2 Vendor in latest upstream containers/image
Signed-off-by: umohnani8 <umohnani@redhat.com>
2017-12-11 09:51:34 -05:00
e8a32e3722 kpod exec
Initial wiring of kpod exec. We wont support the following options
for exec:

* detach -- unsure of use case
* detach-keys -- not supported by runc
* interactive -- all terminals will be interactive

Not adding exec tests as we need to think about how to support a
test that requires console access but our CI tests have no console.

Signed-off-by: baude <bbaude@redhat.com>
2017-12-11 08:24:30 -06:00
00df767a99 Carry CRI-O #1206 to fix a potential runtime issue
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2017-12-07 14:44:21 -05:00
8d31ec2ad7 Add Artifacts directory to containers
Create an artifacts directory in the container's
static directory so store container information
coming from outside of libpod to specified files
An example is to hold data from user specified flags
in kpod run/create such as --cap-add, --ipcMode, etc...

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

Closes: #108
Approved by: mheon
2017-12-07 18:45:54 +00:00
b71cde19c8 Add ability to refresh state in DB
Also, ensure we always recreate runtime spec so our net namespace
paths will be correct

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2017-12-07 13:15:34 -05:00
b66287689a Do not recreate containers in runc after restart
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2017-12-06 11:15:17 -05:00
190b05209f Small comment update to make use of syncContainer more obvious
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2017-12-05 19:02:32 -05:00
70da705c36 Remove check for existance of lockfile when retrieving containers
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2017-12-05 10:04:59 -05:00
4d02d99c27 Fix reference to libkpod to libpod
ps.go no longer uses libkpod

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

Closes: #104
Approved by: mheon
2017-12-05 14:54:30 +00:00
ceb7fb1c60 Do not recreate OCI spec in init() if it exists
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2017-12-05 09:30:51 -05:00
34696c55e9 Add Linux Root Propagation to kpod create and run
Add [r]shared, [r]private, [r]slave functionality to the --volume flag
for kpod create and kpod run
This sets the root propagation for each bind mount

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

Closes: #87
Approved by: rhatdan
2017-12-05 10:23:13 +00:00
c5c7341d4b Prune kpod ps
Prune libkpod from kpod ps.  Remove unused functions.

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

Closes: #102
Approved by: rhatdan
2017-12-05 10:20:09 +00:00
9147a56a01 Remove kpod rename
Libpod containers are immutable once created. They cannot be
renamed after created. As such remove kpod rename.

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

Closes: #101
Approved by: baude
2017-12-04 23:48:22 +00:00
3db735c6d1 Short options!
Any subcommand that has two or more booleon short options can
now combine those two options.  For example:

kpod rmi -af (Remove all images forceably)

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

Closes: #100
Approved by: rhatdan
2017-12-04 20:03:16 +00:00
265efcb9f8 Vendor in latest urfave/cli
The latest urfave/cli has the ability for us
to use short options when it is a bool.

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

Closes: #100
Approved by: rhatdan
2017-12-04 20:03:16 +00:00
92bc448624 Fix potential race condition in initializing libpod
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2017-12-04 14:45:49 -05:00
ae5aac50aa Add handling for system restart in libpod
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2017-12-04 14:29:59 -05:00
eb942b1b47 Fix lint
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2017-12-04 14:18:48 -05:00
43c51c58ad Fix unit tests and provide more realistic test environment
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2017-12-04 13:40:27 -05:00
e9298a533a Remove SQL state locking and rely on sqlite locking
Also renames some parameters from locksDir -> lockDir for
consistency.

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2017-12-04 13:40:27 -05:00
abfd18b0db Move containers to file locks from c/storage
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2017-12-04 13:39:44 -05:00
750fc239b5 Consolidate mount logic
There are still two places that don't use the new function,
export and mount, but both can probably be converted to it
in the future.

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

Closes: #99
Approved by: rhatdan
2017-12-04 18:10:52 +00:00
1f482c9f1f You can only attach to running containers
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #98
Approved by: mheon
2017-12-04 17:53:23 +00:00
95cb7a11f1 kpod create should not do an OCI Init
We need to differentiate between a kpod create and a kpod start
kpod create should create all of the data for libpod, but kpod start should
generate content for OCI Runtime (runc) in order to run.

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

Closes: #96
Approved by: mheon
2017-12-04 17:35:14 +00:00
55c8b69d8f When shutting down the runtime we should always close the database
Even if the storage fails to shutdown. This patch fixes on TODO.

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

Closes: #97
Approved by: mheon
2017-12-04 17:17:06 +00:00
5c9694a0c1 kpod attach
Attach to a running container

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

Closes: #95
Approved by: rhatdan
2017-12-04 17:00:48 +00:00