- May 21, 2009
-
-
Iustin Pop authored
-
Iustin Pop authored
This patch switches from plain read to a wrapper over readsPrec that returns better error messages than the buildin 'Prelude: no parse'.
-
Iustin Pop authored
This allows easy checking for valid format of the input data (row-wise).
-
- May 20, 2009
-
-
Iustin Pop authored
This patch converts loadTabular and loadData to a monadic form, thus allowing meaningful error messages from the node/instance load routines.
-
Iustin Pop authored
D'oh, one can extract from a wrapped variable, not only from functions.
-
Iustin Pop authored
This patch changes Cluster.loadData to return a Result, instead of directly the values; this will allow us to return meaningful error values (e.g. when an instances lives on unknown node) rather than simply abort. Currently the result is always an Ok, the actual signalling of errors will come later. Its callers are changed to accommodate for the new return type and to display errors as needed.
-
Iustin Pop authored
In case we pass a fully-specified URL to hscan, currently it will use as is and that means the directory in which we want to save the status files changes from what we mean. This patch changes hscan to replace all slashes in the cluster name with underscores when generating the output filenames.
-
Iustin Pop authored
This patch adds a very dumb way to override the port and scheme for RAPI: if the master string doesn't contain a colon, we consider it a simple hostname specification, and thus prepend ‘https://’ and append ‘:5080’, (the default RAPI port); otherwise, we consider it a fully specified URL, and don't do any mangling to it. This allows to use saved RAPI responses in testing, with the “file://” scheme, or to use another port or non https mode with an actual RAPI instance.
-
Iustin Pop authored
Now that we dropped 1.2 compatibility, we can removed the special casing for RAPI differences.
-
Iustin Pop authored
We don't really needed, but is more clean like this.
-
Iustin Pop authored
This big patch converts from our home-grown monad-like constructs (the Either stuff) to a real, Either-like-but-another-name monad. We introduce a “Result a” monad, and this allows dropping many of the extra constructs. Hopefully the code is also more clear. Many of the functions could now be written in a generic-monad style, instead of Result specifically, but that will come in future patches. IAlloc.hs also has some unrelated patches.
-
Iustin Pop authored
Adding a small request type data structure.
-
- May 19, 2009
-
-
Iustin Pop authored
-
Iustin Pop authored
This is just a cosmetic (I hope) change; the nodes shouldn't be used anyway, and we only correct the display message.
-
Iustin Pop authored
Since we only support Ganeti 2.0, we drop the 1.2 compatibility.
-
Iustin Pop authored
This patch drops compatiblity with Ganeti 1.2 and adds support for offline nodes in the cluster. When reading from RAPI, the drained nodes are considered offline so that we don't allocate on them too.
-
- May 18, 2009
-
-
Iustin Pop authored
We know have a working parseData function that returns the node and instance data. This uncovered bad support for non-drbd instances
☹️ -
Iustin Pop authored
This patch moves the generic/reusable JSON functions to Utils.hs, so that they're shared between RAPI/IAlloc.
-
Iustin Pop authored
This will be used in two ways: - format the response to Ganeti (easy, implemented) - parse the input data and build the node/instance lists (hard :)
-
Iustin Pop authored
-
- Apr 26, 2009
-
-
Iustin Pop authored
This option is the opposite of the --verbose option, and it allows decreasing the verbosity level from the default of one to zero (which currently doesn't show the warning messages for missing disk/memory).
-
- Apr 25, 2009
-
-
Iustin Pop authored
This patch moves the oneline format into a separate function for easier usage.
-
Iustin Pop authored
For clusters with no instances, there is no point in computing either the score or in running the algorithm. In this case, we exit prematurely and when running in one-line mode we show dummy information.
-
Iustin Pop authored
This new parameter causes the algorithm to finish (or even not start at all) if we reach/have a score better than it.
-
Iustin Pop authored
In some case we manually do “if isNothing … then Nothing else …”, which can be very easily replaced with a monadic construct in the Maybe monad.
-
- Apr 21, 2009
-
-
Iustin Pop authored
It was missing a dependency on the Version.hs file, so right after “make clean”, a “make dist” used to fail.
-
Iustin Pop authored
-
- Apr 20, 2009
-
-
Iustin Pop authored
Since Xen seems to “steal” some amounts of memory (depending on total node memory), we increase the maximum allowed missing memory to 512MB, based on gathered data from multiple machines.
-
Iustin Pop authored
This patch documents the environment variables in the man pages of hbal and hn1.
-
Iustin Pop authored
This patch adds support for selecting the instance/node file names via two environment variables (HTOOLS_NODES, HTOOLS_INSTANCES). Unfortunately we still have lots of duplicated code, since the options are not unified.
-
Iustin Pop authored
Neither hbal nor hn1 take any arguments beside the options, so if any are passed is most likely an unintended error. This patch aborts in such cases.
-
Iustin Pop authored
Use the $HPROGS variable instead of hardcoding the program names.
-
Iustin Pop authored
-
- Apr 18, 2009
-
-
Iustin Pop authored
This patch adds support in hbal for writing the command list to a shell script, with error checking and allowing for early exit.
-
- Apr 16, 2009
-
-
Iustin Pop authored
Since it's easy to pass a wrong node name as offline, we should abort instead of silently ignoring it.
-
- Mar 23, 2009
-
-
Iustin Pop authored
-
Iustin Pop authored
This removes most of the content of the README file (obsoleted by new algorithm and man pages), modifies the Makefile to include the built documentation in the source archive (so that haddock/hscolour are not needed) and updates the haddock-prologue with current information.
-
Iustin Pop authored
This moves some data from README to the man pages and has other general improvements.
-
- Mar 22, 2009
-
-
Iustin Pop authored
This small patch adds disk space checks to the Cluster.checkData function, and simplifies a little the warning messages.
-
Iustin Pop authored
For Ganeti 1.2 which doesn't have the ‘disk_usage’ instance query field, we need to manually include the DRBD overhead (per disk). This patch modifies the RAPI collection to do this, but loading from disk does not as it's unknown if the query came from hscan or RAPI 1.2 or RAPI 2.0...
-