Andrea Luzzardi
2ff9679938
store: CreateStore -> NewStore
...
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-19 20:13:29 -07:00
Andrea Luzzardi
71a5fd944a
Merge pull request #801 from abronan/add_ephemeral_support
...
store: Add node Ephemeral support
2015-05-19 20:13:06 -07:00
Alexandre Beslic
38f78b02b5
Reset ephemeral session on renewal failure
...
Signed-off-by: Alexandre Beslic <abronan@docker.com>
2015-05-19 18:30:59 -07:00
Alexandre Beslic
b8d72c291d
Cleanup, fix Integration tests and use of a single global Session in Consul
...
Signed-off-by: Alexandre Beslic <abronan@docker.com>
2015-05-19 15:27:39 -07: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
5d106186fb
remove the periodic session renewal in Consul until we figure out what to do with etcd..
...
Signed-off-by: Alexandre Beslic <abronan@docker.com>
2015-05-19 12:31:39 -07:00
Alexandre Beslic
ec478d8ed5
Add integration tests for engines departure with node removal and ephemeral behavior
...
Signed-off-by: Alexandre Beslic <abronan@docker.com>
2015-05-19 12:08:56 -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
4408a9cc8c
Add Ephemeral for Consul, Zookeeper and Etcd (Etcd abd Consul are using TTLs in the background)
...
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
Victor Vieux
7b3c889407
Merge pull request #809 from jimmyxian/bugfix-volumes-from
...
fix #807 : support --volumes-from rw/ro
2015-05-18 19:41:36 -07:00
Andrea Luzzardi
3c4b19ed26
Merge pull request #812 from docker/flag_to_env
...
adding environment variable option when treating flags
2015-05-18 19:08:53 -07: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
55c52f7a92
Merge pull request #799 from vieux/update_usage
...
update usage to look more like the engine/machine
2015-05-18 14:16:20 -07:00
Victor Vieux
a43f10adc4
update usage to look more like the engine/machine
...
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-05-18 13:57:43 -07:00
Andrea Luzzardi
dd48440d98
api: "Host Down" instead of "Pending" as a status
...
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-18 13:55:13 -07:00
Andrea Luzzardi
8c9449899b
api: Log requests to debug level
...
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-18 13:55:13 -07:00
Andrea Luzzardi
7dec704b8a
integration: node removal for file discovery
...
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-18 13:55:13 -07: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
08dc3c7c7b
discovery: Add the Entries.Diff helper.
...
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-18 13:54:51 -07:00
Victor Vieux
2fd48d8ac4
Merge pull request #805 from aluzzardi/discovery-watch
...
Revamped Discovery: Channel based and resilient to errors
2015-05-18 13:53:13 -07:00
Andrea Luzzardi
6fbbfd7287
integration: give zk some extra time.
...
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-18 13:45:11 -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
0c9e8c8803
discovery: Added kv tests using the mock Store.
...
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-18 13:38:15 -07:00
Andrea Luzzardi
2106966d54
discovery: Watch tests for file and some other tests.
...
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-18 13:38:14 -07:00
Andrea Luzzardi
f49ca7e20f
store: Mock stores can now be created
...
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-18 13:38:14 -07:00
Andrea Luzzardi
b459f7c7f8
store: Add Mock store.
...
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-18 13:38:14 -07:00
Andrea Luzzardi
9399a8835c
golint fixes.
...
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-18 13:38:14 -07:00
Andrea Luzzardi
ac18ef381d
integration: cover more grounds in discovery testing.
...
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-18 13:38:14 -07:00
Andrea Luzzardi
9179ed3d34
integration: move discovery into its own folder
...
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-18 13:38:14 -07:00
Andrea Luzzardi
7430fe5141
fix hb/timeout being time.Duration in a few places
...
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-18 13:38:14 -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
5756e83fcb
store/consul: Watch: Use a WaitTime so we can check stopCh.
...
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-18 13:38:14 -07:00
Andrea Luzzardi
2a27adaea1
discovery integration: No need to wait anymore
...
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-18 13:38:14 -07:00
Andrea Luzzardi
3de0b5f567
join: Don't give up if registration fails, just retry.
...
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
Andrea Luzzardi
d1b1f520f2
Merge pull request #803 from vieux/fix_match_container
...
fix container matching algorithm
2015-05-18 13:38:01 -07:00
Victor Vieux
4b03d7fa0c
handle collision
...
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-05-18 13:35:33 -07:00
Andrea Luzzardi
9d914b16b1
Merge pull request #800 from aluzzardi/watch-channels
...
store: Use channels for Watch/WatchTree
2015-05-16 16:36:02 -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
Xian Chaobo
e555e8f021
merge volumes-from integration tests
...
Signed-off-by: Xian Chaobo <xianchaobo@huawei.com>
2015-05-16 08:22:17 +08:00
Andrea Luzzardi
3e4e74c5a1
store: Close channels in case of errors in Watch/WatchTree.
...
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-15 13:37:51 -07:00
Andrea Luzzardi
2cdca520d9
store/consul: Watch() should work even if the key doesn't exist.
...
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-15 13:37:51 -07:00
Andrea Luzzardi
c77f7332a0
store: Fixes to etcd and zk WatchTree
...
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-15 13:37:51 -07:00
Andrea Luzzardi
7d7e4aee13
store: Watch: Use channels instead of callbacks.
...
This gets rid of `CancelWatch*` functions and its usage is much simpler.
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-15 13:37:51 -07:00
Alexandre Beslic
a30c2ae680
Merge pull request #795 from aluzzardi/store-cleanup
...
Store cleanup
2015-05-15 13:37:14 -07:00
Xian Chaobo
b94d6baf2b
fix #807 : support --volumes-from rw/ro
...
Signed-off-by: Xian Chaobo <xianchaobo@huawei.com>
2015-05-16 03:01:41 +08:00