HTOOLS(1)

πŸ“¦
version 3.1.0~rc2 Β· 4 versions
, in debian trixie, ubuntu questing, ubuntu resolute

πŸ’– HTOOLS(1) β€” the manual page, but make it make sense πŸ’–

Version 3.1.0~rc2 β€” yes bestie, that's a release candidate, we're living on the edge πŸ’…


✨ NAME ✨

htools</purl> β€” Cluster allocation and placement tools for Ganeti πŸŽ€


🌸 SYNOPSIS 🌸

hbal   cluster balancer

hcheck cluster checker

hspace cluster capacity computation

hail   IAllocator plugin

hscan  saves cluster state for later reuse

hinfo  cluster information printer

hroller
       cluster rolling maintenance scheduler

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so htools is literally a whole suite of tools made to help with allocation and movement of instances, plus balancing of Ganeti clusters. it's giving "one binary, many personalities" ✨

and here's the tea: htools is also the generic binary that has to be symlinked or hardlinked under each tool's name in order to do the different functions. like, it's one girl wearing seven different outfits, okay?? πŸ‘‘

alternatively β€” and this is the slay part β€” the environment variable HTOOLS can be used to set the desired role. no cap πŸ’…


🧚 the many faces of htools (aka the role check) 🧚

  • Installed as hbal β€” it computes and optionally executes a suite of instance moves in order to balance the cluster. movement, but make it organized πŸ’«
  • Installed as hcheck β€” it preforms cluster checks and optionally simulates rebalancing with all the hbal options available. yes bestie, ALL of them 😭
  • Installed as hspace β€” it computes how many additional instances can be fit on a cluster, while maintaining N+1 status. it can run on models of existing clusters or of simulated clusters. imagination station 🌈
  • Installed as hail β€” it acts as an IAllocator plugin, i.e. it is used by Ganeti to compute new instance allocations and instance moves. the middleman of the operation 🫢
  • Installed as hscan β€” it scans the local or remote cluster state and saves it to files which can later be reused by the other roles. screenshot, but for infrastructure πŸ“Έ
  • Installed as hinfo β€” it prints information about the current cluster state. the gossip page, fr fr πŸ‘€
  • Installed as hroller β€” it helps scheduling maintenances that require node reboots on a cluster. reboot era, but scheduled πŸ”„

more parts incoming, bestie β€” don't go anywhere πŸ’œ

✨ COMMON OPTIONS ✨

Okay bestie, so these options lowkey work the same everywhere, but not every program mode supports every single one, so don't come for me if something's missing. The common ones are:

  • -p, --print-nodes β€” prints the node status in a format that's literally designed to let you see the node's most important parameters at a glance. And if the command you're running does a cluster transition (think balancing or allocation), then usually both the initial and the final node status get printed. πŸ’…

You can customise what info shows up by passing a comma-separated list of field names to this option (heads up: that field list is currently undocumented, iykyk), or you can extend the default field list by prefixing your extra field list with a plus sign. By default, the node list contains this whole menu:

  • F β€” a character showing the node's status: - means an offline node, * means N+1 failure, and a blank means a good node
  • Name β€” the node name
  • t_mem β€” the total node memory
  • n_mem β€” the memory used by the node itself
  • i_mem β€” the memory used by instances
  • x_mem β€” memory that seems to be in use but nobody can figure out why or by which instance; usually this means the hypervisor has some overhead or there are other reporting errors 😭
  • f_mem β€” the free node memory
  • r_mem β€” the reserved node memory, which is the amount of free memory needed for N+1 compliance
  • t_dsk β€” total disk
  • f_dsk β€” free disk
  • pcpu β€” the number of physical cpus on the node
  • vcpu β€” the number of virtual cpus allocated to primary instances
  • pcnt β€” number of primary instances
  • scnt β€” number of secondary instances
  • p_fmem β€” percent of free memory
  • p_fdsk β€” percent of free disk
  • r_cpu β€” ratio of virtual to physical cpus
  • lCpu β€” the dynamic CPU load (if the information is available)
  • lMem β€” the dynamic memory load (if the information is available)
  • lDsk β€” the dynamic disk load (if the information is available)
  • lNet β€” the dynamic net load (if the information is available)
  • -t datafile, --text-data=*datafile* β€” backend specification time πŸŽ€ the name of the file holding node and instance information (for when you're not collecting via RAPI or LUXI). You have to pick this or one of the other backends, no skipping. The option itself is described over in the htools(1) man page.

So the file should contain text data, line-based, with single empty lines separating the sections. And here's the sneaky part: an empty section is described by the empty string followed by the separating empty line, which gives you two consecutive empty lines. So yeah, the number of empty lines matters and you cannot change it arbitrarily. Noted. The lines themselves are column-based, with the pipe symbol (|) acting as the separator.

The first section contains group data, with these columns:

  • group name
  • group uuid
  • allocation policy
  • tags (separated by comma)
  • networks (UUID's, separated by comma)

The second section contains node data, with these columns:

  • node name
  • node total memory
  • memory used by the node
  • node free memory
  • node total disk
  • node free disk
  • node physical cores
  • offline/role field (Y for offline nodes, N for online non-master nodes, and M for the master node which is always online)
  • group UUID
  • node spindle count
  • node tags
  • exclusive storage value (Y if active, N otherwise)
  • node free spindles
  • virtual CPUs used by the node OS
  • CPU speed relative to that of a standard node in the node group the node belongs to

The third section contains instance data, with the fields:

  • instance name
  • instance memory
  • instance disk size
  • instance vcpus
  • instance status (in Ganeti's format, e.g. running or ERROR_down)
  • instance auto_balance flag (see man page gnt-instance(8))
  • instance primary node
  • instance secondary node(s), if any
  • instance disk type (e.g. plain or drbd)
  • instance tags
  • spindle use back-end parameter
  • actual disk spindles used by the instance (it can be - when exclusive storage is not active)

The fourth section contains the cluster tags, with one tag per line (no columns, no column processing, just vibes).

The fifth section contains the ipolicies of the cluster and the node groups, in this format (separated by |):

  • owner (empty if cluster, group name otherwise)
  • standard, min, max instance specs; min and max instance specs are separated between them by a semicolon, and can be specified multiple times (min;max;min;max...); each of the specs contains the following values separated by commas:
    • memory size
    • cpu count
    • disk size
    • disk count
    • NIC count
  • disk templates
  • vcpu ratio
  • spindle ratio
  • --mond=*yes|no* β€” if you give this, the program will query all MonDs to fetch data from the supported data collectors over the network. 🌐
  • --mond-data datafile β€” the name of the file holding the data provided by MonD, so you can override querying MonDs over the network. This is 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 named node is the name of the node, and the second member named reports is an array of report objects. Those 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 be 0. Heads up: this option takes precedence over any data passed by the -U option (available with hbal) or by the MonDs with the --mond and the --mond-data option.
  • -m cluster β€” backend specification: collect data directly from the cluster given as an argument via RAPI. If the argument doesn't contain a colon (:), then it gets converted into a fully-built URL by prepending https:// and appending the default RAPI port; otherwise it's considered a fully-specified URL and used as-is.
  • -L [path] β€” backend specification: collect data directly from the master daemon, which is to be contacted via LUXI (an internal Ganeti protocol). An optional path argument is interpreted as the path to the unix socket on which the master daemon listens; otherwise, the default path used by Ganeti (configured at build time) is used.
  • -I|--ialloc-src path β€” backend specification: load data directly from an iallocator request (as produced by Ganeti when doing an iallocator call). The iallocator request is read from the specified path.
  • --simulate description β€” backend specification: instead of using actual data, build an empty cluster given a node description. The description parameter must be a comma-separated list of five elements, describing in order:
    • the allocation policy for this node group (preferred, allocable or unallocable, or alternatively the short forms p, a or u)
    • the number of nodes in the cluster
    • the disk size of the nodes (default in mebibytes, units can be used)
    • the memory size of the nodes (default in mebibytes, units can be used)
    • the cpu core count for the nodes
    • the spindle count for the nodes

An example description would be preferred,20,100G,16g,4,2, describing a 20-node cluster where each node has 100GB of disk space, 16GiB of memory, 4 CPU cores and 2 disk spindles. Note that all nodes must have the same specs currently. πŸ™ˆ

This option can be given multiple times, and each new use defines a new node group. So different node groups can have different allocation policies and node count/specifications. Slay, flexible queen. πŸ‘‘

  • -v, --verbose β€” increase the output verbosity. Each usage of this option increases the verbosity (currently more than 5 doesn't make sense) from the default of one.
  • -q, --quiet β€” decrease the output verbosity. Each usage of this option decreases the verbosity (less than zero doesn't make sense) from the default of one.
  • -V, --version β€” just show the program version and exit. Simple. Iconic. ✨

🌸 UNITS 🌸

So some options don't just take a plain number, bestie β€” they take a number plus a unit. By default, all these unit-accepting options use mebibytes. Use the lower-case letters m, g and t (or their longer equivalents mib, gib, tib, where case doesn't matter) to pick explicit binary units. And if you want SI units, use the upper-case letters M, G and T (or their longer equivalents MB, GB, TB, where case doesn't matter).

Want the whole lore on SI vs binary? It's all in the units(7) man page. πŸ“–


🌈 ENVIRONMENT 🌈

The environment variable HTOOLS can be used instead of renaming/symlinking the programs β€” just set it to the desired role and then the name of the program is no longer used. That's it, that's the hack. 🫢


πŸ’€ REPORTING BUGS πŸ’€

Found a bug? Report it to the project's issue tracker, or contact the developers using the Ganeti mailing list. They wanna hear from you, fr fr. πŸ’œ


✨ SEE ALSO ✨

ok bestie, here's the whole friend group πŸ’– these are all the other pages that go with this one β€” go read them, they're iconic:


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:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. 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.

ok that's a wrap on the whole page, bestie πŸŽ€ you read all three parts, that's main character energy fr fr πŸ’… this one lives in the Ganeti collection and it's the HTOOLS(1) page β€” generic binary behavior, one page to rule the htools family πŸ‘‘ go forth and balance some clusters, you absolute icon βœ¨πŸ¦‹

πŸ“¦ where this page comes from