Commit Graph

19 Commits

Author SHA1 Message Date
Zack Cerza
962a9ae2bb Add '# noqa' to suppress a linter error
Fixing this would require some more significant changes... and tempt me
with rewriting every module in the directory.
(cherry picked from commit 3fc39a59fd415a4e4e6f2a0354fe900477167e51)
2013-09-26 14:02:51 -05:00
Zack Cerza
a2c9bdc7ba Fix undefined name errors
(cherry picked from commit f59497ef2214f29d5995435d83766c7994e8f2cd)
2013-09-26 14:01:17 -05:00
Zack Cerza
b301a741f0 Make teuthology.locker a module 2013-09-26 14:00:01 -05:00
Zack Cerza
3981a8f1af Never use 'except:' without specifying an Exception. 2013-08-30 11:10:05 -05:00
Sandon Van Ness
c22b941ed9 Update keys if they have changed before locking
Signed-off-by: Sandon Van Ness <sandon@inktank.com>
2013-06-27 14:08:09 -07:00
Josh Durgin
2a1cdda90d locker: try to make up for apache timeouts
If the lock request succeeds in updating the db, but the client gets a
timeout from apache, they can now try again and get back the machines
they just locked.

Only automatic runs have a description set when locking several
machines, so this does not affect users of teuthology-lock
--lock-many, where no description can be set in the same request.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2013-03-29 16:34:15 -07:00
Sage Weil
a40b850eb3 locker: log desc too
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-29 14:27:13 -07:00
Sage Weil
bc54a8bfaa locker: make desc optional
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-26 13:27:53 -07:00
Sage Weil
8eabe1bb4a locker/api: fix DELETE
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-26 11:40:13 -07:00
Sage Weil
56820b3bad locker: set desc on lock
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-25 16:47:02 -07:00
Sage Weil
6208af93ba locker: clear desc on unlock
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-25 16:47:02 -07:00
Josh Durgin
e594fcb30f locker: log updates
Note whenever locks are acquired/released, or a machine's description is updated.
Under apache, these will go to error.log.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2013-03-25 15:42:08 -07:00
Sandon Van Ness
030bc7c23d Added support for multiple types of machines.
Added the ability to support multiple types of machines with
--machine-type added to teuthology-lock when used with --lock-many
or --machine-type with teuthology --lock (automated tests). It
defaults to 'plana' and the 'vps' type is currently unused but
should be in the future.

Signed-off-by: Sandon Van Ness <sandon@van-ness.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2013-02-07 13:26:37 -08:00
Josh Durgin
b1a0c1adea locker: fix race in locking
The isolation level is lower than I thought. This made it possible for
two clients to think they both locked the same machines, since the
update would still be modifying each row to change the locked_since
time.
2011-11-03 11:29:18 -07:00
Josh Durgin
4630a0a1c0 lock server: configure for apache with mod_wsgi 2011-07-19 18:37:05 -07:00
Josh Durgin
81bebfca09 lock server: return host pubkeys with locked machine names 2011-07-19 17:13:13 -07:00
Josh Durgin
77174bdaca lock server: allow sshpubkey to be updated 2011-07-19 17:13:13 -07:00
Josh Durgin
160174cb8b Update lock db schema. 2011-07-19 17:13:13 -07:00
Josh Durgin
dbf5e54307 Add simple lock server HTTP interface. 2011-07-07 12:32:51 -07:00