Statistics
| Branch: | Tag: | Revision:

root / Ganeti / HTools / Node.hs @ bbd8efd2

History | View | Annotate | Download (13.5 kB)

# Date Author Comment
bbd8efd2 10/19/2009 01:08 am Iustin Pop

Some small style fixes

c5f7412e 10/18/2009 08:21 pm Iustin Pop

Generalise the node/instance listing

This patch introduces a generic formatTable function (based on, and
similar to the Ganeti one, but different and more FP in style) and
changes the node and instance listing to it.

The node list (due to the many variables) is still a little bit hackish...

ee9724b9 10/16/2009 04:59 pm Iustin Pop

Start using the utilisation scores in balancing

This enables the per-node load/total available capacity scores to be
used in balancing. Note that the total available capacity is currently
fixed at zero and cannot be changed by the user.

aa8d2e71 10/16/2009 04:59 pm Iustin Pop

Add loading and processing of utilisation data

This patch adds loading and processing the utilisation data during
instance moves. While the data is not yet used, it is correctly modified
by instance changes between nodes.

hbal has the new ‘-U’ command line argument for this. The format of the...

a488a217 10/16/2009 02:43 pm Iustin Pop

Merge the Node.setPri and Node.addCpus functions

The latter is only used right after the former in the Loader module, and
we'll need more of this 'update not with the data of this instance'
functionality (which is different than addPri where all information must...

183a9c3d 10/16/2009 10:09 am Iustin Pop

Show the load on nodes in node lists

The strange printf usage is due to some limitation (it seems) in ghc for
very long argument lists. The whole printout should be rewritten later.

2180829f 10/15/2009 05:05 pm Iustin Pop

Add initial structure for utilisation balancing

This patch adds the datatypes and modifies the nodes and instance types to have
such attributes. They are not used yet in any way.

2060348b 10/14/2009 04:41 pm Iustin Pop

Style change: node and instance attributes

This changes from a_b to aB in all node and instance attributes, to
match the standard Haskell style. Also attributes that should have been
camel-cased but weren't were changed (e.g. plist → pList, pnode →
pNode).

fbb95f28 09/28/2009 05:09 pm Iustin Pop

Turn on, and fix, more warnings

The Makefile was intented to be -Wall and not simply -W, but I missed
that. This enables more warnings and also enables -Werror (except for
the tests).

8c4c6a8a 07/07/2009 12:56 pm Iustin Pop

Export more stats in hspace

This patch changes Cluster.totalResources to compute more resources and
prints them in hspace.

9f6dcdea 07/06/2009 11:50 pm Iustin Pop

Fix hlint-generated warnings

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...

c43c3354 07/05/2009 06:42 pm Iustin Pop

Return correct failure data from Node.add*

This patch alters the Node.addPri/addSec to return correct failure data.
It removes the computeFailN1 function from the module as that used to
combine both mem and disk checks in the same function and thus the real...

f2280553 07/05/2009 03:53 pm Iustin Pop

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...

fe3d6f02 07/03/2009 10:01 pm Iustin Pop

Add an availDisk node function

This function returns the amount of available disk, which depends on
whether a low disk limit has been configured or not and on the free disk
space of the node.

836533fa 07/03/2009 10:00 pm Iustin Pop

Add two new autocomputed vars to Nodes

Currently we track the max disk usage/max vcpus as percentages, however
sometimes it's easier to check against minimum free disk or maximum
number of cpus, as units instead of percentages.

This patch adds two new variables, lo_dsk, hi_cpu, which are recomputed...

18b6444b 06/12/2009 03:16 am Iustin Pop

Implement cpu/disk limits in instance moves

We modify Node.addPri/addSec to take into account the limits on instance
adds.

844eff86 06/12/2009 02:56 am Iustin Pop

Add two new node attributes

Two new min disk free ratio and max cpu usage attributes are added to the
nodes. These will be used in the future to restrict allocation.

3c64b5aa 06/12/2009 01:12 am Iustin Pop

Small changes to the node list output

This is just some cleanup of the node list output, adding pcpu/vcpu
counters, and making the display slightly nicer.

f1e64aba 06/10/2009 11:37 pm Iustin Pop

Update cpu counters correctly after pinst changes

The cpu counters are update on primary instance adds/removes.

1a82215d 06/10/2009 11:29 pm Iustin Pop

Add cpu-count-related attributes to nodes

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...

e2fa2baf 06/01/2009 12:55 pm Iustin Pop

Add copyright/license information

This doc-patch adds copyright and license information to (hopefully) all
needed files.

9188aeef 06/01/2009 12:18 pm Iustin Pop

Lots of documentation updates

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.

9cf4267a 06/01/2009 12:14 pm Iustin Pop

Finish removal of unused params from PeerMap

This completes the removal started earlier byt removeing the need to
pass the number of nodes to Node.buildPeers, which is now unused.

15f4c8ca 06/01/2009 12:14 pm Iustin Pop

Add test infrastructure and initial tests

This patch adds a QuickCheck-based test infrastructure and initial tests
based on it. The PeerMap module has a 100% coverage ☺

Side-note: one has to read the source of QuickCheck to see how to use it
(especially the Batch submodule), the docs are not enough…

17c59f4b 05/27/2009 11:09 pm Iustin Pop

Remove unused parameters from PeerMap creation

We remove some unused arguments (added way back for compatibility with
Arrays, which we didn't use in the end). This makes the code clearer
(and doesn't need the Ndx type to be an instance of Num).

608efcce 05/27/2009 10:45 pm Iustin Pop

Add type synonyms for the node/instance indices

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.

262a08a2 05/27/2009 02:17 am Iustin Pop

Change the module import hierarchy

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.

dbd6700b 05/24/2009 02:05 am Iustin Pop

Remove some extraneous uses of ktn/kti

Since we have Node/Instance.name, we can now simplify a few constructs.

497e30a1 05/23/2009 03:24 am Iustin Pop

Add a small class for Nodes and Instances

Since both nodes and instances support some common functionality (names
and indices), we add a class so that we can access these attributes in a
generic way.

2727257a 05/23/2009 02:34 am Iustin Pop

Add back names to nodes/instances

In order to simplify the data structures, we add back the name on the
node and instance objects. We still keep the index for, well, indexing,
but we will use the name directly from the object, in order to get rid
of the ktn/kti arguments which are passed around everywhere.

e4c5beaf 05/23/2009 02:29 am Iustin Pop

More code reorganizations

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)...

040afc35 05/22/2009 08:03 pm Iustin Pop

Rework the loader model

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...

00b15752 05/20/2009 12:45 am Iustin Pop

Add support for 'offline' nodes

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.

0ee8fd76 03/22/2009 11:33 pm Iustin Pop

Update all needed node fields on f_mem change

This fixes the setFmem function which didn't compute other related
fields after free memory change. Ideally, this should be abstracted so
that add/remove Pri and similar functions could reuse it instead of
duplicating code.

53f00b20 03/22/2009 12:40 pm Iustin Pop

Fix interaction between down instances and nodes

If an instance is down, it's memory is not reflected in the node used
memory, and thus the node free memory is higher than the actual value.
This patch deducts the memory for such instances from the node free...

a1c6212e 03/22/2009 12:07 pm Iustin Pop

Show the x_mem/i_mem in node list

This patch adds checking of cluster data in the binaries and display of
node's x_mem/i_mem in the node list.

8c5b0a0d 03/22/2009 11:55 am Iustin Pop

Add a new node filed x_mem

Nodes can have some memory unaccounted for, due to (e.g.) hypervisor
overhead, rounding errors in reporting, etc.

It is better if we model this memory explicitly instead of hiding it,
and actually since the n_mem addition it is actually required to do so....

6e75a445 03/22/2009 02:18 am Iustin Pop

Remove unused and obsolete function

The Node.str function is very old and is not useful since the node
objects have much more fields today. This patch removes it, and if
needed a full node display can be done via ‘show’.

04be800a 03/22/2009 01:25 am Iustin Pop

Add node memory field to Node objects

This patch adds a new n_mem field to the node objects, and implements
read/save/show support for it. The field is not currently used (except
in the node list) but will be used for checking data consistency and
instance up/down status.

47a8bade 03/22/2009 01:12 am Iustin Pop

Pass actual types to node/instance constructors

This patch changes the parameters passed to the node and instance
constructors from generic Strings (which are then parsed via “read”) to
the actual used types, by converting them earlier in Cluster.loadData.

7847a037 03/22/2009 12:48 am Iustin Pop

Some small changes in preparation for hscan

This patch does some small changes:
- fixes a comment
- export more node functions (unneeded now, but hscan will use them)
- fixes Makefile rule for building the programs

352806f7 03/21/2009 01:20 pm Iustin Pop

Show offline nodes in the node status list

This patch adds a new ‘-’ flag for the node status which denotes offline
nodes.

c2c1ef0c 03/21/2009 12:45 am Iustin Pop

Add a new 'offline' Node attribute

This patch adds a new node attribute - offline - which will serve to
skip nodes from the target candidate list.

80d0d2f1 03/20/2009 11:48 pm Iustin Pop

Small doc update in Node.hs

669d7e3d 03/20/2009 07:16 pm Iustin Pop

Introduce a namespace for the modules

The modules are moved from the ‘top’ namespace to ‘Ganeti.HTools’, in
compliance with standard practices.