Comments (8)
(From @springi99)
Until the moving is done related to endpoint top directory (or KeyPrefix):
--- a/vendor/src/github.com/docker/libnetwork/store.go
+++ b/vendor/src/github.com/docker/libnetwork/store.go
@@ -87,7 +87,8 @@ func (c *controller) deleteNetworkFromStore(n *network) error {
if err := cs.DeleteObjectAtomic(n); err != nil {
return err
}
-
+ tmpEp := endpoint{network: n}
+ cs.KVStore().DeleteTree(datastore.Key(tmpEp.KeyPrefix()...))
return nil
}
solves the problem. Sorry about veth pairs they are not belonging to docker.
from libkv.
@springi99 I think the default behavior of List
exiting right away is the right one, this avoids launching a goroutine inappropriately because the failure on List
might be related to a network connectivity issue or a wrong key.
It is to the users of the lib (in this case libnetwork
) to deal with the Watch/WatchTree
failure and catch the appropriate error as well as retry on failure if the Watch
should be restarted.
The missing catch on error 100
still holds though so if you are interested in submitting a patch I'll be happy to review an merge :)
Same goes for the changes you made on libnetwork, it will definitely help on this side as well :)
from libkv.
Hi,
The problem with the WatchTree is the following: networks for defaults (zero, host, bridge) are also creating this watch and it fails with etcd and not with consul. if you compare the consul.go and etcd.go you can see that in case of failure etcd returns with an error and consule not. This is why i thought it is enough to remove that return. For other networks (overlay and custom/remote e.g. openvswitch from shettyg/ovn-docker) creates the right tree structure. for remote networking some features are still missing, but you can substitute them with hand made scripts.
Related to commiting: do you have any process description for that? Unfortunately i am a newbie and I don't know how can I do it officially.
I have other questions related to networking, if you can provide me resources to learn it would be nice:
- the difference between endpoint and service: i am a little bit confused as there are rest apis for both of them but on cli only services can be attached. Currently it seems to me that they are equivalaent but maybe they will mean different things in the future. E.g. on cli i can use only 1 publish and it is splitted up by the code and attach "endpoint" according to the result. If there are more publishes in the cli only the last one is taken. There were some words about "service container" but i did not catch the point. I think endpoint is somehow lighter by concept, mean multiple interfaces to the containers, but there is no cli for that.
Thanks your help!
from libkv.
@springi99 Oh I see, you are right! I think the Get
and List
calls of Watch
/WatchTree
are just misplaced for etcd and should be placed inside the goroutine so that the return actually closes the watch channel (like it's done with Consul). Just tested on the Leader Election recovery of Swarm and it works just fine, so I'd expect it to work as well with libnetwork
. I will submit the PR for this as we also need it for docker swarm.
On the whole process of contributing I think that this contains all you need to get started:
https://docs.docker.com/project/make-a-contribution/
If you need some help on getting started with your first PR, do not hesitate to ping us on our IRC channel: #docker-swarm
Regarding your question on libnetwork
, I think you can ask this on the docker/libnetwork
repository, opening a new Issue. They will provide you with a more in-depth answer that I can provide you and this will also help other users with the same question. Don't want to make a mistake and mislead you on the notion of endpoint and service as things are moving fast on this side :)
Thanks for reporting the issue in the first place though, helps a lot to have users testing things around not only on this repository but on the interaction with other projects! This is a contribution on its own.
from libkv.
Hi,
sorry for the delay... I tried to follow the process, the result can be found here:
https://github.com/springi99/libkv/tree/etcd-fixes
if you think it is ok then tell me what to do. Thanks, robert.
from libkv.
Hi @springi99, sorry for the delay. If you go to your fork (https://github.com/springi99/libkv/) you should see a button "Create pull request" that appears on top. Click on that, and then click "Create pull request" on that new page. Don't worry putting a description there, it's fine for this PR. Let me know if you have any trouble. I can still create it for you and you'll get credit for your work anyway. Thanks!
from libkv.
Hi,
I created it, please check it. Thanks in advance!
from libkv.
Closed by #35
from libkv.
Related Issues (20)
- do libkv support etcd v3? HOT 1
- bug in WatchTree for etcd
- Add function to list all the key-values in the boltdb store HOT 1
- add option to disable quorum for gets with etcd backend HOT 1
- Lock() of Locker interface should probably take a receive-only channel
- In etcd at least, waitLock() ignores an action HOT 1
- A race is possible in etcd's Lock() HOT 1
- Implement a Kubernetes driver
- Panic in older versions of consul
- Active again? HOT 2
- Optionally disable ZooKeeper logging
- Inconsistent reference to license for docs
- When multiple etcd stores are passed to the API. Which one is given preference? HOT 1
- can not get zookeeper path data, node cannot be discovery.
- panic in List() method with boltdb backend
- zookeeper GetW function seems has a atomic error
- possible data race in AddStore()
- implemented a etcd v3 api store HOT 1
- Travis-ci: AMD64 build is failing HOT 1
- Valkeyrie: a maintained fork created by the original author of libkv HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libkv.