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
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
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
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
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
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
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
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
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
ed41a290a2
Fix removing running containers
...
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
Closes : #68
Approved by: rhatdan
2017-11-29 12:15:16 +00:00
Matthew Heon
66ed73f89f
First pass at fixing test errors
...
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
Closes : #68
Approved by: rhatdan
2017-11-29 12:15:16 +00:00
Matthew Heon
bbef986214
Fix comment on container.Stop()
...
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
Closes : #68
Approved by: rhatdan
2017-11-29 12:15:15 +00:00
Matthew Heon
4f8fe2b810
Shut down containers when force stopping the runtime
...
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
Closes : #68
Approved by: rhatdan
2017-11-29 12:15:15 +00:00
Matthew Heon
831e2c30d4
Add ability to kill and stop containers
...
Also migrates kpod kill and kpod stop to libpod to use the new code
Fixes force removing containers, and actually deletes containers in runc when
removing them
Start is now capable of starting even when the container is unmounted
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
Closes : #68
Approved by: rhatdan
2017-11-29 12:15:15 +00:00
baude
342ce4db50
kpod ps
...
Wire up kpod ps with the new libpod container backend.
Signed-off-by: baude <bbaude@redhat.com>
Closes : #67
Approved by: rhatdan
2017-11-28 14:47:35 +00:00
Suraj Deshmukh
7eb4772694
remove unused functions and variables
...
Signed-off-by: Suraj Deshmukh <surajd.service@gmail.com>
Closes : #71
Approved by: rhatdan
2017-11-28 14:30:12 +00:00
TomSweeneyRedHat
d43f786728
Add docker transport to push image before final failure
...
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
Closes : #42
Approved by: rhatdan
2017-11-28 12:53:25 +00:00
baude
52ea0deee6
kpod_wait
...
Convert to libpod container backend
Signed-off-by: baude <bbaude@redhat.com>
Closes : #70
Approved by: rhatdan
2017-11-27 19:05:59 +00:00
baude
61e0ab4f47
Create|Run container from Image ID
...
As reported in Issue #50 , we need to be able to run
or create a container based on an image ID (as well
as name).
Signed-off-by: baude <bbaude@redhat.com>
Closes : #76
Approved by: rhatdan
2017-11-27 16:41:08 +00:00
umohnani8
b1a3b03068
Update kpod pause and unpause to use new container state
...
Signed-off-by: umohnani8 <umohnani@redhat.com>
Closes : #66
Approved by: mheon
2017-11-24 15:53:17 +00:00
umohnani8
40dce698d3
Update kpod mount and umount to use the new state
...
The new state for containers has been added
moved kpod mount and umount over to use it
Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
Closes : #57
Approved by: rhatdan
2017-11-22 18:23:19 +00:00
Matthew Heon
34ba0cb8a9
Order containers returned from state and make container config public
...
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
Closes : #63
Approved by: baude
2017-11-22 18:12:57 +00:00
Urvashi Mohnani
2a3934f1da
Update kpod export to use the new container state and runtime
...
Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
Closes : #59
Approved by: rhatdan
2017-11-22 16:17:06 +00:00
Matthew Heon
4ff251d911
Add PID to the containers used to test SQLite state
...
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
Closes : #56
Approved by: rhatdan
2017-11-21 20:09:09 +00:00
Matthew Heon
152882bf19
Add ability to retrieve container's log path to API
...
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
Closes : #56
Approved by: rhatdan
2017-11-21 20:09:09 +00:00
Matthew Heon
8e76ebcf6e
Add ability to update container status from runc
...
Wire this in to all state-bound container operations to ensure
syncronization of container state.
Also exposes PID of running containers via API.
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
Closes : #56
Approved by: rhatdan
2017-11-21 20:09:09 +00:00
Matthew Heon
51fc8827f5
Add tests for SQL-backed state impl
...
Minor changes to container.go and sql_state.go to fix issues
identified by the tests
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2017-11-20 16:24:28 -05:00
Matthew Heon
f2894eda68
Fix lint errors
...
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2017-11-18 13:17:03 -05:00
Matthew Heon
898138441d
Need to provide ID of container being updated
...
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2017-11-18 12:58:48 -05:00
Matthew Heon
b10fb66c28
StopSignal is allowed to be 0
...
If StopSignal is 0, it is assumed that the default signal will be used.
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2017-11-18 12:58:48 -05:00
Matthew Heon
12f19ca013
Resolve another segfault
...
This one cleans up after container creation fails
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2017-11-18 12:58:48 -05:00
Matthew Heon
657cb1b7f6
Fix lingering SQL error
...
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2017-11-18 12:58:48 -05:00
Matthew Heon
57300be94d
Fix segfault cleaning up in after failing to create a Runtime
...
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2017-11-18 12:58:48 -05:00
Matthew Heon
4bc3acc7aa
Rename Create to Init for containers to be less confusing
...
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2017-11-18 12:58:48 -05:00
Matthew Heon
763e372649
Wire SQL backed state into rest of libpod
...
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2017-11-18 12:58:48 -05:00
Matthew Heon
cb56716fc4
Address review comments, fix gofmt and lint
...
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2017-11-18 12:54:05 -05:00
Matthew Heon
c6fe4430b7
Compile-tested implementation of SQL-backed state
...
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2017-11-18 12:54:05 -05:00
baude
d2eda1a864
Enhancements to papr tests
...
The PR contains several enhancements to our CI testing.
- enable lint testing on Fedora
- add Centos Atomic as test platform
- integration tests on run on the OS natively (uncontainerized)
- builds are done in containers
- inclusion of Vagrant file for local testing
Signed-off-by: baude <bbaude@redhat.com>
Closes : #18
Approved by: mheon
2017-11-17 02:07:18 +00:00