Victor Vieux
b3385caa4e
add env support in mesos
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-07-14 14:47:47 -07:00
Victor Vieux
ef2d11899a
Merge pull request #1058 from vieux/add_events
...
add events to mesos and a few tests
2015-07-14 14:40:24 -07:00
Victor Vieux
f00e6aa967
add events to mesos and a few tests
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-07-14 14:20:17 -07:00
Alexandre Beslic
1a5881ec49
Merge pull request #971 from jimmyxian/reschedule-with-image
...
Reschedule with soft image affinity
2015-07-13 09:11:18 -07:00
Victor Vieux
49d475228e
use docker_port from offer is present
...
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-07-07 13:37:33 -07:00
Victor Vieux
b18b5bf9f7
add mesos tests back
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-07-07 13:27:40 -07:00
Victor Vieux
28c62b1fcf
Merge pull request #1017 from vieux/hostname_mesos
...
override hostname in mesos
2015-07-09 14:14:55 -07:00
Peeyush Gupta
fa0cc6d1df
Fixing spelling of again
...
Signed-off-by: Peeyush Gupta <gpeeyush@linux.vnet.ibm.com>
2015-07-07 11:09:39 +05:30
Xian Chaobo
0037c31a95
fix func name and use extracExprs
...
Signed-off-by: Xian Chaobo <xianchaobo@huawei.com>
2015-07-07 11:30:26 +08:00
Victor Vieux
edb72d0744
always override hostname in mesos
...
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-07-06 17:35:53 -07:00
Ahmet Alp Balkan
6113e89004
Use os.Unsetenv in options_test
...
Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2015-07-01 20:25:52 -07:00
Victor Vieux
895d820774
Merge pull request #964 from jimenez/task_timeout_flag
...
making task timeout configurable
2015-07-01 16:51:33 -07:00
Isabel Jimenez
305050025c
making task timeout configurable
...
Signed-off-by: Isabel Jimenez <contact.isabeljimenez@gmail.com>
2015-07-01 18:58:17 -04:00
ealang
15fc8d8210
Prevent panic if a container is removed during a refresh
...
If InspectContainer fails, Engine.containers gets set to nil.
Log cause of updateContainer failure.
Signed-off-by: Eric Lang <ealang@gmail.com>
2015-06-29 22:04:15 -05:00
Isabel Jimenez
d86ab642fb
adding implementation for TotalMemory and TotalCpus
...
Signed-off-by: Isabel Jimenez <contact.isabeljimenez@gmail.com>
2015-06-15 21:05:27 -04:00
Xian Chaobo
05ba86d329
golint and add integration test
...
Signed-off-by: Xian Chaobo <xianchaobo@huawei.com>
2015-06-16 08:46:17 +08:00
Xian Chaobo
8cd667e996
add unit test for AddSoftImageAffinity
...
Signed-off-by: Xian Chaobo <xianchaobo@huawei.com>
2015-06-16 07:52:53 +08:00
Xian Chaobo
8c7c0b248b
reschedule with soft image affinity
...
Signed-off-by: Xian Chaobo <xianchaobo@huawei.com>
2015-06-16 07:52:00 +08:00
Andrea Luzzardi
82fc920e90
Engine: fix panic in disconnect with events.
...
Replaces #937
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-06-12 18:51:05 -07:00
Victor Vieux
53e88f3712
Merge pull request #933 from vieux/support_1.6.x+
...
Support 1.6.0+
2015-06-12 15:58:52 -07:00
Victor Vieux
1afc1be2d1
support only 1.6.0+
...
update test/regression/run.sh
uddate doc
update tests
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-06-12 13:27:15 -07:00
Victor Vieux
bc418df194
Merge pull request #936 from vieux/getting_started_mesos
...
add very simple getting started for mesos
2015-06-12 13:07:11 -07:00
Victor Vieux
3f0c3bc1c7
add getting started mesos
...
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-06-12 11:49:41 -07:00
Victor Vieux
4f688db989
disconnect on duplicate
...
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-06-11 15:09:37 -07:00
Victor Vieux
c44151ff4a
pretty print mesos offers
...
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-06-09 17:30:14 -07:00
Victor Vieux
12dac7560a
fix lock in cluster.go
...
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-06-09 12:18:38 -07:00
Victor Vieux
3a1df50ed5
improve locks in queue.go
...
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-06-09 11:43:21 -07:00
Andrea Luzzardi
47dbb5a30d
Merge pull request #902 from vieux/improve_docker_info
...
Improve docker info against 1.7
2015-06-05 15:52:13 -07:00
Marco Mancini
9e27ae9140
Fix reserved cpus computation
...
Added test as Vieux suggested/Fixed CpuShare computation
Signed-off-by: Marco Mancini <marcomancini72@gmail.com>
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-06-04 18:59:15 -07:00
Victor Vieux
c1020da636
nits
...
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-06-04 18:25:51 -07:00
Victor Vieux
4f9c9f5867
use dockerclient structs
...
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-06-04 18:25:51 -07:00
Victor Vieux
2bf6c1a529
improve docker infi with 1.7
...
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-06-04 18:25:51 -07:00
Victor Vieux
15a8b73ab6
fix cpus
...
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-06-04 17:26:32 -07:00
Victor Vieux
4212b69c96
use inspect sent by mesos 0.23
...
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-06-04 14:42:37 -07:00
Victor Vieux
e8445ed8ce
fix panic is disconnect
...
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-06-04 11:27:17 -07:00
Victor Vieux
83f97f73e8
Merge pull request #886 from vieux/add_resources_test
...
fix resources in docker 1.7
2015-06-02 16:15:12 -07:00
Victor Vieux
7604d1cc30
add test
...
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-06-02 16:03:37 -07:00
Victor Vieux
e8e9d553a2
handle compat
...
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-06-02 15:39:12 -07:00
Andrea Luzzardi
e0188d8b66
Merge pull request #873 from jimmyxian/add-load-unit-test
...
Add load unit test
2015-06-01 15:43:08 -07:00
Andrea Luzzardi
0e32d052cf
Merge pull request #878 from chanwit/private-reg-tag
...
fix matching image name with private repo
2015-06-01 15:35:45 -07:00
Chanwit Kaewkasi
7725b572c2
refactor parsing to a function
...
Signed-off-by: Chanwit Kaewkasi <chanwit@gmail.com>
2015-06-01 00:43:52 +07:00
Chanwit Kaewkasi
2701342a0c
fix matching image name with private repo
...
Signed-off-by: Chanwit Kaewkasi <chanwit@gmail.com>
2015-05-31 21:01:00 +07:00
Xian Chaobo
78957d527b
add load unit test
...
Signed-off-by: Xian Chaobo <xianchaobo@huawei.com>
2015-05-29 22:44:27 -04:00
Xian Chaobo
def00ea0a0
fix load
...
Signed-off-by: Xian Chaobo <xianchaobo@huawei.com>
2015-05-29 22:35:27 -04:00
Victor Vieux
ec784bd100
add initial version of mesos/cluster_test.go
...
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-05-29 15:07:04 -07:00
Xian Chaobo
684b2802d7
add import in mesos
...
Signed-off-by: Xian Chaobo <xianchaobo@huawei.com>
2015-05-27 22:12:56 +08:00
Xian Chaobo
d7001cac97
fix import unit test
...
Signed-off-by: Xian Chaobo <xianchaobo@huawei.com>
2015-05-27 22:11:05 +08:00
Xian
8da3de3cc4
add import unit test
...
Signed-off-by: Xian <xianchaobo@huawei.com>
2015-05-27 22:11:05 +08:00
Xian Chaobo
1f20358b5d
add support import
...
Signed-off-by: Xian Chaobo <xianchaobo@huawei.com>
2015-05-27 22:11:03 +08:00
Victor Vieux
284ba144ed
remove deadlock in mesos
...
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-05-26 19:34:54 -07:00
Andrea Luzzardi
0fb33f61d5
update testify
...
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-26 19:01:09 -07:00
Isabel Jimenez
db7d918c0a
Addressing review comments
...
Signed-off-by: Isabel Jimenez <contact.isabeljimenez@gmail.com>
2015-05-26 19:45:10 -04:00
Victor Vieux
300932b2d5
add slave_test.go, add tast_test.go
...
add basic network mode support
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
Signed-off-by: Isabel Jimenez <contact.isabeljimenez@gmail.com>
Signed-off-by: Timothy Chen <tnachen@gmail.com>
2015-05-26 16:22:34 -04:00
Isabel Jimenez
19c14fde2e
Adding integration tests, decline offers after 'SWARM_MESOS_OFFER_TIMEOUT', Tracking tasks and managing offers, refactoring list of slaves, queue create requests before processing them
...
Signed-off-by: Isabel Jimenez <contact.isabeljimenez@gmail.com>
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-05-26 16:21:54 -04:00
Timothy Chen
20a5a7e588
Support port and address for Mesos.
...
Signed-off-by: Timothy Chen <tnachen@gmail.com>
Signed-off-by: Victor Vieux <vieux@docker.com>
Signed-off-by: Isabel Jimenez <contact.isabeljimenez@gmail.com>
2015-05-26 16:19:08 -04:00
Isabel Jimenez
18235bee97
cluster mesos with engine
...
Signed-off-by: Timothy Chen <tnachen@gmail.com>
Signed-off-by: Isabel Jimenez <contact.isabeljimenez@gmail.com>
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-05-26 16:18:33 -04:00
Victor Vieux
9db6bce98b
Merge pull request #823 from vieux/containers
...
create containers.go
2015-05-26 13:05:26 -07:00
Victor Vieux
b5094bde55
create Containers type
...
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-05-26 12:01:48 -07:00
Victor Vieux
0b24992d7c
Merge pull request #815 from jimmyxian/rmi_by_name
...
Fix image match
2015-05-26 10:43:59 -07:00
Andrea Luzzardi
b4efc08dfc
api: Integrate leader election.
...
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-22 21:23:34 -07:00
Andrea Luzzardi
a3950e7f65
Merge pull request #796 from jimmyxian/refresh-container
...
Add Refresh container
2015-05-21 18:30:47 -07:00
Victor Vieux
f7a49591a0
add getter/setter for namespaced labels
...
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-05-21 16:21:50 -07:00
Victor Vieux
b3222a8f11
rename Destroy ro RemoveContainer for consistency
...
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-05-20 12:53:02 -07:00
Xian Chaobo
e6ce59794e
merge two image match func
...
Signed-off-by: Xian Chaobo <xianchaobo@huawei.com>
2015-05-19 21:39:10 -04:00
Alexandre Beslic
4537b9f2ba
Remove unused code
...
Signed-off-by: Alexandre Beslic <abronan@docker.com>
2015-05-19 12:57:43 -07:00
Alexandre Beslic
f81de46ab4
Fix Consul and etcd with latest changes, use etcd v2.0.11 for integration tests, remove call to SyncCluster for now (breaks the integration tests)
...
Signed-off-by: Alexandre Beslic <abronan@docker.com>
2015-05-19 10:25:31 -07:00
Alexandre Beslic
d5915b2a09
Merge pull request #811 from aluzzardi/node-removal
...
Handle Node Removal from Discovery correctly
2015-05-19 10:11:10 -07:00
Xian Chaobo
064e91cd23
fix image match and fix docker save
...
Signed-off-by: Xian Chaobo <xianchaobo@huawei.com>
2015-05-19 05:21:14 -04:00
Isabel Jimenez
8001455ecf
adding ip as an option for flags
...
Signed-off-by: Isabel Jimenez <contact.isabeljimenez@gmail.com>
2015-05-18 20:34:57 -04:00
Isabel Jimenez
19d51f4a1a
adding environment variable option when treating flags
...
Signed-off-by: Isabel Jimenez <contact.isabeljimenez@gmail.com>
2015-05-18 20:16:21 -04:00
Andrea Luzzardi
d7b8734e97
cluster: Handle node removal
...
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-18 13:55:13 -07:00
Andrea Luzzardi
7c0dba5de6
engine: Support for disconnection
...
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-18 13:55:13 -07:00
Andrea Luzzardi
3d6f833f6f
fix --heartbeat flag.
...
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-18 13:38:15 -07:00
Andrea Luzzardi
0c72bcaf40
discovery cleanup: heartbeat is a time.Duration.
...
- Use a time.Duration instead of a uint64 for hb
- Flags can accept durations: --heartbeat 25s
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-18 13:38:14 -07:00
Andrea Luzzardi
f33c03af93
discovery: Push watch errors to a channel
...
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-18 13:38:14 -07:00
Andrea Luzzardi
97984881c3
discovery: New channel based API.
...
- Watch() issues updates by channel rather than by callback
- Fetch() is gone
- Watch() can be stopped at any time by closing the stop channel
- Watch() is now resilient to errors and will try over and over
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-18 13:38:13 -07:00
Victor Vieux
4b03d7fa0c
handle collision
...
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-05-18 13:35:33 -07:00
Victor Vieux
faf26a62f4
fix container matching algorithm
...
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-05-15 17:57:40 -07:00
Victor Vieux
1f5d66d1f1
fix match
...
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-05-15 16:28:39 -07:00
Xian Chaobo
4af3e30f64
Fix:#748 add refresh container
...
Signed-off-by: Xian Chaobo <xianchaobo@huawei.com>
2015-05-15 04:46:02 -04:00
Victor Vieux
2cb0395acf
remove images by name or ID, not always ID
...
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-05-14 15:22:06 -07:00
Andrea Luzzardi
ece52698d6
Merge pull request #783 from vieux/fix_image_match
...
fix image.Match to take only repo or repo:tag
2015-05-13 19:05:30 -07:00
Victor Vieux
f9b457f152
fix image.Match
...
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-05-13 17:36:08 -07:00
Victor Vieux
69bdf1a87b
fix heartbeat default value
...
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-05-13 16:50:01 -07:00
Victor Vieux
59cd11b946
change swarm.heartbeat to swarm.discovery.heartbeat
...
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-05-13 15:48:07 -07:00
Victor Vieux
5db3a9cd0e
remove options struct, yay!
...
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-05-13 15:36:30 -07:00
Victor Vieux
c29404e272
add --cluster-driver and --cluster-opt
...
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-05-12 17:49:00 -07:00
Andrea Luzzardi
b6a7c3d7f5
swarm ID: Remove backward compatibility.
...
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-11 16:56:08 -07:00
Andrea Luzzardi
5c801d2c6a
swarm id: Handle compatibility.
...
Containers created with Swarm<0.3.0 or directly on the host without
going through Swarm don't have a Swarm ID. We are going to fake it by
using the Container ID.
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-11 16:56:08 -07:00
Andrea Luzzardi
abfe5e6f4c
Add support for Swarm IDs.
...
- Every container that gets created through Swarm gets a Swarm ID
assigned (as a label).
- All API operations (start, stop, ...) can be performed by using either
the container ID or the swarm ID.
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-11 16:56:07 -07:00
Andrea Luzzardi
054702fedc
container config: Add Swarm ID helpers.
...
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-11 16:56:07 -07:00
Andrea Luzzardi
0bd4b1faca
Merge pull request #732 from vieux/fix_name_unique
...
fix name checks in create and rename
2015-05-07 16:24:16 -07:00
Victor Vieux
a74d00d1c5
fix name checks
...
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-05-07 15:50:34 -07:00
Andrea Luzzardi
5ee115fcd5
container: Use state strings from dockerclient instead of embedding
...
them.
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-07 15:42:26 -07:00
Andrea Luzzardi
8a00a5ff10
engine: Force full refresh when container changes state.
...
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-06 23:38:32 -07:00
Andrea Luzzardi
4cf0a32e4d
container: Add Status() and StateString() formatters.
...
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-06 23:38:32 -07:00
Andrea Luzzardi
7865004ec9
Merge pull request #725 from aluzzardi/discovery-integration-cleanup
...
Discovery integration cleanup
2015-05-06 10:50:11 -07:00
Andrea Luzzardi
9124f3a0c7
cluster: Improved discovery duplication error messaging.
...
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-05 19:13:57 -07:00
Andrea Luzzardi
1d2e073813
Embed ContainerConfig into Container.
...
The cluster configuration is now embedded into the container. It's
guaranteed to be correct (as in, generated by BuildContainerConfig) at
all times.
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-04-30 18:15:22 -07:00
Andrea Luzzardi
cd3a0f03fc
container config builder: Make all modifications on a copy, never alter original.
...
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-04-30 18:06:26 -07:00
Andrea Luzzardi
67fbac56a6
cleanup config asserts
...
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-04-30 15:35:46 -07:00
Victor Vieux
f53b5df834
store constaints and affinities in labels
...
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-04-30 14:33:21 -07:00
Victor Vieux
6eceffacf9
use cluster.ContainerConfig
...
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-04-30 11:44:25 -07:00
Victor Vieux
e5f4243dad
support pulling private images from docker pull
...
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-04-28 11:17:44 -07:00
Xian Chaobo
40a3eb1aa1
fix return value
...
Signed-off-by: Xian Chaobo <xianchaobo@huawei.com>
2015-04-27 21:35:46 -04:00
Andrea Luzzardi
24396d8509
Merge pull request #669 from jimmyxian/improve-rename
...
improve rename
2015-04-27 12:39:48 -07:00
Xian Chaobo
3d2537eb84
move check into cluster and rename func
...
Signed-off-by: Xian Chaobo <xianchaobo@huawei.com>
2015-04-27 08:20:55 -04:00
Xian Chaobo
b47e002e6c
improve rename and update dockerclient
...
Signed-off-by: Xian Chaobo <xianchaobo@huawei.com>
2015-04-24 21:09:26 -04:00
Andrea Luzzardi
d6011b4bc6
Merge pull request #609 from jimmyxian/add-support-imageload
...
Add support "docker load" api
2015-04-24 17:21:11 -07:00
Sriram Natarajan
9f29e95abc
Add Node Labels to Cluster Info information
...
Updates: docker info output and /info API
Check for labels in API integration tests
Signed-off-by: Sriram Natarajan <natarajan.sriram@gmail.com>
2015-04-21 20:30:19 +00:00
Xian Chaobo
5c068de28c
add force-refresh when commit/tag/pull
...
Signed-off-by: Xian Chaobo <xianchaobo@huawei.com>
2015-04-20 02:45:06 -04:00
Xian Chaobo
0b44d9615b
add force fresh images
...
Signed-off-by: Xian Chaobo <xianchaobo@huawei.com>
2015-04-19 23:02:26 -04:00
Xian Chaobo
59c5b6b317
use WaitGroup and move test in api.bats
...
Signed-off-by: Xian Chaobo <xianchaobo@huawei.com>
2015-04-16 22:10:39 -04:00
Xian Chaobo
6ad2a7847c
stream load and output nothing if load successfully
...
Signed-off-by: Xian Chaobo <xianchaobo@huawei.com>
2015-04-16 21:50:46 -04:00
Xian Chaobo
34e0c78d1d
gofmt check
...
Signed-off-by: Xian Chaobo <xianchaobo@huawei.com>
2015-04-16 21:50:46 -04:00
Xian Chaobo
ccc32635d5
Add support Load Image
...
Signed-off-by: Xian Chaobo <xianchaobo@huawei.com>
2015-04-16 21:50:46 -04:00
Andrea Luzzardi
9ac7dd2402
Merge pull request #603 from vieux/add_build
...
Proposal: Add build support on a random node
2015-04-16 16:21:38 -07:00
Victor Vieux
05b01c7b43
forcerefresh after build and add test
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-04-16 12:22:09 -07:00
Andrea Luzzardi
4db132e20e
Merge pull request #594 from noxiouz/add_rlocks_to_swarm_cluster
...
Add Rlocks to swarm cluster
2015-04-16 12:20:58 -07:00
Victor Vieux
d74e872952
add build
...
improve random selection
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-04-16 12:19:09 -07:00
Victor Vieux
8506acbed2
fix proxyRandom even without container
...
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-04-16 12:17:38 -07:00
Andrea Luzzardi
442217d6dc
Cleanup events handler.
...
- Renamed Events() to RegisterEventHandler() in Engine.
- Added RegisterEventHandler() to the Cluster interface.
- Removed EventHandler requirement from swarm's Cluster constructor.
- Make API's events handler private.
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-04-15 15:59:55 -07:00
Sriram Natarajan
49f644934c
Improve Error message to show node's Name and IP
...
Signed-off-by: Sriram Natarajan <natarajan.sriram@gmail.com>
2015-04-14 11:27:02 -07:00
Sriram Natarajan
b174aa26de
Change heartbeat type to unsigned int
...
Check if heartbeat value is greater than zero
Signed-off-by: Sriram Natarajan <natarajan.sriram@gmail.com>
2015-04-09 00:04:50 +00:00
Anton Tiurin
2b4bbf1ef2
[SwarmCluster] Add RLock to Cluster.Pull
...
Use sync.WaitGroup (go-way) to wait for a collection
of pulling goroutines.
Signed-off-by: Anton Tiurin <noxiouz@yandex.ru>
2015-04-08 22:30:23 +03:00
Anton Tiurin
b221baf4ed
[SwarmCluster] Add RLock to Cluster.hasEngine
...
Signed-off-by: Anton Tiurin <noxiouz@yandex.ru>
2015-04-08 22:25:54 +03:00
Anton Tiurin
e66abdf7bb
[SwarmCluster] Remove an extra RLock in Engine.Container
...
Engine.Container uses an array of containers from Engine.Containers, which is
built under an internal RLock, so the external RLock is useless.
Also allocate enough memory for the array of containers (images).
Signed-off-by: Anton Tiurin <noxiouz@yandex.ru>
2015-04-08 00:41:28 +03:00
Victor Vieux
853aaf6027
nodes -> engines
...
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-04-07 11:46:33 -07:00
Victor Vieux
0c1782c7c0
fix proxyRandom and cleanup node -> engine
...
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-04-06 13:38:10 -07:00
Victor Vieux
1297a4cef2
transform node interface to engine struct
...
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-04-06 13:19:37 -07:00
Alexandre Beslic
88b69e0671
Merge pull request #573 from aluzzardi/container-update-fix
...
Fix container update flow.
2015-04-03 17:03:14 -07:00
Victor Vieux
820527be7e
Sort docker info by name
...
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-04-03 16:37:27 -07:00
Andrea Luzzardi
23d52249fa
Fix container update flow.
...
This guarantees that containers get fully updated before being inserted
in the node (and returned by .Containers()).
Fixes #560
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-04-03 16:21:48 -07:00
Victor Vieux
20ec7a889e
add strategy and filters to docker info
...
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-04-03 15:56:26 -07:00
Victor Vieux
c41d73dd50
add error message
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-04-03 01:28:08 +00:00
Victor Vieux
58b282a4a3
Merge pull request #545 from aluzzardi/synchronous-creater-destroy
...
Make container creation and destruction synchronous.
2015-04-01 15:41:26 -07:00
Victor Vieux
b304a453f4
use 1024 as total cpushare for a machine
...
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-04-01 11:49:00 -07:00
Andrea Luzzardi
ca05173e41
Make container creation and destruction synchronous.
...
This is in order to fix race conditions. Currently, container creation
can happen in parallel which means that the scheduler operates on stale
data.
Fixes #427
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-03-31 14:11:51 -07:00
Matt Bajor
d87c48ae4e
Fix lint violations
...
This changeset fixes all lint violations that show up with a
min_confidence of 1
- Issue #500 : Run golint on codebase
Signed-off-by: Matt Bajor <matt@notevenremotelydorky.com>
2015-03-27 21:17:44 -06:00
Alexandre Beslic
904c720ea5
Merge pull request #446 from vieux/rmi
...
add docker rmi
2015-03-24 16:04:35 -07:00
Victor Vieux
64d01b4e4a
add fixme
...
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-03-19 10:02:33 -07:00
Victor Vieux
e6b3b04150
do not leak dockerclient
...
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-03-18 13:48:09 -07:00
Victor Vieux
c969fcdae6
use dockerclient
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-03-17 17:41:46 -07:00
Victor Vieux
b4a88ad622
Add match in images.go
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-03-17 17:41:46 -07:00
Victor Vieux
649b6cf577
add docker rmi
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-03-17 17:41:46 -07:00
Victor Vieux
8c09bba1de
mitigate race in pull while we wait for a proper store
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-03-17 23:29:42 +00:00
Victor Vieux
b9e600d38d
pull only latest if no tag
...
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-03-17 16:19:35 -07:00
Victor Vieux
de62579f8d
handle errors in pull
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-03-11 14:34:47 -07:00
Victor Vieux
0fca58b069
add Node back to inspect
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-03-06 16:40:55 -08:00
Victor Vieux
0e7f970d4d
use a single callback
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-03-06 11:22:14 -08:00
Victor Vieux
e0fa132ec9
add parallel
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-03-05 17:09:08 -08:00
Victor Vieux
7ad8a3705f
add support for pull and rmi
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-03-05 17:09:08 -08:00
Victor Vieux
eccaf6e5eb
Cleanup: Make swarm Node and Cluster functions private
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-03-05 11:53:40 -08:00
Victor Vieux
0569f7d4dd
swarm.Node -> swarm.node && some method now private
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-03-02 18:02:31 -08:00
Victor Vieux
92ab1e347c
cleanup swarm scheduler code
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-03-02 17:55:06 -08:00
Victor Vieux
8b7afe2c73
remove mesos.go to move it to it's own PR
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-02-27 14:25:50 -08:00
Victor Vieux
a8885ab997
removed nodes.go
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-02-27 14:25:50 -08:00
Victor Vieux
d8042f9677
add Node interface
...
Usable -> Total & Reserved -> Used
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-02-27 14:25:50 -08:00
Victor Vieux
4bfeb4b640
move list of node to swarm only
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-02-27 14:20:37 -08:00
Victor Vieux
47e03120f5
remove Nodes(), add Images() and Images()
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-02-27 14:20:37 -08:00
Victor Vieux
fa8a06685b
remove events from the cluster interface
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-02-27 14:20:37 -08:00
Victor Vieux
6348fdd849
move discovery out of the cluster interface
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-02-27 14:20:37 -08:00
Victor Vieux
ce98e66c63
cluster API instead of scheduler API
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-02-27 14:20:37 -08:00
Victor Vieux
126f550317
add SchedulerOptions
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-02-27 14:20:37 -08:00
Victor Vieux
dd537dbe74
clean cut cluster - scheduler
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-02-27 14:20:37 -08:00
Victor Vieux
98a21bd373
initial mesos.go file full fo TODOs
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-02-27 14:20:37 -08:00
Victor Vieux
150940a67b
update dockerclient
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-02-27 14:17:02 -08:00
Andrea Luzzardi
67e347fa1a
Move container name matching logic into Node.
...
- Add `Node.Container()`
- Make `Cluster.Container()` use `Node.Container()`
- Added missing locks and converted existing ones to RLock.
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-02-10 13:25:37 -08:00
Victor Vieux
ba01634743
replace discovery.Node by discovery.Entry
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-02-10 01:58:43 +00:00
Andrea Luzzardi
a0bfcf6733
Node: Connect with the provided address instead of resolving the IP.
...
When used with `--tlsverify`, connecting with the IP forced daemon
certificates to use an IP in `subjAltName`.
Related to #341
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-02-04 13:10:27 -08:00
Andrea Luzzardi
ec7d343a88
Merge pull request #306 from vieux/improve_logs1
...
improve some logs
2015-01-27 12:23:31 -08:00
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
Victor Vieux
231ded20e0
improve some logs
...
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-01-26 23:41:56 +00: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
Andrea Luzzardi
24985d2e4f
Node: API to add/remove/cleanup the internal containers state.
...
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2014-11-21 16:10:49 -08:00
Andrea Luzzardi
7a07b63104
Node: Basic health checking.
...
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2014-11-21 16:10:48 -08:00
Andrea Luzzardi
622eb9339e
Node: Apply a request timeout when communicating with nodes.
...
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2014-11-21 16:10:48 -08:00
Victor Vieux
3e930e0e9c
add host labels
2014-11-21 23:33:18 +00:00
Victor Vieux
f502698aed
add more infos to events
2014-11-21 22:37:43 +00:00
Victor Vieux
1f74cb5809
remove races
2014-11-21 01:36:30 +00:00
Victor Vieux
80cc51c9be
fix heartbeat
2014-11-20 23:56:42 +00:00
Andrea Luzzardi
dacb3e2ef1
Fix tests for the NewNode API changes.
...
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2014-11-20 15:56:12 -08:00
Victor Vieux
8f708d778d
improve logs
2014-11-20 22:45:38 +00:00
Victor Vieux
20319a5049
use ID and names
2014-11-20 19:03:55 +00:00
Victor Vieux
e63e0f3956
add kill
2014-11-20 18:52:15 +00:00
Victor Vieux
9bf438ec64
int -> int64
2014-11-20 01:37:15 +00:00
Victor Vieux
8293b09a15
fix cpus
2014-11-20 01:15:22 +00:00
Victor Vieux
ec06513f48
implement refresh of only one container
2014-11-19 22:29:34 +00:00
Victor Vieux
de2462c666
fix test
2014-11-19 01:11:36 +00:00
Victor Vieux
9e8ee985fb
Merge branch 'master' of github.com:docker/libcluster
2014-11-19 01:09:23 +00:00
Victor Vieux
2905b00d07
add tests
2014-11-19 01:09:18 +00:00
Andrea Luzzardi
a40ebef79e
Rename "graphdriver" to "storagedriver".
...
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2014-11-18 16:32:44 -08:00
Andrea Luzzardi
8dbb9aeeb1
Removed debug log when refreshing containers after creation
...
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2014-11-18 16:04:13 -08:00
Victor Vieux
45220c0c32
update dockerclient
2014-11-18 23:50:44 +00:00
Victor Vieux
07383edd47
improve locks
2014-11-18 23:04:11 +00:00
Victor Vieux
0f507fb783
fix package name
2014-11-18 21:40:38 +00:00