401 Commits

Author SHA1 Message Date
Joshua Harlow
ed7cf36f5b Remove tested under 2.6 from docs
We haven't tested under 2.6 in a while so remove
it from being mentioned in the docs.

Change-Id: I2bba68f1b2a2c7d51ecaac1a75808ec957bb0db1
2015-12-19 17:40:57 -08:00
Jenkins
da0aa69a7c Merge "Add basic file content schema validation" 2015-12-19 03:23:44 +00:00
Jenkins
e300002255 Merge "Make all locks operate the same when fetched from different coordinators" 2015-12-18 21:21:01 +00:00
Jenkins
b7eb017b84 Merge "Spice up the driver summary/info page" 2015-12-18 21:18:42 +00:00
Joshua Harlow
815c363de9 Add basic file content schema validation
Using jsonschema we can validate (at a basic level)
that the files created and the contents written were
not altered to be of a different format so add some
basic format validation to help in detecting format
issues/changes.

This also avoids having to use type errors to try to
detect this same kind of tampering/data format change.

Change-Id: I80b4e560f24162e079cf4adab06d35ec75f4b70c
2015-12-17 18:02:35 -08:00
Joshua Harlow
24621a5d20 Spice up the driver summary/info page
Start to organize this page with a more helpful structure
that will allow people to read it and figure out which driver
best fits there usage (and to help people decide which ones
don't).

Change-Id: I871d2eb7e7493a6633f7738ff063042d39690364
2015-12-17 13:06:17 -08:00
Joshua Harlow
ba3c23cf42 Make all locks operate the same when fetched from different coordinators
Instead of having one outlier lock class (file locks) which fetch
the same lock object from different coordinators have each coordinator
that is using the file driver return different locks and only share
the absolute minimum of components to ensure this is done in a safe
manner (due to lack of thread awareness in process based locks).

Change-Id: I32d22230cb0165ccfbb39b6e97f12f906836b0e1
2015-12-17 10:56:32 -08:00
Jenkins
c08caaef07 Merge "Add noted driver weaknesses onto the drivers docs" 2015-12-17 18:03:48 +00:00
Joshua Harlow
9960deb8da Add noted driver weaknesses onto the drivers docs
For the greater good!

People supposedly don't read the docs or warnings anyway (since people
can't read and understand capabilities of drivers they use) so this
is a best effort attempt at trying to tell people about using these.

Change-Id: Id1749839f7af6bbafb82ab000844294700d74213
2015-12-15 15:16:13 -08:00
OpenStack Proposal Bot
fd36017628 Updated from global requirements
Change-Id: I6be25677470a03a3d45877442e4e9fd1d93ab995
2015-12-15 19:01:12 +00:00
Jenkins
a5cd1c34c4 Merge "Reduce duplication of code in handling multi-type blocking argument" 2015-12-15 12:47:52 +00:00
Jenkins
935c223105 Merge "File: read member id from file with suffix ".raw"" 2015-12-15 12:45:39 +00:00
ChangBo Guo(gcb)
472b640809 File: read member id from file with suffix ".raw"
Current we store member information in file with suffix ".raw",
To be explicit, we can skip other files, that make us add other type
information file without breaking method get_members.

Change-Id: Ic215f0d51c2440c0847bf11eec3c84d8aebabec1
2015-12-12 11:16:47 +08:00
Joshua Harlow
963bba02a0 Reduce duplication of code in handling multi-type blocking argument
The 'blocking' argument typically either means blocking as a bool
or blocking true but with the given timeout, so in various drivers they
handle this multi-type argument in nearly the same manner. To unify
that usage we can just have a utils method that breaks the multi-type
argument into its components and uniformly use that in drivers.

Change-Id: I0a6c4b50919fab72d383b9c9f2e772fc931cb6b8
2015-12-11 15:54:29 -08:00
OpenStack Proposal Bot
5f0be849f3 Updated from global requirements
Change-Id: I6aa1d9767f5da59c88b940f6ca7ed56abff41166
2015-12-11 15:27:10 +00:00
Joshua Harlow
b03a306a7d Add comment in memcache explaining the current situation with lock release
Change-Id: I6a24c121c7e09af09cccc37d433d6cdd8a4fa315
2015-12-10 13:12:12 -08:00
Jenkins
f9a9a18b1c Merge "Add 'is_still_owner' lock test function" 2015-12-10 07:53:14 +00:00
Jenkins
bbfe40bc26 Merge "Add 'requires_beating' property to coordination driver" 1.28.0 2015-12-03 10:25:01 +00:00
Joshua Harlow
f68b5ca186 Add 'requires_beating' property to coordination driver
Certain functionality of drivers must be observed when
using a given driver (for example calling periodically
into the heartbeat method) by the user of a coordination
driver so to start with an important one explicitly
declare (and make introspectable the periodic_heartbeat
requirement that certain drivers demand to
operate correctly).

Change-Id: I999a6f8a9fa0bd4bb9ce16370cc38dac4043b085
2015-12-02 11:54:02 -08:00
Jenkins
81ac159c00 Merge "tests: allow ipc to bypass blocking=False test" 2015-12-02 16:55:21 +00:00
Jenkins
7b826e019a Merge "pgsql: remove unused left-over code" 2015-12-02 16:55:09 +00:00
Julien Danjou
df3363e2ea {pg,my}sql: fix AttributeError on connection failure
If connection fails to be established, the acquired attribute does not
exist and then you see warning such has:

Exception AttributeError: "'MySQLLock' object has no attribute 'acquired'" in
<bound method MySQLLock.__del__ of <tooz.drivers.mysql.MySQLLock object at 0x7f79479056d0>>

Change-Id: Id61775483c91ba4127d9dd8cb56d6629a51d7081
2015-11-27 12:13:31 +01:00
Julien Danjou
07f3ad9290 tests: allow ipc to bypass blocking=False test
Running the tests on a system with IPC that does not support
non-blocking lock make the test thread fail, and then waiting forever on
the thread.

Allow the test to pass if the driver raises NotImplemented.

Change-Id: I2c9e29d317895080cdb6db7109b2528b8d7761ab
2015-11-26 17:34:32 +01:00
Julien Danjou
7d05322c64 pgsql: remove unused left-over code
Change-Id: I93fe017c32ed2de7462f66dfc2e44aafea768834
2015-11-26 12:07:42 +01:00
Joshua Harlow
fb16225d99 Add 'is_still_owner' lock test function
Distributed locks have the tendency to become acquired
and then after this point, perhaps becoming unacquired since
locks are typically on a remote machine and things like
network disconnects and such can (and do) happen causing
the running application to need an ability to check if it
is still the owner of the lock (and react appropriately).

Change-Id: I31a79a093c14c31b47f7f0b2a7bb06d77a793186
2015-11-19 18:20:31 -08:00
OpenStack Proposal Bot
d272845997 Updated from global requirements
Change-Id: I4c0bdf071c24c8ff4c46136140d610d3b8cc5425
2015-11-19 15:53:50 +00:00
OpenStack Proposal Bot
d7c2d1d4e2 Updated from global requirements
Change-Id: I1fb982064db18005f1df6b5d44a7f8cafe00779b
2015-11-18 20:52:48 +00:00
Davanum Srinivas
4ac05b928d Remove python 2.6 and cleanup tox.ini
* Remove support for python 2.6
* Remove skipsdist : Needs to be set only if 
  sdist is expensive
* Remove usedevelop : only needed when skipsdist 
  is set to True
* Remove install_command : We can just use the 
  default, we don't need to override


Change-Id: If054a295dc58636bd317491e0f6cd454d1821a3e
2015-11-16 00:22:16 +00:00
OpenStack Proposal Bot
3c1dfd8c9d Updated from global requirements
Change-Id: I82a9eef2426db1478c4f4542a4c0630f3bcf1ca7
1.26.0
2015-11-09 12:34:52 +00:00
Joshua Harlow
9c5cb6fd0b Allow specifying a kazoo async handler 'kind'
In situations where the built-in (and default) kazoo
threading async handler does not work (which sometimes
appears to happen under eventlet) allow for specifying
a different handler (ie the 'eventlet' one) that should
work better under those scenarios.

Closes-bug: #1512001

Change-Id: Iec5e39928b223a3ffca0b9b5b4d0fd61abaa0f2b
2015-11-04 23:45:26 +00:00
OpenStack Proposal Bot
924fd939ce Updated from global requirements
Change-Id: I1362b8e0313f9ce353468905ba0713c9ffa13ece
2015-10-19 23:33:54 +00:00
OpenStack Proposal Bot
3b6dcc405f Updated from global requirements
Change-Id: I6055a8249e653a572cf1b86e30f830f8965c3b80
2015-10-16 01:01:49 +00:00
Jenkins
8e25a131d3 Merge "Expose Znode Stats and Capabilities" 2015-10-09 17:13:27 +00:00
Ronald Bradford
645169d2ed Add standard code coverage configuration file
Add the .coveragerc configuration consistent with other projects, specifically to
define including branch = True and omit including tests in the coverage reports

Change-Id: I9c7cdd807ebaaa5ade07be5421063530a5bc6976
2015-10-02 09:09:41 -04:00
Jenkins
20eeeabd7a Merge "docs - Set pbr 'warnerrors' option for doc build" 2015-09-25 19:35:49 +00:00
Davanum Srinivas
5cc62c2f25 docs - Set pbr 'warnerrors' option for doc build
By setting this pbr option in setup.cfg, the doc build will fail in case
of any warnings or errors occur during the build process.

Change-Id: Ia6b9cef8933ade60810a48d1813a6f3b3dc72103
2015-09-24 21:46:09 -04:00
Joshua Harlow
8482fad4ff Include changelog/history in docs
Change-Id: Ic68fc583338c48f829cd36c21e1c2fe654022bf5
2015-09-24 15:06:05 -07:00
OpenStack Proposal Bot
cc729345a5 Updated from global requirements
Change-Id: Iedea200bc9fb9244713d7227b8305055a0424ea5
2015-09-17 12:17:45 +00:00
Vilobh Meshram
a5d2738bf2 Expose Znode Stats and Capabilities
Expose Znode statistics like creation time, update time,
number of children and capabilities(data). This is useful
when the consumer say Nova Servicegroup wants to make
decision based of the content of the Znode information.

Change-Id: I3da8fc0e2c76d83dbd2133bb8a41cc1ffeb6d807
Closes-Bug: #1493990
2015-09-15 16:35:04 -07:00
Joshua Harlow
4ae4173822 Allow more kazoo specific client options to be proxied through
Closes-Bug: #1495663

Change-Id: I3710845f9e66ab574eb358000b859dc96cbf08a0
2015-09-15 10:43:03 -07:00
OpenStack Proposal Bot
f44bd98312 Updated from global requirements
Change-Id: I3839fce6009e759d1a07edbd077da983bce93d49
1.24.0
2015-09-07 15:18:47 +00:00
Jenkins
469d76facb Merge "Changes to add driver list to the documentation." 2015-08-26 20:16:49 +00:00
Jay Clark
3fca529ea3 Changes to add driver list to the documentation.
Change-Id: Ic3c8273813c5147ca9203e761d4ade43d3c2ad31
2015-08-26 15:01:41 +00:00
OpenStack Proposal Bot
7cfb5529bc Updated from global requirements
Change-Id: Ibc718f2d80ab2b464f630b02f11b3d8554572c4f
2015-08-26 14:15:29 +00:00
Jenkins
8a323c5d5c Merge "Make RedisLock's init consistent with other locks" 2015-08-19 01:41:55 +00:00
OpenStack Proposal Bot
6bfc5b87a0 Updated from global requirements
Change-Id: I74bf61f0d1311d398f1b1d9961066f623d02b476
1.22.0
2015-08-13 20:22:49 +00:00
Gorka Eguileor
d01b7d7018 Accept blocking argument in lock's context manager
This patch adds the posibility of passing the blocking argument to the
context manager to be used when acquiring the lock.

Previous behavior will be preserved, so now we will be able to use the
context manager in any of the following ways:

    with lock(10.0):
    with lock(False):
    with lock():
    with lock:

The last 2 are equivalent.

Change-Id: I6d2f486ac45078ec4ce77de52b7997f2122d4dc8
2015-08-11 17:21:12 +02:00
Gorka Eguileor
6b1f477996 Make RedisLock's init consistent with other locks
Right now RedisLock's __init__ method is not calling its super  __init__
method, as it should be doing.

It's also using attribute named "_acquired" instead of "acquired" and
creating a property name instead of using inherited name attribute  like
other methods are.

This patch changes these behaviors to be consistent with other locks.

Change-Id: If642522637c653a1fb9ad345570fe8a53930cd53
2015-08-11 16:59:13 +02:00
OpenStack Proposal Bot
6bfd6ed7ec Updated from global requirements
Change-Id: I258ef98f504b5555c5998966ee5ea741442ed10b
2015-08-10 01:11:10 +00:00
Jenkins
8610434a66 Merge "Expose 'run_elect_coordinator' and call it from 'run_watchers'" 2015-08-05 06:13:53 +00:00