31 Commits

Author SHA1 Message Date
Adam Shannon
5ecfe3c477 physical/zk: Ignore ErrNoNode when deleting znodes (#2256) 2017-01-11 09:42:30 -05:00
Paweł Rozlach
261cc52cbc Post-review fixes for file/zk recursive empty prefix delete 2016-10-05 08:08:00 -04:00
Pawel Rozlach
d13c10ffe3 Fix zookeeper backend so that properly deletes/lists secrets.
This patch fixes two bugs in Zookeeper backends:
 * backend was determining if the node is a leaf or not basing on the number
   of the childer given node has. This is incorrect if you consider the fact
   that deleteing nested node can leave empty prefixes/dirs behind which have
   neither children nor data inside. The fix changes this situation by testing
   if the node has any data set - if not then it is not a leaf.
 * zookeeper does not delete nodes that do not have childern just like consul
   does and this leads to leaving empty nodes behind. In order to fix it, we
   scan the logical path of a secret being deleted for empty dirs/prefixes and
   remove them up until first non-empty one.
2016-10-04 21:56:12 +02:00
Jeff Mitchell
68345eb770 Convert to logxi 2016-08-21 18:13:37 -04:00
Jeff Mitchell
a347917044 Turn off DynamoDB HA by default.
The semantics are wonky and have caused issues from people not reading
docs. It can be enabled but by default is off.
2016-07-18 13:19:58 -04:00
Sean Chittenden
455b76828f Add a *log.Logger argument to physical.Factory
Logging in the backend is a good thing.  This is a noisy interface change but should be a functional noop.
2016-04-25 20:10:32 -07:00
Eyal Lupu
b99a3f48fe typo in comment 2016-02-19 13:28:02 +00:00
Eyal Lupu
ef53b7990b 'Eagerly' parse ZK authentication and authorization to fast-fail bad configuration 2016-02-19 13:24:57 +00:00
Eyal Lupu
3886d68de3 1. gofmt
2. Change if expr syntax to be consist with the rest of Vault code
3. More details on error message
2016-02-19 12:19:01 +00:00
Eyal Lupu
4b709a7a7a https://github.com/hashicorp/vault/issues/1058
Make sure locks are also using the same auth info as data
2016-02-15 15:29:08 +00:00
Eyal Lupu
ed1c4d9809 fixes to https://github.com/hashicorp/vault/issues/1058
Configuration now supports:
- auth_info
-znode_owner
2016-02-15 15:03:12 +00:00
Armon Dadgar
fce7c43b98 physical/zk: Fixing node representation. Fixes #416 2015-07-13 19:33:23 +10:00
Armon Dadgar
f2534396e0 physical/zk: remove recursive delete behavior, still broken 2015-07-13 19:05:17 +10:00
Joe Beda
cde4b7f1dd Fix zookeeper break.
Fixes #393.
2015-07-04 16:03:02 -07:00
Ken Breeman
794cca7f85 Cleaned up error handling and HA lock monitoring for zookeeper physical backend based on PR feedback. 2015-05-28 00:39:12 -04:00
Ken Breeman
7c5892d26d Cleaned up zookeeper_ha locking, added tests and cleanup. 2015-05-26 00:12:16 -04:00
Ken Breeman
df12702f68 Improvements based on PR feedback: removed empty detectAddress function, moved anonymous functions to named ones, added localLock mutex around i.held 2015-05-25 22:14:00 -04:00
Ken Breeman
0805ce27e6 Restore backwards compatibility for zookeeper physical backend. Vault already prevents locks and data from overlapping internally. 2015-05-20 23:15:31 -04:00
Ken Breeman
87b8f19d06 Merge branch 'master' into physical_zookeeper_ha
Conflicts:
	physical/zookeeper.go
2015-05-20 22:59:37 -04:00
Ken Breeman
df0d430c00 Implement HA lock loss detection for zookeeper physical backend 2015-05-20 22:54:35 -04:00
Spencer Herzberg
dc1b219178 recursive zk delete 2015-05-12 11:50:32 -05:00
Spencer Herzberg
a2570da981 fixes #189; zk version conflict
* multiple Puts to the same node causes zk errors
2015-05-12 09:12:00 -05:00
Ken Breeman
5e9e9cfff6 Rough implementation of Zookeeper HA physical backend. Contains breaking changes to 'path' config. Has unresolved TODO's. 2015-05-12 00:37:08 -04:00
Armon Dadgar
2c8ecd53bc physical/zk: Style changes and more error checking 2015-05-06 11:08:26 -07:00
Spencer Herzberg
106ef3cc0f fixing default zookeeper port 2015-05-06 08:57:24 -05:00
Spencer Herzberg
9b42038bea be optimistic on zk paths operations
* zk requires paths to be set or the client returns an error
* catch these errors instead of creating the full path
2015-05-05 21:23:24 -05:00
Spencer Herzberg
c4472a2446 cleanup zk HA leftover docs 2015-05-05 17:22:43 -05:00
Spencer Herzberg
e8f8dcbc12 properly default zk address to localhost 2015-05-05 17:20:38 -05:00
Spencer Herzberg
f54accba48 limit round trips on zk delete 2015-05-05 17:14:41 -05:00
Spencer Herzberg
16f9313fdd fixing comment; bad copy-paste-edit 2015-05-05 16:56:49 -05:00
Spencer Herzberg
55f1a7c4d9 initial implementation of non-ha zookeeper 2015-05-05 16:49:18 -05:00