History | View | Annotate | Download (3.7 kB)
Instance relocation: stay within the current group
This patch adds a new top-level relocation function that restricts therelocation to the instance's group, and switches hail to it.
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Balazs Lecz <leczb@google.com>
Move part of the loader pipeline to ClusterData
Convert Loader.RqType to ClusterData
Simulation backend: allow multiple node groups
This patch changes the behaviour of the --simulation option to be anincremental option, where each new use defines a new node group. Thisallows simulation of more complex clusters.
Signed-off-by: Iustin Pop <iustin@google.com>...
hail: display group names in info messages
This patch switches from the group index to the group name for theinformational messages in the hail results.
hail: allow overriding cluster data from requests
Currently, it's not easy to generate “fake” IAllocator request filesfor hail. As such, testing on simulated clusters is hard to do.
To workaround this, we change hail to also take the ‘-t’ and‘--simulate’ options, so that we can override the cluster data read...
Rework the data loader pipelines to read groups
This (invasive) patch changes all the loader pipelines to read the nodegroups data from the cluster, via the various backends. It is invasiveas it needs coordinated changes across all the loaders.
Note that the new group data is not used, just returned....
hail/allocate: implement multi-group support
This is a bit hackish. We add a new function that takes the input data,splits it into groups, runs the original tryAlloc for each group, andthen chooses the best solution, but adds the log messages from all the...
hail: remove the custom info message generation
Since the solutions are "self-annotated", we can remove the custom codefrom hail, and just keep a very small processResults function.
After this change, allocation/failure shows the new detailedinformation....
Change AllocSolution from tuple to its own type
Tuples are good for two, three, at most four elements. Beyond that, thecontinuous pattern matching and construction/deconstruction becomestedious.
Since in the future we'll probably keep more information in the...
Cleanup AllocSolution after AllocElement changes
Since we added the score to AllocElement, we don't need to wrapAllocElement in yet another tuple, just to attach the cluster score. Sowe simplify the AllocSolution type.
AllocElement: extend with the cluster score
AllocElement, a type used as a result of allocations, holds the statusof the nodes after the allocation. In most cases, we'll compare thisallocation result with others, to see which allocation decision makesthe most sense. This comparison is done via the cluster score....
Stop modifying names for internal computations
Currently the name used internally is modified and holds the shortenedname of the nodes/instances. This has caused issues before, since wealways have to strip the suffix from input data and reapply it if we...
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.
Implement IAllocator node evacuate request
This patch adds the new request loading/execution (trivial), but theactual response formatting becomes more difficult as now the responsetype differs by request.
Signed-off-by: Iustin Pop <iustin@google.com>
Change an internal type from Maybe to list
In preparation for multiple responses, we change from Maybe to List(both used in the container sense).
This allows us to keep the same workflow for all kind of requests.
hail: add '-p' option intended for debugging use
This prints the initial node list on stderr, since stdout is reserved for theiallocator protocol (even though ganeti won't pass -p itself).
Read cluster tags in the IAllocator backend
Turn on, and fix, more warnings
The Makefile was intented to be -Wall and not simply -W, but I missedthat. This enables more warnings and also enables -Werror (except forthe tests).
Unify the command line options and structures
This patch moves all the command line options and their internalrepresentation into CLI.hs. This means that duplicated options betweenany two binaries are no longer declared twice, and that we no longerneed the two *Option classes.
Change the tryAlloc/tryReloc workflow
Currently, the tryAlloc and tryReloc function return a list with all theresults, both failures and successes. This is fine for hail, which doesone round of allocations, but is not so good for hspace, which doesiterative rounds; since at each (successful) step we only take the best...
Slight change to the internal allocation results
Currently the Cluster.AllocSolution type is defined as a list of‘(OpResult Node.list, …)’ and the results for applyMove are defined as‘(OpResult Node.List, …)’. Both these means that the failure/successindication is hidden in the first elements of this tuple, which makes is...
Show errors on stderr instead of stdout
Currently many of the exit and warning conditions mistakenly display errormessages on stdout, which makes parsing the output of programs harder. Thispatch attempts to fix such occurrences.
Fix hlint-generated warnings
This big patch cleans up the code per hlint indications. Many removalsof 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...
Introduce a new type for allocation results
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...
Fix 'unused X' warnings
This removes some unused functions and imports to cleanup the warnings.
Fix the various monomorphism warning
In a few places (e.g. tryRead or any printf call) it's a little bit hardto add the correct type signatures, but in the it is possible to fixthese warnings (which can bite one in subtle cases).
Rework the tryAlloc/tryReloc functions
Currently tryAlloc/tryReloc do not return the new instance, as this isnot needed for IAllocator alloc/reloc requests. However, for computingthe space, the new instance is useful, so we modify these functions toreturn this information too....
Add copyright/license information
This doc-patch adds copyright and license information to (hopefully) allneeded files.
Move some alloc functions from hail into Cluster
These are generic enough to be used from multiple places, they belongbetter in Cluster.hs than in the hail source.
Move the RqType and Request types to Loader.hs
These two will be more generic than now, and belong somewhere else -Loader.hs is a generic module for data loading, thus we move them there.
Add type synonyms for the node/instance indices
This is a first step towards full datatype renaming. That requires morechanges, so at first we only want to document clearly what is a nodeindex, what is an instance index, and what is a plain Int.
Change the module import hierarchy
This patch makes the Types module a base module, and Node/Instance onesimport it, from the previous (opposite) situation. This will allow inthe future to use newtypes for the index and name types.
hail: don't relocate to current primary node
This patch fixes the relocate-to-primary-node problem, and doesn't markthe excluded nodes as offline anymore (we don't use them anyway, solet's not use a different/fake cluster state).
hail: do not allocate on offline/drained nodes
This patch implements filtering out of the offline/drained nodes andfixes a bug in IAllocator.hs parsing (similar to an older bug in Rapi.hsfrom where the code was copied).
hail: cleanup unused options
hail: Implement non-mirrored instance allocation
This patch implements non-mirrored instance allocation, by allocating assecondary node “noSecondary”.
hail: unify the post-processing of results
Both allocate and relocate compute new node lists, whose score must beranked and the best option chosen. This means we can convert the code toa generic function.
Implement hail allocate (for 2-node requests)
This patch implements allocate for two node requests. One node requestscan be done as soon as we have a valid allocateOn function for singlenodes.
Working implementation if relocate
This patch completes the implementation of hail relocate. It maps allvalid destination nodes through a ReplaceSecondary IMove, filters outthe failed relocations, computes the resulting scores and picks thelowest one.
Start implementing the hail functionality
This patch implements a very stupid (and broken) version of hail‘allocate’.
Remove a function in hail
This is not yet used.
Remove some extraneous uses of ktn/kti
Since we have Node/Instance.name, we can now simplify a few constructs.
Introduce a class for CLI options
This patch generalizes a little the CLI handling by not passing in aspecial function for help and such, but instead requiring that theoptions object supports some common functionality.
More code reorganizations
This new big patch does a couple of more cleanups in the loading of datachapter: - 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)...
Initial work on hail
This makes hail compile and get a request parsed via IAlloc, but nothingmore.