Migrate etcd driver from 'go-etcd' to etcd/client#75
Conversation
|
@abronan that is a good idea. |
This commit migrates the old 'go-etcd' client, which is deprecated to the new 'coreos/etcd/client'. One notable change is the ability to specify an 'IsDir' parameter to the 'Put' call. This allows to circumvent the limitations of etcd regarding the key/directory distinction while setting up Watches on a directory. A conservative measure to set up a watch that should be used the same way for etcd/consul/zookeeper is to enforce the 'IsDir' parameter with 'WriteOptions' on 'Put' to avoid the 'NotANode' error thrown by etcd on Watch call. Consul and zookeeper are not using the 'IsDir' parameter. Signed-off-by: Alexandre Beslic <[email protected]>
f19ad23 to
156c780
Compare
|
I'll try it out this afternoon. |
968f38c to
d635a8e
Compare
|
Using the ux branch of docker with this libkv branch and the linked libnetwork branch, I'm hitting the following build errors. |
|
@tomdee I had the same issue when testing, you need to make sure those packages are in the |
|
vendor.sh takes so long to run since it deletes and clones everything so I just checked the packages out manually, e.g. I'm hitting another issue now, I guess because I'm using the I can fix up those two lines and get it to build, so I'm testing with it now. |
|
Docker was crashing every time I tried to create a container. I've switched to using the master branch of docker, but docker is still crashing. When I create a container I get |
|
@tomdee sorry about that. the existing changes in libnetwork needs some minor fixes on the docker side to make a clean vendor-in. Can you please do this specific change : mavenugo/docker@6107884#diff-832e27741e70367e5566a720c88b8f32L646 and it should work fine after that. |
|
It's with the new UX right? I remember testing without it and it was working so not sure if related or not. |
|
@abronan @mavenugo I was trying exactly the branches I listed above 😄 Master docker with the two branches from abronan I'm guessing that this merge moby/moby@33e9d70 broke things with with the version of libnetwork from abronan |
|
Yeah I was probably using a version of Will retry with master once things are stabilized with the new IPAM driver. |
|
LGTM |
|
After a pass of testing on Merging as this is a blocker for other PRs. Thanks @tomdee for testing! Let's move this discussion in moby/libnetwork#582 |
Migrate etcd driver from 'go-etcd' to `etcd/client`
|
👍 |
Migrates the
etcddriver codebase fromcoreos/go-etcd(deprecated) tocoreos/etcd/client.Amongst the notable changes you can now specify an
IsDirparameter toWriteOptionswhich allows to circumvent the directory/key distinction on creating a key withPutand watching that key withWatch.Until
etcdAPIv3 is finalized, a conservative measure is to passisDir:truetoPutbefore callingWatchon that key so that it is considered as a directory foretcd. Consul and zookeeper are ignoring this parameter.(Tests have been slightly changed notably for
AtomicPutbecause0is interpreted asignorewith the new client)This needs to be tested against
swarmandlibnetworkfirst.Fixes: #53
Related to moby/libnetwork#577
Signed-off-by: Alexandre Beslic [email protected]