Commit Graph

14 Commits

Author SHA1 Message Date
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