ganeti-local
15 years agoUpdate NEWS file for the second attempt at 0.1.1 htools-v0.1.1
Iustin Pop [Tue, 26 May 2009 09:56:53 +0000 (10:56 +0100)]
Update NEWS file for the second attempt at 0.1.1

15 years agoAdd a maintainer-clean makefile rule
Iustin Pop [Tue, 26 May 2009 09:54:09 +0000 (10:54 +0100)]
Add a maintainer-clean makefile rule

This splits the current “clean” rule into proper clean (cleaning of
build artifacts) and maintainer-clean (cleaning of distributed files).
This should make it better for Debian packaging.

15 years agoPort offline node fixes from Rapi to IAllocator
Iustin Pop [Tue, 26 May 2009 09:28:25 +0000 (10:28 +0100)]
Port offline node fixes from Rapi to IAllocator

The IAllocator source was copied from Rapi before the offline node fixes
were made. This changes such that offline nodes are accepted correctly.

15 years agoUpdate NEWS file for the 0.1.1 release
Iustin Pop [Mon, 25 May 2009 20:47:51 +0000 (21:47 +0100)]
Update NEWS file for the 0.1.1 release

Also replace tabs in an older entry with spaces.

15 years agoFix loading of plain instances via iallocator
Iustin Pop [Mon, 25 May 2009 20:35:54 +0000 (21:35 +0100)]
Fix loading of plain instances via iallocator

Currently iallocator is broken when reading single-node instances (and
with an ugly error message). This patch fixes this case, by marking them
with secondary node “noSecondary” like the rest of the code.

15 years agohail: don't relocate to current primary node
Iustin Pop [Mon, 25 May 2009 19:54:15 +0000 (20:54 +0100)]
hail: don't relocate to current primary node

This patch fixes the relocate-to-primary-node problem, and doesn't mark
the excluded nodes as offline anymore (we don't use them anyway, so
let's not use a different/fake cluster state).

15 years agoFix some haddock issues
Iustin Pop [Mon, 25 May 2009 19:22:56 +0000 (20:22 +0100)]
Fix some haddock issues

Slash is a reserved char. Slash is a reserved char. Slash is a…

15 years agoUpdate README for hail
Iustin Pop [Mon, 25 May 2009 19:11:52 +0000 (20:11 +0100)]
Update README for hail

15 years agoAdd man page and .gitignore entry for hail
Iustin Pop [Mon, 25 May 2009 19:04:03 +0000 (20:04 +0100)]
Add man page and .gitignore entry for hail

15 years agohail: do not allocate on offline/drained nodes
Iustin Pop [Mon, 25 May 2009 18:50:54 +0000 (19:50 +0100)]
hail: do not allocate on offline/drained nodes

This patch implements filtering out of the offline/drained nodes and
fixes a bug in IAllocator.hs parsing (similar to an older bug in Rapi.hs
from where the code was copied).

15 years agohail: cleanup unused options
Iustin Pop [Mon, 25 May 2009 18:35:03 +0000 (19:35 +0100)]
hail: cleanup unused options

15 years agohail: Implement non-mirrored instance allocation
Iustin Pop [Mon, 25 May 2009 18:31:03 +0000 (19:31 +0100)]
hail: Implement non-mirrored instance allocation

This patch implements non-mirrored instance allocation, by allocating as
secondary node “noSecondary”.

15 years agohail: unify the post-processing of results
Iustin Pop [Mon, 25 May 2009 17:45:46 +0000 (18:45 +0100)]
hail: unify the post-processing of results

Both allocate and relocate compute new node lists, whose score must be
ranked and the best option chosen. This means we can convert the code to
a generic function.

15 years agoImplement hail allocate (for 2-node requests)
Iustin Pop [Sun, 24 May 2009 23:09:55 +0000 (00:09 +0100)]
Implement hail allocate (for 2-node requests)

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.

15 years agoWorking implementation if relocate
Iustin Pop [Sun, 24 May 2009 22:48:07 +0000 (23:48 +0100)]
Working implementation if relocate

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.

15 years agoStart implementing the hail functionality
Iustin Pop [Sun, 24 May 2009 22:07:08 +0000 (23:07 +0100)]
Start implementing the hail functionality

This patch implements a very stupid (and broken) version of hail
‘allocate’.

15 years agoRemove ktn/kti from first half of loader
Iustin Pop [Sat, 23 May 2009 23:43:38 +0000 (00:43 +0100)]
Remove ktn/kti from first half of loader

This patch removes the ktn/kti lists from most parts of the first half
of the loading sequence. Some remain as the [(String, Int)] is the
nicest way to lookup names and get indices back.

15 years agoRemove the ktn/kti from second half of loading
Iustin Pop [Sat, 23 May 2009 23:36:36 +0000 (00:36 +0100)]
Remove the ktn/kti from second half of loading

This removes the return of ktn/kti from Loader.mergeData and associated
functions.

15 years agoRemove most uses of ktn/kti
Iustin Pop [Sat, 23 May 2009 23:29:52 +0000 (00:29 +0100)]
Remove most uses of ktn/kti

This patch removes all uses of ktn/kti from the past-loader stages.

15 years agoRemove a function in hail
Iustin Pop [Sat, 23 May 2009 23:23:15 +0000 (00:23 +0100)]
Remove a function in hail

This is not yet used.

15 years agoAdd some utility functions for kt deprecation
Iustin Pop [Sat, 23 May 2009 23:11:19 +0000 (00:11 +0100)]
Add some utility functions for kt deprecation

These will be used to remove even more uses of ktn/kti in non-critical
paths.

15 years agoRemove some extraneous uses of ktn/kti
Iustin Pop [Sat, 23 May 2009 22:50:37 +0000 (23:50 +0100)]
Remove some extraneous uses of ktn/kti

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

15 years agoStrip the suffix from the names in the objects
Iustin Pop [Sat, 23 May 2009 22:47:56 +0000 (23:47 +0100)]
Strip the suffix from the names in the objects

This strips the suffix from the objects themselves, not only from the
ktn/kti vars.

15 years agoMake IAlloc.loadData return maps
Iustin Pop [Sat, 23 May 2009 22:33:21 +0000 (23:33 +0100)]
Make IAlloc.loadData return maps

This patch makes the format of IAlloc.loadData be similar the same as
Loader.mergeData.

15 years agoSome small layout changes
Iustin Pop [Sat, 23 May 2009 22:32:52 +0000 (23:32 +0100)]
Some small layout changes

15 years agoMove common loading sequence in CLI
Iustin Pop [Sat, 23 May 2009 22:22:01 +0000 (23:22 +0100)]
Move common loading sequence in CLI

This patch moves the common loading sequence to CLI, such that hbal/hn1
and possible future scripts that take the input from same sources can
use it.

15 years agoMove checkData from Cluster to Loader
Iustin Pop [Sat, 23 May 2009 22:06:45 +0000 (23:06 +0100)]
Move checkData from Cluster to Loader

This moves the remaining loading function to Loader (together with its
associated support functions).

15 years agoIntroduce a class for CLI options
Iustin Pop [Sat, 23 May 2009 00:34:54 +0000 (01:34 +0100)]
Introduce a class for CLI options

This patch generalizes a little the CLI handling by not passing in a
special function for help and such, but instead requiring that the
options object supports some common functionality.

15 years agoAdd a small class for Nodes and Instances
Iustin Pop [Sat, 23 May 2009 00:24:06 +0000 (01:24 +0100)]
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.

15 years agoAdd back names to nodes/instances
Iustin Pop [Fri, 22 May 2009 23:34:51 +0000 (00:34 +0100)]
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.

15 years agoMore code reorganizations
Iustin Pop [Fri, 22 May 2009 23:18:50 +0000 (00:18 +0100)]
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)
  - bring IAlloc.hs in line with the recent changes of providing data
    types and not strings
  - removal of obsolete Utils.hs json-related functions

15 years agoRework the loader model
Iustin Pop [Fri, 22 May 2009 17:03:53 +0000 (18:03 +0100)]
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
return values from both Rapi.hs and Text.hs are uniformized.

15 years agoInitial work on hail
Iustin Pop [Thu, 21 May 2009 22:13:45 +0000 (23:13 +0100)]
Initial work on hail

This makes hail compile and get a request parsed via IAlloc, but nothing
more.

15 years agoExperimental support for non-redundant instances
Iustin Pop [Thu, 21 May 2009 00:54:27 +0000 (01:54 +0100)]
Experimental support for non-redundant instances

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.

15 years agoSmall doc addition
Iustin Pop [Thu, 21 May 2009 00:30:49 +0000 (01:30 +0100)]
Small doc addition

15 years agoIntroduce nice errors on invalid input fields
Iustin Pop [Thu, 21 May 2009 00:26:51 +0000 (01:26 +0100)]
Introduce nice errors on invalid input fields

This patch switches from plain read to a wrapper over readsPrec that
returns better error messages than the buildin 'Prelude: no parse'.

15 years agoSplit node/instance parsing into functions
Iustin Pop [Thu, 21 May 2009 00:10:56 +0000 (01:10 +0100)]
Split node/instance parsing into functions

This allows easy checking for valid format of the input data (row-wise).

15 years agoAdd initial validation checks in Cluster.loadData
Iustin Pop [Wed, 20 May 2009 23:37:03 +0000 (00:37 +0100)]
Add initial validation checks in Cluster.loadData

This patch converts loadTabular and loadData to a monadic form, thus
allowing meaningful error messages from the node/instance load routines.

15 years agoSmall syntax improvement
Iustin Pop [Wed, 20 May 2009 23:11:48 +0000 (00:11 +0100)]
Small syntax improvement

D'oh, one can extract from a wrapped variable, not only from functions.

15 years agoConvert Cluster.loadData to Result return
Iustin Pop [Wed, 20 May 2009 23:07:24 +0000 (00:07 +0100)]
Convert Cluster.loadData to Result return

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.

15 years agoAllow hscan to save data for fully-spec'd URLs
Iustin Pop [Wed, 20 May 2009 22:31:10 +0000 (23:31 +0100)]
Allow hscan to save data for fully-spec'd URLs

In case we pass a fully-specified URL to hscan, currently it will use as
is and that means the directory in which we want to save the status
files changes from what we mean. This patch changes hscan to replace all
slashes in the cluster name with underscores when generating the output
filenames.

15 years agoAllow overriding the RAPI port/scheme
Iustin Pop [Wed, 20 May 2009 22:02:45 +0000 (23:02 +0100)]
Allow overriding the RAPI port/scheme

This patch adds a very dumb way to override the port and scheme for
RAPI: if the master string doesn't contain a colon, we consider it a
simple hostname specification, and thus prepend ‘https://’ and append
‘:5080’, (the default RAPI port); otherwise, we consider it a fully
specified URL, and don't do any mangling to it.

This allows to use saved RAPI responses in testing, with the “file://”
scheme, or to use another port or non https mode with an actual RAPI
instance.

15 years agoRemove some 1.2 specific code
Iustin Pop [Wed, 20 May 2009 21:55:52 +0000 (22:55 +0100)]
Remove some 1.2 specific code

Now that we dropped 1.2 compatibility, we can removed the special casing
for RAPI differences.

15 years agoGeneralize some Result function into monad ones
Iustin Pop [Wed, 20 May 2009 21:23:31 +0000 (22:23 +0100)]
Generalize some Result function into monad ones

We don't really needed, but is more clean like this.

15 years agoSwitch from hand-written monads to a real one
Iustin Pop [Wed, 20 May 2009 21:13:02 +0000 (22:13 +0100)]
Switch from hand-written monads to a real one

This big patch converts from our home-grown monad-like constructs
(the Either stuff) to a real, Either-like-but-another-name monad.

We introduce a “Result a” monad, and this allows dropping many of the
extra constructs. Hopefully the code is also more clear.

Many of the functions could now be written in a generic-monad style,
instead of Result specifically, but that will come in future patches.

IAlloc.hs also has some unrelated patches.

15 years agoSmall changes to the IAlloc module
Iustin Pop [Tue, 19 May 2009 19:53:01 +0000 (20:53 +0100)]
Small changes to the IAlloc module

Adding a small request type data structure.

15 years agoUpdate NEWS file for the 0.1.0 release htools-v0.1.0
Iustin Pop [Tue, 19 May 2009 22:04:53 +0000 (23:04 +0100)]
Update NEWS file for the 0.1.0 release

15 years agoDon't consider offline nodes as N+1 failed
Iustin Pop [Tue, 19 May 2009 21:58:02 +0000 (22:58 +0100)]
Don't consider offline nodes as N+1 failed

This is just a cosmetic (I hope) change; the nodes shouldn't be used
anyway, and we only correct the display message.

15 years agoDrop RAPI v1 compatiblity
Iustin Pop [Tue, 19 May 2009 21:50:12 +0000 (22:50 +0100)]
Drop RAPI v1 compatiblity

Since we only support Ganeti 2.0, we drop the 1.2 compatibility.

15 years agoAdd support for 'offline' nodes
Iustin Pop [Tue, 19 May 2009 21:45:31 +0000 (22:45 +0100)]
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.

15 years agoUpdate the IAlloc module
Iustin Pop [Mon, 18 May 2009 22:19:26 +0000 (23:19 +0100)]
Update the IAlloc module

We know have a working parseData function that returns the node and
instance data. This uncovered bad support for non-drbd instances ☹

15 years agoMove the JSON utilities to Utils.hs
Iustin Pop [Mon, 18 May 2009 08:24:24 +0000 (10:24 +0200)]
Move the JSON utilities to Utils.hs

This patch moves the generic/reusable JSON functions to Utils.hs, so
that they're shared between RAPI/IAlloc.

15 years agoAdd a copy of Rapi.HS as IAlloc.hs
Iustin Pop [Mon, 18 May 2009 06:46:12 +0000 (08:46 +0200)]
Add a copy of Rapi.HS as IAlloc.hs

This will be used in two ways:
  - format the response to Ganeti (easy, implemented)
  - parse the input data and build the node/instance lists (hard :)

15 years agoRemove the apidoc dir on clean
Iustin Pop [Mon, 18 May 2009 06:18:21 +0000 (08:18 +0200)]
Remove the apidoc dir on clean

15 years agohbal: add a --quiet option
Iustin Pop [Sun, 26 Apr 2009 14:15:33 +0000 (16:15 +0200)]
hbal: add a --quiet option

This option is the opposite of the --verbose option, and it allows
decreasing the verbosity level from the default of one to zero (which
currently doesn't show the warning messages for missing disk/memory).

15 years agohbal: Simplify the oneline formatting
Iustin Pop [Sat, 25 Apr 2009 15:38:22 +0000 (17:38 +0200)]
hbal: Simplify the oneline formatting

This patch moves the oneline format into a separate function for easier
usage.

15 years agohbal: Early exit when we don't have any instances
Iustin Pop [Sat, 25 Apr 2009 15:32:46 +0000 (17:32 +0200)]
hbal: Early exit when we don't have any instances

For clusters with no instances, there is no point in computing either
the score or in running the algorithm. In this case, we exit prematurely
and when running in one-line mode we show dummy information.

15 years agohbal: Add a new min-score option
Iustin Pop [Sat, 25 Apr 2009 15:27:27 +0000 (17:27 +0200)]
hbal: Add a new min-score option

This new parameter causes the algorithm to finish (or even not start at
all) if we reach/have a score better than it.

15 years agohbal: Change hardcoded tests to monadic composition
Iustin Pop [Sat, 25 Apr 2009 14:31:25 +0000 (16:31 +0200)]
hbal: Change hardcoded tests to monadic composition

In some case we manually do “if isNothing … then Nothing else …”, which
can be very easily replaced with a monadic construct in the Maybe monad.

15 years agoFix the makefile dist rule
Iustin Pop [Tue, 21 Apr 2009 07:05:52 +0000 (09:05 +0200)]
Fix the makefile dist rule

It was missing a dependency on the Version.hs file, so right after “make
clean”, a “make dist” used to fail.

15 years agoUpdate NEWS file for the 0.0.8 release htools-v0.0.8
Iustin Pop [Tue, 21 Apr 2009 06:50:04 +0000 (08:50 +0200)]
Update NEWS file for the 0.0.8 release

15 years agoIncrease allowed missing memory to 512MB
Iustin Pop [Mon, 20 Apr 2009 12:12:13 +0000 (14:12 +0200)]
Increase allowed missing memory to 512MB

Since Xen seems to “steal” some amounts of memory (depending on total
node memory), we increase the maximum allowed missing memory to 512MB,
based on gathered data from multiple machines.

15 years agoUpdate man pages with the env variables
Iustin Pop [Mon, 20 Apr 2009 11:13:17 +0000 (13:13 +0200)]
Update man pages with the env variables

This patch documents the environment variables in the man pages of hbal
and hn1.

15 years agoAdd reading the file names from env vars
Iustin Pop [Mon, 20 Apr 2009 11:07:09 +0000 (13:07 +0200)]
Add reading the file names from env vars

This patch adds support for selecting the instance/node file names via
two environment variables (HTOOLS_NODES, HTOOLS_INSTANCES).

Unfortunately we still have lots of duplicated code, since the options
are not unified.

15 years agoImplement error checks for extra arguments
Iustin Pop [Mon, 20 Apr 2009 11:00:10 +0000 (13:00 +0200)]
Implement error checks for extra arguments

Neither hbal nor hn1 take any arguments beside the options, so if any
are passed is most likely an unintended error. This patch aborts in such
cases.

15 years agoFix the makefile clean rule
Iustin Pop [Mon, 20 Apr 2009 10:00:51 +0000 (12:00 +0200)]
Fix the makefile clean rule

Use the $HPROGS variable instead of hardcoding the program names.

15 years agoAdd a gitignore file
Iustin Pop [Mon, 20 Apr 2009 10:00:29 +0000 (12:00 +0200)]
Add a gitignore file

15 years agoImplement writing the command list to a script
Iustin Pop [Sat, 18 Apr 2009 22:17:05 +0000 (00:17 +0200)]
Implement writing the command list to a script

This patch adds support in hbal for writing the command list to a shell
script, with error checking and allowing for early exit.

15 years agohbal: Abort for invalid offline node names
Iustin Pop [Thu, 16 Apr 2009 09:02:48 +0000 (11:02 +0200)]
hbal: Abort for invalid offline node names

Since it's easy to pass a wrong node name as offline, we should abort
instead of silently ignoring it.

15 years agoUpdated new in preparation for the 0.0.7 release htools-v0.0.7
Iustin Pop [Mon, 23 Mar 2009 07:26:08 +0000 (08:26 +0100)]
Updated new in preparation for the 0.0.7 release

15 years agoMore documentation updates
Iustin Pop [Mon, 23 Mar 2009 07:12:40 +0000 (08:12 +0100)]
More documentation updates

This removes most of the content of the README file (obsoleted by new
algorithm and man pages), modifies the Makefile to include the built
documentation in the source archive (so that haddock/hscolour are not
needed) and updates the haddock-prologue with current information.

15 years agoMore man page updates
Iustin Pop [Mon, 23 Mar 2009 06:40:49 +0000 (07:40 +0100)]
More man page updates

This moves some data from README to the man pages and has other general
improvements.

15 years agoAdd checks for missing disk space
Iustin Pop [Sun, 22 Mar 2009 22:32:50 +0000 (23:32 +0100)]
Add checks for missing disk space

This small patch adds disk space checks to the Cluster.checkData
function, and simplifies a little the warning messages.

15 years agoInclude DRBD overhead in sda/sdb size
Iustin Pop [Sun, 22 Mar 2009 22:30:42 +0000 (23:30 +0100)]
Include DRBD overhead in sda/sdb size

For Ganeti 1.2 which doesn't have the ‘disk_usage’ instance query field,
we need to manually include the DRBD overhead (per disk). This patch
modifies the RAPI collection to do this, but loading from disk does not
as it's unknown if the query came from hscan or RAPI 1.2 or RAPI 2.0...

15 years agoDocumentation updates
Iustin Pop [Sun, 22 Mar 2009 22:12:16 +0000 (23:12 +0100)]
Documentation updates

This patch adds a man page for hscan and updates the README and other
man pages with the latest changes.

15 years agoUpdate all needed node fields on f_mem change
Iustin Pop [Sun, 22 Mar 2009 21:33:55 +0000 (22:33 +0100)]
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.

15 years agoFix interaction between down instances and nodes
Iustin Pop [Sun, 22 Mar 2009 10:40:58 +0000 (11:40 +0100)]
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
memory, allowing a correct calculation for such cases.

15 years agoAdd a new instance field denoting run status
Iustin Pop [Sun, 22 Mar 2009 10:24:23 +0000 (11:24 +0100)]
Add a new instance field denoting run status

This patch modifies Rapi, the Cluster.loadData and hscan serialization to load
and save the instance run status. At instance level, we add both a boolean
field denoting the true/false run status, and a string field which holds the
original value (since we don't have a 1-to-1 mapping) for use in hscan
serialization.

The run status is not yet used.

15 years agoShow the x_mem/i_mem in node list
Iustin Pop [Sun, 22 Mar 2009 10:03:52 +0000 (11:03 +0100)]
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.

15 years agoAdd functions to check and fix cluster data
Iustin Pop [Sun, 22 Mar 2009 10:02:59 +0000 (11:02 +0100)]
Add functions to check and fix cluster data

This patch adds a checkData function which goes over the node list and computes
the unaccounted memory, returning a list of warning messages (if any) and the
update nodes.

15 years agoAdd a new node filed x_mem
Iustin Pop [Sun, 22 Mar 2009 09:55:12 +0000 (10:55 +0100)]
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.

The new attribute is not yet used.

15 years agoSplit common CLI functionality into a module
Iustin Pop [Sun, 22 Mar 2009 09:52:50 +0000 (10:52 +0100)]
Split common CLI functionality into a module

This patch moves the common CLI functionality (as much as currently
possible) into a separate module. This means we only have one parseOpts
and that Utils.hs doesn't keep this kind of functions anymore.

15 years agoRemove unused and obsolete function
Iustin Pop [Sun, 22 Mar 2009 00:18:22 +0000 (01:18 +0100)]
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’.

15 years agoAdd node memory field to Node objects
Iustin Pop [Sat, 21 Mar 2009 23:25:55 +0000 (00:25 +0100)]
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.

15 years agoPass actual types to node/instance constructors
Iustin Pop [Sat, 21 Mar 2009 23:12:29 +0000 (00:12 +0100)]
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.

15 years agoSmall change in hscan
Iustin Pop [Sat, 21 Mar 2009 23:06:51 +0000 (00:06 +0100)]
Small change in hscan

This fixes a mistake between Int/Integer. Should be more careful :)

15 years agoAdd hscan to Makefile
Iustin Pop [Sat, 21 Mar 2009 22:51:54 +0000 (23:51 +0100)]
Add hscan to Makefile

15 years agoAdd the hscan tool
Iustin Pop [Sat, 21 Mar 2009 22:50:47 +0000 (23:50 +0100)]
Add the hscan tool

This patch adds an hscan tool that loads data from clusters via RAPI and
writes it to files that can be later used offline.

15 years agoSome small changes in preparation for hscan
Iustin Pop [Sat, 21 Mar 2009 22:48:49 +0000 (23:48 +0100)]
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

15 years agoAdd a separate type for the [(Int, String)] list
Iustin Pop [Sat, 21 Mar 2009 21:00:22 +0000 (22:00 +0100)]
Add a separate type for the [(Int, String)] list

This is added for better readability, since this is very often used in
declarations.

15 years agoHandle correctly offline nodes in cluster scoring
Iustin Pop [Sat, 21 Mar 2009 14:48:12 +0000 (15:48 +0100)]
Handle correctly offline nodes in cluster scoring

This patch changes two things with regard to offline nodes:
  - first, it only calculates the various coefficients across online
nodes
  - second, it adds a new score denoting the percentage of instances
which live on such nodes

The first change allows correct score computation in presence of offline
nodes (whose properties we don't need to take into account), while the
second change actively evacuates offline nodes.

15 years agoShow offline nodes in the node status list
Iustin Pop [Sat, 21 Mar 2009 11:20:15 +0000 (12:20 +0100)]
Show offline nodes in the node status list

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

15 years agoRestrict move list based on offline node status
Iustin Pop [Fri, 20 Mar 2009 23:26:00 +0000 (00:26 +0100)]
Restrict move list based on offline node status

This patch changes the Cluster.checkInstanceMove function to restrict
the target move list based on which nodes are online.

15 years agoAdd command line support for offlining nodes
Iustin Pop [Fri, 20 Mar 2009 22:48:07 +0000 (23:48 +0100)]
Add command line support for offlining nodes

This patch modifies hbal (only, hn1 not yet) for setting nodes offline.

15 years agoAdd a new 'offline' Node attribute
Iustin Pop [Fri, 20 Mar 2009 22:45:15 +0000 (23:45 +0100)]
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.

15 years agoMore fixes to the Makefile
Iustin Pop [Fri, 20 Mar 2009 22:43:59 +0000 (23:43 +0100)]
More fixes to the Makefile

15 years agoSmall doc update in Node.hs
Iustin Pop [Fri, 20 Mar 2009 21:46:09 +0000 (22:46 +0100)]
Small doc update in Node.hs

15 years agoSome updates to the apidoc rules
Iustin Pop [Fri, 20 Mar 2009 18:58:35 +0000 (19:58 +0100)]
Some updates to the apidoc rules

15 years agoFix/enhance makefile rules after the rename
Iustin Pop [Fri, 20 Mar 2009 18:26:10 +0000 (19:26 +0100)]
Fix/enhance makefile rules after the rename

15 years agoAdd a .gitattributes file
Iustin Pop [Fri, 20 Mar 2009 17:17:27 +0000 (18:17 +0100)]
Add a .gitattributes file

This will enhance the ‘dist’ rule by skipping unneeded files.