Commit graph

217 commits

Author SHA1 Message Date
Daniel J Walsh 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
Suraj Deshmukh 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
Matthew Heon b85d0fa4ea
Merge pull request #112 from umohnani8/kpod_load
Fix misleading print statement in kpod load
2017-12-11 13:12:43 -05:00
umohnani8 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
Daniel J Walsh 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
Daniel J Walsh 62e19beeec
Merge pull request #94 from mheon/restart
Add handling for system restart in libpod
2017-12-11 10:47:50 -06:00
Daniel J Walsh 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
Daniel J Walsh 7e179b6ddb
Merge pull request #115 from umohnani8/containers
Vendor in latest upstream containers/image
2017-12-11 10:42:36 -06:00
Daniel J Walsh 0e328de08d
Merge pull request #93 from baude/kpod_exec
kpod exec
2017-12-11 10:41:58 -06:00
umohnani8 eaf4d6c8c2 Vendor in latest upstream containers/image
Signed-off-by: umohnani8 <umohnani@redhat.com>
2017-12-11 09:51:34 -05:00
baude 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
Matthew Heon 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
umohnani8 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
Matthew Heon 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
Matthew Heon 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
Matthew Heon 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
Matthew Heon 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
Daniel J Walsh 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
Matthew Heon 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
umohnani8 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
baude 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
Matthew Heon 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
baude 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
baude 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
Matthew Heon 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
Matthew Heon 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
Matthew Heon eb942b1b47 Fix lint
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2017-12-04 14:18:48 -05:00
Matthew Heon 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
Matthew Heon 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
Matthew Heon 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
Matthew Heon 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
Daniel J Walsh 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
Daniel J Walsh 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
Daniel J Walsh 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
baude 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
Daniel J Walsh adf8809521 Add NetMode, UTSMode and IPCMode
Allow kpod create/run to create contianers in different network namespaces, uts namespaces and
IPC Namespaces.

This patch just handles the simple join the host, or another containers namespaces.

Lots more work needed to full integrate  --net

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

Closes: #64
Approved by: mheon
2017-12-02 15:32:56 +00:00
baude 1f01faf437 kpod stop -a
Stop all running containers with single switch.  Useful for
maintainence of a system or integration tests.

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

Closes: #90
Approved by: rhatdan
2017-12-01 13:18:32 +00:00
Matthew Heon 82018a4a9f Update Conmon to sync with CRI-O
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #92
Approved by: rhatdan
2017-11-30 23:53:26 +00:00
Matthew Heon 7eb5ce940c Add schema validation to DB
This ensures we don't open a DB with an earlier schema or a
config that differs from ours

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

Closes: #86
Approved by: rhatdan
2017-11-30 18:05:56 +00:00
baude ed5d686076 Remove gitvalidation from travis
gitvalidation in travis has been problematic.  It is already
being done in Fedora and Centos so we have a reliable test
occuring there.

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

Closes: #91
Approved by: rhatdan
2017-11-30 17:42:21 +00:00
Matthew Heon 1f9c8942f1 Add randomly generates container names
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #88
Approved by: baude
2017-11-30 02:03:23 +00:00
baude 742475885e kpod_start
Starts one or more containers.

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

Closes: #83
Approved by: rhatdan
2017-11-29 22:01:47 +00:00
umohnani8 ad255533d4 Fix --volume flag for kpod create and run
Enable the --volume flag to validate user input
and add functionality for :z and :Z options

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

Closes: #84
Approved by: mheon
2017-11-29 21:40:12 +00:00
Daniel J Walsh cefa782e50 Move libpod under containers/storage
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #65
Approved by: mheon
2017-11-29 20:40:50 +00:00
Matthew Heon 13e833a388 Change location of created runc specs to make them survive reboot
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #78
Approved by: rhatdan
2017-11-29 18:43:56 +00:00
Matthew Heon d55cb0f589 Fix error in runtime_ctr
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #85
Approved by: rhatdan
2017-11-29 17:57:32 +00:00
Matthew Heon 6ba6b186a4 Update gitvalidation epoch to ignore older errors after update
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #85
Approved by: rhatdan
2017-11-29 17:57:32 +00:00
Matthew Heon 681a8c85ed Ensure that we can't remove paused containers
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #85
Approved by: rhatdan
2017-11-29 17:57:32 +00:00
Matthew Heon ce3081786b Fix rmi -f removing containers from storage without telling libpod
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #68
Approved by: rhatdan
2017-11-29 12:15:16 +00:00
Matthew Heon 4a68a5303c Attempt fix for persistent bash parameter expansion issues
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #68
Approved by: rhatdan
2017-11-29 12:15:16 +00:00