Commit Graph

1542 Commits

Author SHA1 Message Date
Xian Chaobo e555e8f021 merge volumes-from integration tests
Signed-off-by: Xian Chaobo <xianchaobo@huawei.com>
2015-05-16 08:22:17 +08: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
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
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
Andrea Luzzardi 60cfbc89c2 store: fix gofmt
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-15 00:23:38 -07:00
Andrea Luzzardi 0f61855877 store: Get rid of "discovery" log messages
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-14 22:35:14 -07:00
Andrea Luzzardi 924bde48e7 store: Get rid of `structs.go` as it only contains errors/config
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-14 22:29:33 -07:00
Andrea Luzzardi a897fa04d5 store: Watch/WatchTree: Removed unused params
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-14 22:25:26 -07:00
Andrea Luzzardi 2c1040971a store: Move initialize type next to initializers.
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-14 22:10:19 -07:00
Andrea Luzzardi f87505e2e7 store: KVEntry -> KVPair
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-14 22:00:27 -07:00
Andrea Luzzardi 895484ec2a store: WatchRange -> WatchTree
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-14 21:58:02 -07:00
Andrea Luzzardi 1d3aa013db store: DeleteRange -> DeleteTree
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-14 21:58:02 -07:00
Andrea Luzzardi 6f41eabdae store: GetRange -> List
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-14 21:58:02 -07:00
Andrea Luzzardi 1638907485 store: Fix etcd atomic operations.
- The TTL was set to 5 by error (I guess)
- There is no need to check the response, the operation fails.

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-14 21:58:02 -07:00
Andrea Luzzardi bd18f27bda store: Refactor Atomic operations to use KVEntry.
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-14 21:58:02 -07:00
Andrea Luzzardi 93ad39c079 store: Use KVEntry in Get() for consistency with GetRange()
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-14 21:58:02 -07:00
Andrea Luzzardi d4bdb10d35 store: Make KVEntry a struct rather than an interface.
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-14 21:58:02 -07:00
Andrea Luzzardi 747a83a40a store: Cleanup initializers.
- KV is now Backend
- name (string) is now backend (Backend)
- initializers are now a static var rather than generated by init()

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-14 21:32:10 -07:00
Alexandre Beslic 77884de123 Merge pull request #793 from aluzzardi/lock-channel
store: Lock returns a channel that is closed if the lock is lost
2015-05-14 17:55:09 -07:00
Andrea Luzzardi 23481131c4 store: Add a channel to lock that is closed if our lock is lost or an error.
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-14 17:35:57 -07:00
Andrea Luzzardi 250a17e954 Merge pull request #780 from abronan/improve_helpers
Refactor helpers for storage key formatting
2015-05-14 17:02:58 -07:00
Alexandre Beslic b95e826b08 Merge pull request #789 from kelseyhightower/master
discovery: improve code comments.
2015-05-14 10:34:40 -07:00
Kelsey Hightower 0d87489773 discovery: improve code comments.
Signed-off-by: Kelsey Hightower <kelsey.hightower@gmail.com>
2015-05-14 08:49:40 -07:00
Alexandre Beslic 9d68cc0506 Merge pull request #787 from aluzzardi/store-options-as-ptr
pkg/store: Pass Options as pointer, not value.
2015-05-13 23:09:37 -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
Andrea Luzzardi 04f7d2ac10 pkg/store: Remove unsused ErrSessionUndefined from consul.
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-13 19:01:01 -07:00
Andrea Luzzardi 9d055d6bf8 pkg/store: Pass Options as pointer, not value.
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-13 19:00:39 -07:00
Alexandre Beslic a73c89d42b remove bool argument from getDirectory
Signed-off-by: Alexandre Beslic <abronan@docker.com>
2015-05-13 18:05:47 -07:00
Alexandre Beslic ccf6e37c16 Refactor helpers to be more meaningful and flexible for future store usage
Signed-off-by: Alexandre Beslic <abronan@docker.com>
2015-05-13 18:02:48 -07:00
Victor Vieux 4da6b2b093 Merge pull request #551 from noxiouz/fix_eventsHandler
[eventsHandler] Use Lock/Unlock to sync a write access
2015-05-13 17:58:52 -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 ac8c210384 Merge pull request #785 from vieux/fix_apiversion_case
APIVersion -> ApiVersion to match docker API
2015-05-13 17:27:19 -07:00
Andrea Luzzardi e6d4a5733c Merge pull request #782 from abronan/fix_init_etcd
Call SyncCluster at etcd client initialization
2015-05-13 17:17:41 -07:00
Victor Vieux b73f54def4 APIVersion -> ApiVersion to match docker API
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-05-13 17:12:16 -07:00
Alexandre Beslic 959bd0adbb Add call to SyncCluster at etcd client initialization
Signed-off-by: Alexandre Beslic <abronan@docker.com>
2015-05-13 17:10:52 -07:00
Victor Vieux 0cf32ec0a5 Merge pull request #784 from vieux/fix_heartbeat
fix heartbeat default value
2015-05-13 16:50:15 -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
Alexandre Beslic 2180a703cb Merge pull request #777 from aluzzardi/store-locks
store: Improved Lock support.
2015-05-13 16:45:29 -07:00
Andrea Luzzardi cde1550a13 Merge pull request #774 from vieux/cluster_opt
add --cluster-driver and --cluster-opt
2015-05-13 16:31:54 -07:00
Andrea Luzzardi f4bd5834fa store: Improved Lock support.
- New interface: `store.CreateLock` returns a `Locker` interface with
  `Lock` and `Unlock` functions.
- Consul: New locking implementation leveraging helper lock
  implementation that comes with the go library.
- ZK: Lock support using the library helpers.

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-13 16:15:19 -07:00
Alexandre Beslic 8e7447c040 Merge pull request #779 from vieux/watch_varargs
user varargs in store the watch callback
2015-05-13 15:49:55 -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 0b45fa5154 user varargs in store the watch callback
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-05-13 15:42:44 -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 54dfabd252 Merge pull request #778 from mavenugo/store
GetRange and WatchRange to return {key,value,index} tuple
2015-05-13 15:14:28 -07:00
Madhu Venugopal 0130c2262d GetRange and WatchRange to return {key,value,index} tuple
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-05-13 11:24:03 -07:00