History | View | Annotate | Download (8.4 kB)
Optimise the Luxi.recvMsg function
Since the current buffer cannot contain (during network reads) an EOM,we should look for the EOM only in the newly-received string. Whilethis shouldn't make much difference, in some tests it cuts the recvMsgtotal time by around half....
Complete the client Luxi implementation
All current Luxi calls are supported after this patch. A bug inArchiveJob is also fixed (Ganeti's job IDs are strings).
Add support for more LUXI calls
While not are directly useful, having them will open some possibilities(e.g. polling for job changes in hbal's -X mode, and auto-archiving thejobs once they are successful).
Change the Luxi operations structure
Currently, we define the LuxiOp type as a simple enumeration, and leavethe arguments structure to the users of the Ganeti.Luxi module. This issuboptimal for a couple of reasons: first, we decouple the operationtype from operation arguments, and that means we don't use the type...
Replace fromJResult with annotateJResult
This patch removes all old uses of fromJResult with the annotatedversion, and removes the non-annotated version. All JSON parsing pointsshould now have annotated errors.
A number of small fixes from hlint
Fix unused imports for ghc 6.12
GHC 6.12 has become more picky about unused imports, so we need toremove/tighten some of them.
Read cluster tags in the LUXI backend
Change the Utils.fromObj signature
Currently the fromObj function takes a JSON object which is thenconverted into a list of (String, JSValue) in which we make a lookup.However, most of the callers of this function call it repeatedly on thesame object, which means we do the object→list conversion repeatedly....
More hlint fixes
This makes (for now) the code hlint-clean. This is per se not a hugegain, but it allows easier tracking of regressions in style later(one-two new violations are easier to diagnose when not hidden among 20“known” ones).
Add two specialized Luxi calls
This are higher level wrappers over the basic callMethod.
Signed-off-by: Iustin Pop <iustin@google.com>
Add definitions for more Luxi calls
Split the Luxi generic parts from the loader
The Luxi loader implements both a generic Ganeti Luxi client and theloader; it is better if these two are separated. The patch adds aGaneti/Luxi.hs (not under HTools!) since that is generic for Ganeti, andnot related necessarily to htools.