Andrea Luzzardi
9ed597b5eb
Do not fail when destroying a container if it's not found in the store.
...
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-01-27 12:13:58 -08:00
Andrea Luzzardi
dc43a156bd
Fix concurrency issue in node.updateContainer.
...
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-01-26 14:04:41 -08:00
Andrea Luzzardi
cafbc6df28
Improve container state refresh.
...
Currently, container inspection is performed only on creation (or during
exec by the API).
The problem is that certain informations such as NetworkSettings are not
available during creation, therefore we must inspect the containers
during other events.
This change refactors a bit the API so that RefreshContainer() and
RefreshContainers() now accept a `full` flag to force a deep refresh.
The node event handler in turn uses that flag whenever a container
starts or dies.
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-01-26 13:39:52 -08:00
Pierre Wacrenier
fc58587315
fix tests that were not compiling or panicking
...
Signed-off-by: Pierre Wacrenier <pierre.wacrenier@gmail.com>
2015-01-25 01:42:49 +01:00
Victor Vieux
4ae79a8ff7
update for dockerclient
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-01-24 11:14:38 -08:00
Victor Vieux
693fb0fcf1
fix panic with no port
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-01-24 01:42:35 +00:00
Victor Vieux
02cc59840f
Revert "Fixes panic when ports are not specified"
...
This reverts commit a916f9cde0
.
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-01-24 01:42:15 +00:00
Brian Goff
a916f9cde0
Fixes panic when ports are not specified
...
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-01-23 15:56:14 -05:00
Victor Vieux
2e968d7800
add support for history, inspect for images and improve inspect for containers
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-01-22 00:49:02 +00:00
Victor Vieux
59fb880b75
emitCustomEvent -> emitEvent
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-01-19 22:38:42 +00:00
Victor Vieux
08a17cd2e6
Merge pull request #230 from mountkin/master
...
restart the event monitor when unhealthy node comes back
2015-01-19 14:37:51 -08:00
Andrea Luzzardi
1e92f854d5
Merge pull request #243 from vieux/affinity
...
add affinity (start next to a container/image)
2015-01-19 14:02:03 -08:00
Victor Vieux
1dfb7ffb70
add untag and delete
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-01-19 21:58:46 +00:00
Andrea Luzzardi
562febe2f9
state: Store container ID in requested state.
...
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-01-19 13:25:27 -08:00
mountkin
d5c5df9f1b
refresh the node specs when an unhealthy node reconnects to the cluster
...
Signed-off-by: mountkin <mountkin@gmail.com>
2015-01-19 19:27:54 +08:00
mountkin
fda3606be3
add a "node_connect" custom event when a node joins the cluster
...
Signed-off-by: mountkin <mountkin@gmail.com>
2015-01-19 19:27:41 +08:00
mountkin
34b845efab
rename custom events
...
Signed-off-by: mountkin <mountkin@gmail.com>
2015-01-19 18:46:54 +08:00
mountkin
7d4bbcd59a
emit a custom event when a node dies or comes back
...
Signed-off-by: mountkin <mountkin@gmail.com>
2015-01-19 18:46:54 +08:00
mountkin
a3f0c1643f
restart the event monitor when unhealthy node comes back
...
Signed-off-by: mountkin <mountkin@gmail.com>
2015-01-19 18:46:54 +08:00
Victor Vieux
e1c2dced23
refactor Images() and refresh images on pull event
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-01-16 22:33:58 +00:00
Victor Vieux
5a85211449
add images test
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-01-16 00:10:36 +00:00
Victor Vieux
5564894744
add images cache
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-01-16 00:10:36 +00:00
Andrea Luzzardi
6410f9ad35
Store requested state persistently.
...
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-01-15 23:10:50 +00:00
Victor Vieux
01633efaa0
fix issue with hostname
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-01-15 23:10:07 +00:00
Victor Vieux
f0e9fb032d
prevent undercommit for now
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-01-14 00:57:13 +00:00
Victor Vieux
45ea947e0e
OverCommit -> Usable
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-01-14 00:40:55 +00:00
Victor Vieux
d57eca7bc9
move overcommit outside of the strategies
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-01-14 00:33:49 +00:00
Pierre Wacrenier
4cd7a4e8e3
More canonical Container creation in inspectContainer
...
Signed-off-by: Pierre Wacrenier <pierre.wacrenier@gmail.com>
2015-01-13 02:12:16 +01:00
Pierre Wacrenier
f7735d629b
More canonical Event construction on node event handling
...
Signed-off-by: Pierre Wacrenier <pierre.wacrenier@gmail.com>
2015-01-13 01:57:29 +01:00
Andrea Luzzardi
94cf009e46
Container: Make Node public instead of exposing it through Node().
...
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-01-12 08:14:11 -08:00
Andrea Luzzardi
322c5476e9
Merge pull request #222 from mountkin/master
...
make use of the "pullImage" parameter of node.Create method
2015-01-07 14:06:49 +01:00
mountkin
509dcd362f
add test cases for node.Create method
...
Signed-off-by: mountkin <mountkin@gmail.com>
2015-01-07 12:43:13 +08:00
Victor Vieux
9c5896f65c
Merge pull request #218 from chanwit/check-dup-id
...
Proposal: report error when two Docker's IDs are duplicated
2015-01-06 17:58:21 -08:00
mountkin
e66a6b2793
make use of the "pullImage" parameter of node.Create method
...
Signed-off-by: mountkin <mountkin@gmail.com>
2015-01-06 17:46:37 +08:00
Chanwit Kaewkasi
93026e166a
adjust error report to be a single entry
...
Signed-off-by: Chanwit Kaewkasi <chanwit@gmail.com>
2015-01-06 09:08:55 +07:00
Chanwit Kaewkasi
5f6a257e0c
report error when two Docker's IDs are duplicated
...
Signed-off-by: Chanwit Kaewkasi <chanwit@gmail.com>
2015-01-05 23:54:37 +07:00
Victor Vieux
4350b44b56
refactor code
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2014-12-31 00:19:13 +00:00
Victor Vieux
aefe450036
add exec support
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2014-12-31 00:19:13 +00:00
Andrea Luzzardi
7effd27a0e
Events: Embed the entire Node object rather than its attributes.
...
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2014-12-17 17:54:07 -08:00
Andrea Luzzardi
88bff68a5a
Merge pull request #167 from vieux/update_watch
...
watch take a callback
2014-12-12 17:10:38 -08:00
Victor Vieux
88849295ed
remove useless functs
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2014-12-13 00:23:52 +00:00
Victor Vieux
f2ca549f46
cleaner callback
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2014-12-12 22:49:20 +00:00
Andrea Luzzardi
db32b29a79
Cluster: Fix empty name container lookup.
...
Fixed a bug which caused Swarm to issue an error when creating more than
one container with no name.
Added tests for container lookups.
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2014-12-10 18:06:02 -08:00
Victor Vieux
495080fc80
update tests because of dockerclient last update
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2014-12-11 01:13:47 +00:00
Victor Vieux
c6815ee1fe
add test and remove unused funcs
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2014-12-09 01:39:39 +00:00
Victor Vieux
d1d8bd5356
add a few tests
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2014-12-09 01:23:02 +00:00
Andrea Luzzardi
496377d998
Node: Refuse to connect to unsupported Docker engine versions.
...
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2014-12-05 14:59:40 -08:00
Andrea Luzzardi
2e7d972755
Cluster: Match NodeName/ContainerId as well as NodeId/ContainerId.
...
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2014-12-03 15:10:11 -08:00
Victor Vieux
42909c9daf
update for dockerclient
2014-12-03 12:28:05 +00:00
Victor Vieux
0872d4f549
add test
2014-11-25 01:43:01 +00:00