- Jul 07, 2009
-
-
Iustin Pop authored
This patch changes Cluster.totalResources to compute more resources and prints them in hspace.
-
Iustin Pop authored
Currently the cluster score calculation includes an offline instance percentage, expressed as “offline inst / (offline + online inst)”, which results in NaN for empty clusters. This patch changes the calculation such that clusters with no offline instances (this criteria includes completely empty clusters) get a score of zero on this component of the total score.
-
- Jul 06, 2009
-
-
Iustin Pop authored
This patch changes the function Cluster.computeMoves to use guards and a couple of subexpressions in order to greatly simplify it.
-
Iustin Pop authored
This big patch cleans up the code per hlint indications. Many removals of extra parentheses, replacements of concat . map with concabtMap, extra dollar signs, eta reductions, etc. were performed. The code still compiles and passes a couple of manual tests on sample files. The individual changes are also small enough as to be visually easy to confirm.
-
- Jul 05, 2009
-
-
Iustin Pop authored
Currently the allocation/move operations workflow return ‘Maybe a’, which is very convenient but loses all details about the failure mode. This patch introduces a new data type which encodes the specific failure mode. It is not yet used correctly (e.g. all node operations result in FailN1), but the workflow is updated. Most of the changes are in the hail/hspace tools, the library code required only trivial adjustments.
-
Iustin Pop authored
hn1 was deprecated for a while and this patch removes it altogether. The support code in Cluster.hs is also removed.
-
- Jul 03, 2009
-
-
Iustin Pop authored
This uses the newly-added Node.availDisk to compute the actual available disk correctl, and display the total allocatable disk in hspace.
-
- Jul 02, 2009
-
-
Iustin Pop authored
Currently totalResources returns a 5-tuple of integers. This is not easy to handle, as each change on the return type means that each caller must be updated. This patch adds a new type for cluster stats and uses that instead as its return type. This simplifies its callers while complicating only a little the computation of the stats.
-
Iustin Pop authored
This patch changes Cluster.totalResources to compute more details about the cluster status, and enhances hspace to display more of these.
-
- Jun 16, 2009
-
-
Iustin Pop authored
-
- Jun 11, 2009
-
-
Iustin Pop authored
In a few places (e.g. tryRead or any printf call) it's a little bit hard to add the correct type signatures, but in the it is possible to fix these warnings (which can bite one in subtle cases).
-
Iustin Pop authored
This is just some cleanup of the node list output, adding pcpu/vcpu counters, and making the display slightly nicer.
-
- Jun 10, 2009
-
-
Iustin Pop authored
-
Iustin Pop authored
This patch adds cpu-count related attributes to nodes: - total cpus - cpus in use - ratio of virtual:physical cpus We also set correctly the cpu values at load time, but we don't do anything yet while moving instances around. The cpu ratio is shown in the cluster list.
-
- Jun 04, 2009
-
-
Iustin Pop authored
During a replace-primary instance move, on the real cluster the instance is temporarily started on the secondary, and as such we must check that the secondary node can hold it for this duration. Currently the code does not, and depending on cluster scoring it will put instances on such 'bad' secondaries (usually without enough memory). This patch fixes this by adding/removing the instance as a primary on the secondary node; and then using the result node as the new secondary. (Since we're in a monad, we could have just tried the allocation and dropped the result, but this is more clear).
-
- Jun 01, 2009
-
-
Iustin Pop authored
Currently tryAlloc/tryReloc do not return the new instance, as this is not needed for IAllocator alloc/reloc requests. However, for computing the space, the new instance is useful, so we modify these functions to return this information too. The patch also improves hspace to have (with default parameters) a parseable output.
-
Iustin Pop authored
This doc-patch adds copyright and license information to (hopefully) all needed files.
-
Iustin Pop authored
-
Iustin Pop authored
These are generic enough to be used from multiple places, they belong better in Cluster.hs than in the hail source.
-
Iustin Pop authored
Also replace a type with its synonim.
-
Iustin Pop authored
This patch does only doc build changes, doc changes and function move around (for more logical documentation). It should have no impact at all on the code.
-
- May 27, 2009
-
-
Iustin Pop authored
-
Iustin Pop authored
This is a first step towards full datatype renaming. That requires more changes, so at first we only want to document clearly what is a node index, what is an instance index, and what is a plain Int.
-
- May 26, 2009
-
-
Iustin Pop authored
This patch makes the Types module a base module, and Node/Instance ones import it, from the previous (opposite) situation. This will allow in the future to use newtypes for the index and name types.
-
- May 25, 2009
-
-
Iustin Pop authored
This patch implements non-mirrored instance allocation, by allocating as secondary node “noSecondary”.
-
- May 24, 2009
-
-
Iustin Pop authored
This patch implements allocate for two node requests. One node requests can be done as soon as we have a valid allocateOn function for single nodes.
-
Iustin Pop authored
This patch completes the implementation of hail relocate. It maps all valid destination nodes through a ReplaceSecondary IMove, filters out the failed relocations, computes the resulting scores and picks the lowest one.
-
- May 23, 2009
-
-
Iustin Pop authored
This patch removes all uses of ktn/kti from the past-loader stages.
-
Iustin Pop authored
Since we have Node/Instance.name, we can now simplify a few constructs.
-
Iustin Pop authored
This moves the remaining loading function to Loader (together with its associated support functions).
-
- May 22, 2009
-
-
Iustin Pop authored
This new big patch does a couple of more cleanups in the loading of data chapter: - introduce a Types module that holds most types (except the base Node/Instance/etc.) so that multiple other modules can use these (instead of only Cluster and its users) - bring IAlloc.hs in line with the recent changes of providing data types and not strings - removal of obsolete Utils.hs json-related functions
-
Iustin Pop authored
This big patch changes the loader model from “string data as common format” to actual object structures as common format. The text loading function move from Cluster.hs to a new Text.hs module, some common functions are moved to a new Loader.hs module, and the return values from both Rapi.hs and Text.hs are uniformized.
-
- May 21, 2009
-
-
Iustin Pop authored
This patch adds experimental support to hbal for non-redundant instances (i.e. instances with only one node). They are currently handled as non-moveable, and as such the algorithm simply ignores them. Supports needs to be added when reading from RAPI via hscan, and probably in other corner cases.
-
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
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.
-
- May 19, 2009
-
-
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
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.
-