| Commit message (Collapse) | Author | Age |
... | |
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
- Removed the leader election and lock modules (not present anymore)
- Added etcd.Client.members to expose the members list
- Fixed etcd.Client.leader to work consistently with 2.x
- Tons of tests fixes/refactoring, still some issues with SSL
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Given the lock and election modules have been removed from etcd in
recent, stable versions, there is no point in keeping this code lying
around. Instead, we will re-implement both functionalities in our
library at a later time. At the moment these just make integration tests
fail with etcd 2.0.x
|
| | | |
|
|\ \ \
| |/ /
|/| | |
Fix etcd.Client.machines
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The etcd proxies are a nice feature of version 2.x, and they just act as
a proxy between the actual cluster and the client. Since there can be
cases (like multi-dc or as a way to add high-availability to the client
in case of a node failure) where proxies will be used, we allow the user
to add a flag to the etcd client so that proxies can be used - in
particular, if you decide to use proxies AND our own reconnection
feature you will be able to connect only to the list of servers that you
passed onto etcd at startup.
This is clearly a downgrade compared to what python-etcd normally
does (when it figures out by itself not only the failure of a machine,
but it will also refresh the list of servers based on the response from
the one still active server we found), but has I stated, complex
environment may need to use proxies.
This commit takes care of that.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
In our old version of the code, etcd.Client.api_execute called
Client.machines in case of failure, which called api_execute in
return. In the scenario of a client with a list of possible servers, and
the first of the list being down, we throw an exception right now,
because of this.
Using directly urllib3 and skipping api_execute in Client.machines
allows us to connect to the first available server.
Closes #51
|
| | | |
|
|\ \ \
| | | |
| | | | |
check if ttl is not None in write
|
| |/ /
| | |
| | |
| | |
| | | |
This resolves a bug where if you set the ttl=0, the ttl never gets
added.
|
| | | |
|
| | | |
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
`watch` function will fail and cause
`etcd.EtcdException: Unable to decode server response` error.
the etcd server actually returns with this error response
{
"errorCode": 209,
"message": "Invalid field",
"cause": "invalid value for \"recursive\"",
"index": 0
}
to fix this, just skip setting query parameter when it's value is None.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The following exception were added:
EtcdKeyError(EtcdException) - Generic Etcd key error
EtcdKeyNotFound(EtcdKeyError) - Etcd key not found (100)
EtcdNotFile(EtcdKeyError) - Etcd not a file (102)
EtcdNotDir(EtcdKeyError) - Etcd not a directory (104)
EtcdAlreadyExist(EtcdKeyError) - Etcd already exist (105)
EtcdEventIndexCleared(EtcdException) - Etcd event index is outdated and cleared (401)
|
|\| |
|
| |\
| | |
| | | |
Recursive watch
|
| | | |
|
| |/ |
|
|/ |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
The etcd build script has chaged the location of the executable so the
travis build scripts need to be changed accordingly.
Signed-off-by: Giuseppe Lavagetto <lavagetto@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
We added EtcdResult.etcd_index and EtcdResult.raft_index as result of
parsing response headers from etcd, as requested in #39. Also, we fixed
the bug in the etcd.Client.write() response when updating a dir ( #38),
which is done by parsing the content of prevNode, which we formerly
discarded. Last, this patch makes etcd.Client.update() finally work
against directories, working around the unusual behaviour of the etcd
server in this respect.
|
|\
| |
| | |
Rename and extend children
|
| |
| |
| |
| |
| |
| | |
This closes #30 as well.
Signed-off-by: Giuseppe Lavagetto <lavagetto@gmail.com>
|
| |
| |
| |
| | |
EtcdResult.get_subtree() method to fetch all objects in a recursive fetch.
|
| |
| |
| |
| | |
Style changes to integration tests
|
| | |
|
|/
|
|
| |
`client.update()` calls to directories were failing because the client sends and empty `value` param with every `client.write()` call. This only sends a `value` param in `client.write()` if `value` is set, which fixes this.
|
|\
| |
| | |
Write accepts etcd result
|
| | |
|
| | |
|
|/ |
|
| |
|
|
|
|
|
| |
Seems as though the documentation was not updated when the timeout args
were added.
|
|
|
|
|
|
| |
If the timeout param for read() was set to 0 to indicate that the
request should not timeout it would actually then be set to None which
would instead use the default timeout value.
|
| |
|
|
|
|
|
| |
In a multi-node cluster, this ensures the returned value is consistent
across the cluster (per xiangli via IRC).
|
|
|
|
| |
precision).
|
| |
|
| |
|