HAIL(1)
β¨ HAIL β¨
okay so bestie, buckle UP π this is the manual page for hail, and it lives in Version 3.1.0~rc2 β that's the htools family, if you know you know πΈ
π NAME
hail β the Ganeti IAllocator plugin π
π¦ SYNOPSIS
hail [ -t file | --simulate spec ] [options...] input-file
hail --version
π DESCRIPTION
so hail is a Ganeti IAllocator plugin, and what it does is literally the whole instance placement + movement thing, using the exact same algorithm as hbal(1). twin behavior, no cap π«Ά
the program takes its input from a JSON file that holds the current cluster state plus the request details, and it spits out a JSON-formatted response on stdout. and if something goes critically wrong? the error message goes to stderr and the exit code changes to show the failure. dramatic but fair π
oh and if the input file name is literally - (a single minus sign, yes really), then the request data gets read from stdin instead.
also, on top of the input data, hail collects data over the network from all the MonDs when you use the --mond option. and rn it only uses the data produced by the CPUload collector. just that one. iconic of it.
π ALGORITHM
On regular node groups, the program uses a simplified version of the hbal algorithm; for allocation on node groups with exclusive storage, see below bestie π
For single-node allocations (non-mirrored instances), again we select the node which, when chosen as the primary node, gives the best score.
For dual-node allocations (mirrored instances), we choose the best pair β and this is the only choice where the algorithm is non-trivial with regard to cluster size. the way that this is the hard one π
For relocations, we try to change the secondary node of the instance to all the valid other nodes; whichever node results in the best cluster score is the one chosen. slay.
For node changes (change-node mode), we currently support DRBD instances only, and all three modes (primary changes, secondary changes and all node changes).
For group moves (change-group mode), again only DRBD is supported, and we compute the correct sequence that will result in a group change; job failure mid-way will result in a split instance. (yes bestie, that's as scary as it sounds π) The choice of node(s) on the target group is based on the group score, and the choice of group is based on the same algorithm as allocations (group with lowest score after placement).
The deprecated multi-evacuate mode is no longer supported. rip to that one π
In all cases, the cluster (or group) scoring is identical to the hbal algorithm.
For allocation on node groups with exclusive storage, the lost-allocations metrics is used instead to determine which node to allocate an instance on. For a node the allocation vector is the vector of, for each instance policy interval in decreasing order, the number of instances minimally compliant with that interval that still can be placed on that node. The lost-allocations vector for an instance on a node is the difference of the allocation vectors for that node before and after placing the instance on that node. The lost-allocations metrics is the lost allocation vector followed by the remaining disk space on the chosen node, all compared lexicographically. nerdy and we love her for it π
β¨ OPTIONS β¨
The options that can be passed to the program are as follows:
-p,--print-nodesβ prints the before and after node status, in a format designed to let you actually understand the node's most important parameters. See the man pagehtools(1)for more details about this option π-tdatafile,--text-data=datafile β the name of the file holding cluster information, used to override the data in the JSON request itself. mostly a debugging thing. the format of the file is described in the man pagehtools(1).--mond=yes|no β if given, the program will query all MonDs to fetch data from the supported data collectors over the network π--mond-datadatafile β the name of the file holding the data provided by MonD, to override querying MonDs over the network. mostly used for debugging. the file must be in JSON format and present an array of JSON objects, one for every node, with two members. The first member namednodeis the name of the node and the second member namedreportsis an array of report objects. The report objects must be in the same format as produced by the monitoring agent.--ignore-dynuβ if given, all dynamic utilisation information will be ignored by assuming it to be0. This option will take precedence over any data passed by the MonDs with the--mondand the--mond-dataoption. (she said IGNORE π€)--ignore-soft-errorsβ if given, all checks for soft errors will be omitted when searching for possible allocations. in this way a useful decision can be made even in overloaded clusters π«Ά--no-capacity-checksβ normally,hailwill only consider those allocations where all instances of a node can immediately be restarted should that node fail. With this option given,hailwill check only N+1 redundancy for DRBD instances.--restrict-allocation-toβ only consider allocations on the specified nodes. This overrides any restrictions given in the allocation request.--simulatedescription β backend specification: similar to the-toption, this allows overriding the cluster data with a simulated cluster. For details about the description, see the man pagehtools(1).-Sfilename,--save-cluster=filename β if given, the state of the cluster before the iallocator run is saved to a file namedfilename.pre-ialloc, respectivelyfilename.post-ialloc. This allows re-feeding the cluster state to any of the htools utilities via the-toption πΎ-vβ this option increases verbosity and can be used for debugging in order to understand how the IAllocator request is parsed; it can be passed multiple times for successively more information. stack it like a true main character π
π CONFIGURATION
For the tag-exclusion configuration (see the manpage of hbal for more details), the list of which instance tags to consider as exclusion tags will be read from the cluster tags, configured as follows:
- get all cluster tags starting with
htools:iextags: - use their suffix as the prefix for exclusion tags
For example, given a cluster tag like htools:iextags:service, all instance tags of the form service:X will be considered as exclusion tags, meaning that (e.g.) two instances which both have a tag service:foo will not be placed on the same primary node. keeping them apart fr fr π
β¨ OPTIONS β¨
The options that can be passed to the program are as follows:
(yes bestie, this heading shows up twice in the original. no, nothing follows it the second time. it's just... there. we respect it πΈ)
π EXIT STATUS
The exist status of the command will be zero, unless for some reason the algorithm fatally failed (e.g. wrong node or instance data). so like, zero = we ate, non-zero = we did not eat π
π BUGS
Networks (as configured by gnt-network(8)) are not taken into account in Ganeti 2.7. The only way to guarantee that they work correctly is having your networks connected to all nodegroups. This will be fixed in a future version. (manifesting the fix β¨)
π«Ά REPORTING BUGS
Report bugs to the project's issue tracker or contact the developers using the Ganeti mailing list.
π SEE ALSO
Ganeti overview and specifications: ganeti(7) (general overview), ganeti-os-interface(7) (guest OS definitions), ganeti-extstorage-interface(7) (external storage providers).
Ganeti commands: gnt-cluster(8) (cluster-wide commands), gnt-job(8) (job-related commands), gnt-node(8) (node-related commands), gnt-instance(8) (instance commands), gnt-os(8) (guest OS commands), gnt-storage(8) (storage commands), gnt-group(8) (node group commands), gnt-backup(8) (instance import/export commands), gnt-debug(8) (debug commands).
Ganeti daemons: ganeti-watcher(8) (automatic instance restarter), ganeti-cleaner(8) (job queue cleaner), ganeti-noded(8) (node daemon), ganeti-rapi(8) (remote API daemon).
Ganeti htools: htools(1) (generic binary), hbal(1) (cluster balancer), hspace(1) (capacity calculation), hail(1) (IAllocator plugin), hscan(1) (data gatherer from remote clusters), hinfo(1) (cluster information printer), mon-collector(7) (data collectors interface).
π COPYRIGHT
Copyright (C) 2006-2015 Google Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
that's the whole page bestie π shoutout to Ganeti for shipping it, and this was Version 3.1.0~rc2 of hail β stay balanced, stay scored, and may your cluster always find its best pair πβ¨π¦
π¦ where this page comes from
- debian trixie: ganeti-htools-3.1 3.1.0~rc2-3 Β· BSD-2-Clause
- ubuntu questing: ganeti-htools-3.1 3.1.0~rc2-4
- ubuntu resolute: ganeti-htools-3.1 3.1.0~rc2-4build1 Β· BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms