ganeti-local
13 years agoUpdate NEWS file
Iustin Pop [Thu, 26 Aug 2010 11:55:16 +0000 (13:55 +0200)]
Update NEWS file

13 years agoUpdate man pages for the new -S option
Iustin Pop [Thu, 26 Aug 2010 11:51:40 +0000 (13:51 +0200)]
Update man pages for the new -S option

13 years agohspace: mark new instances as running
Iustin Pop [Thu, 26 Aug 2010 11:28:59 +0000 (13:28 +0200)]
hspace: mark new instances as running

Otherwise the saved cluster state and the in-memory one are wrong.

13 years agoImplement cluster state saving in hspace
Iustin Pop [Thu, 26 Aug 2010 11:07:40 +0000 (13:07 +0200)]
Implement cluster state saving in hspace

This also uncovered a few issues with the allocation model (instances
not being marked up, etc.).

Compared to hbal, hspace will generate either one or two files (for both
the standard and the tiered allocation mode), depending on the input
parameters.

13 years agoChange iterateAlloc to return the instance list
Iustin Pop [Thu, 26 Aug 2010 10:58:38 +0000 (12:58 +0200)]
Change iterateAlloc to return the instance list

The Cluster.iterateAlloc and tieredAlloc functions are changed to also
return the updated instance list, since it is needed to have a “full”
cluster view.

13 years agoImplement cluster state saving in hbal
Iustin Pop [Thu, 26 Aug 2010 09:49:19 +0000 (11:49 +0200)]
Implement cluster state saving in hbal

Also move the LUXI execution (-X) to the end, after all the output
messages are printed. No good in waiting for the messages for a long
while, especially as they are not up-to-date stats after the job
execution, just an estimation of what the state will be.

13 years agoAbstract the cluster serialization from hscan.hs
Iustin Pop [Wed, 25 Aug 2010 16:47:22 +0000 (18:47 +0200)]
Abstract the cluster serialization from hscan.hs

This is currently hardcoded in an internal function in hscan.hs, and we
move it to Text.hs for later use.

13 years agoAdd a new option --save-cluster
Iustin Pop [Wed, 25 Aug 2010 16:40:20 +0000 (18:40 +0200)]
Add a new option --save-cluster

This option will in the future be used to serialize the cluster state in
hbal and hspace after the rebalance/allocation steps.

13 years agoAdd unittest for Node text serialization
Iustin Pop [Wed, 25 Aug 2010 16:04:41 +0000 (18:04 +0200)]
Add unittest for Node text serialization

This checks that the Node text serialization and deserialization
operations are idempotent when combined other.

13 years agoSwitch unittest to custom hostnames
Iustin Pop [Wed, 25 Aug 2010 15:53:53 +0000 (17:53 +0200)]
Switch unittest to custom hostnames

Currently, the hostnames are almost fully arbitrary chars, which breaks
the assumption that nodes/instances will be normal DNS hostnames.

This patch adds some custom generators for these hostnames, that will
allow better testing of text loader serialization/deserialization.

13 years agoMove text serialization functions to Text.hs
Iustin Pop [Tue, 24 Aug 2010 16:30:05 +0000 (18:30 +0200)]
Move text serialization functions to Text.hs

Currently these are in hscan, and cannot be reused easily.

13 years agoFix a couple of typos in the manpages
Iustin Pop [Thu, 29 Jul 2010 04:03:42 +0000 (00:03 -0400)]
Fix a couple of typos in the manpages

Again, thanks to lintian.

13 years agohail: fix error message for failed multi-evac
Iustin Pop [Tue, 27 Jul 2010 18:44:30 +0000 (14:44 -0400)]
hail: fix error message for failed multi-evac

Currently we show the instance index, but this makes no sense outside
the current running program. Instead, we show the instance name.

13 years agoUpdate NEWS file for the 0.2.6 release htools-v0.2.6
Iustin Pop [Mon, 26 Jul 2010 23:49:23 +0000 (19:49 -0400)]
Update NEWS file for the 0.2.6 release

13 years agoNEWS: Add double blank lines before headers
Iustin Pop [Tue, 27 Jul 2010 00:02:29 +0000 (20:02 -0400)]
NEWS: Add double blank lines before headers

This looks better for text-only viewing…

13 years agohscan: return exit code 2 for RAPI failures
Iustin Pop [Fri, 23 Jul 2010 00:50:49 +0000 (20:50 -0400)]
hscan: return exit code 2 for RAPI failures

If some clusters failed during RAPI collection, exit with exit code 2 so
that tests can detect this failure.

13 years agoMore enhancements to live-test.sh
Iustin Pop [Fri, 23 Jul 2010 00:32:41 +0000 (20:32 -0400)]
More enhancements to live-test.sh

13 years agoFix another haddock issue
Iustin Pop [Thu, 22 Jul 2010 13:57:13 +0000 (09:57 -0400)]
Fix another haddock issue

13 years agoRemove an obsolete function and add Utils tests
Iustin Pop [Thu, 22 Jul 2010 03:03:28 +0000 (23:03 -0400)]
Remove an obsolete function and add Utils tests

13 years agoExtend the live-test
Iustin Pop [Thu, 22 Jul 2010 00:27:09 +0000 (20:27 -0400)]
Extend the live-test

The (recently-enabled) live test coverage stats found a few low-hanging
fruits in the tests we do…

13 years agoUse --union for hpc sum
Iustin Pop [Wed, 21 Jul 2010 23:25:44 +0000 (19:25 -0400)]
Use --union for hpc sum

… which fixes the issue noted in the previous commit (almost a brown
paper bag change).

13 years agoPreliminary support for coverage during live-test
Iustin Pop [Wed, 21 Jul 2010 22:43:12 +0000 (18:43 -0400)]
Preliminary support for coverage during live-test

While this doesn't work correctly yet (hpc sum seems to only take common
modules, not the sum of modules?), it prepares for gathering coverage
data during live-test (as an alternative to unittest coverage data).

13 years agoAdd some more imports to QC.hs
Iustin Pop [Wed, 21 Jul 2010 22:18:44 +0000 (18:18 -0400)]
Add some more imports to QC.hs

This is needed so that in the coverage report we list all modules, even
the ones we don't test at all, such that we get the complete results.

13 years agoChange the meaning of the N+1 fail metric
Iustin Pop [Wed, 21 Jul 2010 15:47:25 +0000 (17:47 +0200)]
Change the meaning of the N+1 fail metric

Currently, this metric tracks the nodes failing the N+1 check. While
this helps (in some cases) to evacuate such nodes, it's not a good
metric since rarely it will change during a step (only at the last
instance moving away). Therefore we replace it with the count of
instances living on such nodes, which is much better because:
- moving an instance away while the node is still N+1 failing will still
  reflect in the score as an optimization
- moving the last instance causing an N+1 failure will result in a heavy
  decrease of this score, thus giving the right bonus to clear this
  status

13 years agoIntroduce per-metric weights
Iustin Pop [Wed, 21 Jul 2010 15:33:00 +0000 (17:33 +0200)]
Introduce per-metric weights

Currently all metrics have the same weight (we just sum them together).
However, for the hard constraints (N+1 failures, offline nodes, etc.)
we should handle the metrics differently based on their meaning. For
example, an instance living on a primary offline node is worse than an
instance having its secondary node offline, which in turn is worse than
an instance having its secondary node failing N+1.

To express this case in our code, we introduce a table of weights for
the metrics, with which we can influence their relative importance.

13 years agoAllow balancing moves to introduce N+1 errors
Iustin Pop [Wed, 21 Jul 2010 14:15:03 +0000 (16:15 +0200)]
Allow balancing moves to introduce N+1 errors

This patch switches the applyMove function to the extended versions of
Node.addPri and addSec, and passes the override flag based on the state
of the node that we're moving away from.

13 years agoIntroduce a relaxed add instance mode
Iustin Pop [Wed, 21 Jul 2010 13:30:38 +0000 (15:30 +0200)]
Introduce a relaxed add instance mode

In case an instance is living on an offline node, it doesn't make sense
to refuse moving it because that would create N+1 failures; failing N+1
is still much better than not running at all. Similarly, if the
secondary node of an instance is offline, meaning the instance doesn't
have any redundancy, we have a worse case than having a secondary that
is N+1 failing and it could not accept the instance as primary, but it
stil does redundancy for it.

To allow this, we rename Node.addPri to addPriEx and introduce an extra
parameter (addPri is a partial application of addPriEx and keeps the
same signature). Node.addSec gets the same treatement.

13 years agoRemove obsolete Container.maxNameLen
Iustin Pop [Mon, 19 Jul 2010 10:23:07 +0000 (12:23 +0200)]
Remove obsolete Container.maxNameLen

This was only used in one place (hbal), and is obsolete by the change to
the dual name/alias structure.

13 years agohbal: print short names in steps list
Iustin Pop [Mon, 19 Jul 2010 10:22:00 +0000 (12:22 +0200)]
hbal: print short names in steps list

This was a regression from the name handling changes, as we started
using the original names for the solution list (which is not designed
for parsing/feeding back into ganeti).

13 years agoRemove an obsolete function
Iustin Pop [Mon, 19 Jul 2010 10:19:21 +0000 (12:19 +0200)]
Remove an obsolete function

printSolution is no longer used, as we print the solution iteratively
now.

13 years agoAllow '+' in node list fields
Iustin Pop [Sun, 18 Jul 2010 21:12:25 +0000 (23:12 +0200)]
Allow '+' in node list fields

When the field list is prefixed with a plus sign, this will extend the
default field list, instead of replacing it entirely.

13 years agoUpdate the node list fields
Iustin Pop [Sun, 18 Jul 2010 20:59:20 +0000 (22:59 +0200)]
Update the node list fields

This patch renames the pri/sec to pcnt/scnt, and adds the real primary
and secondary instance lists, the peermap and the index of a node as
selectable options.

13 years agoCleanup a node's peer map when possible
Iustin Pop [Fri, 16 Jul 2010 20:20:17 +0000 (22:20 +0200)]
Cleanup a node's peer map when possible

If the last secondary instance of a peer is deleted (detected by the new
peer memory value being equal to zero), then the pair (pdx, 0) should be
deleted completely. This is not optimization per se, but rather cleanup
(the speedup is at most a percent, and only in some corner cases).

13 years agoFix handling of offline options and short names
Iustin Pop [Fri, 16 Jul 2010 18:30:51 +0000 (20:30 +0200)]
Fix handling of offline options and short names

This needs to be abstracted in a separate function, but in the meantime
we fix the issue in both places.

Signed-off-by: Iustin Pop <iustin@google.com>

14 years agoFix another haddock special-char issue
Iustin Pop [Mon, 21 Jun 2010 09:12:41 +0000 (11:12 +0200)]
Fix another haddock special-char issue

14 years agoRemove JOB_STATUS_GONE and add unittests
Iustin Pop [Mon, 21 Jun 2010 02:58:52 +0000 (04:58 +0200)]
Remove JOB_STATUS_GONE and add unittests

… for the serialization/deserialization of the job and opcode status.

Job status 'gone' was not actually used. It can be reintroduced if
needed.

14 years agoAdd opcode status constants/type
Iustin Pop [Mon, 21 Jun 2010 02:46:58 +0000 (04:46 +0200)]
Add opcode status constants/type

This mirrors, again, the Ganeti constats, and are added for future use.

14 years agoRename the job status constants
Iustin Pop [Mon, 21 Jun 2010 02:32:39 +0000 (04:32 +0200)]
Rename the job status constants

The rename is done such that we match Ganeti's own constants.

14 years agoOptimise the Luxi.recvMsg function
Iustin Pop [Sun, 6 Sep 2009 14:23:13 +0000 (16:23 +0200)]
Optimise the Luxi.recvMsg function

Since the current buffer cannot contain (during network reads) an EOM,
we should look for the EOM only in the newly-received string.  While
this shouldn't make much difference, in some tests it cuts the recvMsg
total time by around half.

On entering recvMsg, we have though to search the old buffer for a
message though, since we could have received two Luxi messages on the
last network query; this is however a one-off cost, compared to
continuously looking for the EOM in the old string (at each receive
loop).

14 years agoComplete the client Luxi implementation
Iustin Pop [Mon, 7 Jun 2010 22:09:37 +0000 (00:09 +0200)]
Complete the client Luxi implementation

All current Luxi calls are supported after this patch. A bug in
ArchiveJob is also fixed (Ganeti's job IDs are strings).

14 years agoAdd support for more LUXI calls
Iustin Pop [Mon, 7 Jun 2010 21:35:47 +0000 (23:35 +0200)]
Add support for more LUXI calls

While not are directly useful, having them will open some possibilities
(e.g. polling for job changes in hbal's -X mode, and auto-archiving the
jobs once they are successful).

14 years agoFix some lint errors in the unit tests
Iustin Pop [Wed, 2 Jun 2010 21:08:43 +0000 (23:08 +0200)]
Fix some lint errors in the unit tests

14 years agoChange the Luxi operations structure
Iustin Pop [Wed, 2 Jun 2010 20:27:56 +0000 (22:27 +0200)]
Change the Luxi operations structure

Currently, we define the LuxiOp type as a simple enumeration, and leave
the arguments structure to the users of the Ganeti.Luxi module. This is
suboptimal for a couple of reasons: first, we decouple the operation
type from operation arguments, and that means we don't use the type
system for validation of the arguments; second, the clients themselves
have to know about the JSON encoding of the protocol.

For the above arguments, we change the operation type to contain the
arguments too, and then the entire conversion/serialization is
restricted to the Ganeti.Luxi module. Also, the removal of the JSON
encoding from the clients results in an overall simplification of the
code.

14 years agoFix a warning in Loader tests
Iustin Pop [Tue, 1 Jun 2010 20:51:10 +0000 (22:51 +0200)]
Fix a warning in Loader tests

Incomplete pattern match…

14 years agoAdd a few Loader tests
Iustin Pop [Tue, 1 Jun 2010 17:54:22 +0000 (19:54 +0200)]
Add a few Loader tests

These are not comprehensive, but at least we have a start.

14 years agoModify the test runner to show test exceptions
Iustin Pop [Sun, 30 May 2010 18:16:33 +0000 (20:16 +0200)]
Modify the test runner to show test exceptions

QuickCheck's batch driver (at least v1) doesn't show the test aborts,
but simply discards the specific exception and increases the abort
count. This makes it hard to debug the tests, so we modify our own test
wrapper (which so far only tracked total failures) to show any
exceptions.

14 years agoReduce the warnings during the unittests
Iustin Pop [Fri, 28 May 2010 09:13:56 +0000 (11:13 +0200)]
Reduce the warnings during the unittests

Since the unittests are not 'clean' from the p.o.v. of type
declarations, and cannot be made clean in all respects (e.g. orphan
instances), we silence some warnings for the test target, to have a
cleaner output.

14 years agoImprove the test driver
Iustin Pop [Thu, 27 May 2010 21:39:58 +0000 (23:39 +0200)]
Improve the test driver

The tests are moved to a separate data structure, and we can select a
subset of tests to run.

14 years agoIntroduce OpCode unittests
Iustin Pop [Thu, 27 May 2010 21:25:21 +0000 (23:25 +0200)]
Introduce OpCode unittests

14 years agoIntroduce suport for optional keys in JObjects
Iustin Pop [Thu, 27 May 2010 21:00:30 +0000 (23:00 +0200)]
Introduce suport for optional keys in JObjects

Some keys are optional in the Ganeti opcodes (e.g. ‘node’ in the
OpReplaceDisks), and as such we need to transform them in a Maybe value,
instead of failing.

The patch reworks a bit fromObj and adds maybeFromObj which parses such
optional values. It then uses it in the opcode reading.

14 years agoReplace fromJResult with annotateJResult
Iustin Pop [Thu, 27 May 2010 20:37:54 +0000 (22:37 +0200)]
Replace fromJResult with annotateJResult

This patch removes all old uses of fromJResult with the annotated
version, and removes the non-annotated version. All JSON parsing points
should now have annotated errors.

14 years agoAdd annotations to loadJSArray
Iustin Pop [Thu, 27 May 2010 20:32:18 +0000 (22:32 +0200)]
Add annotations to loadJSArray

This allows, for example, the RAPI backend to detail which information
(instance or node data) fails to parse.

14 years agoChange fromObj error messages
Iustin Pop [Wed, 26 May 2010 22:54:48 +0000 (00:54 +0200)]
Change fromObj error messages

Currently fromObj doesn't detail what we're trying to read, which can
lead to cryptic messages: "Cannot read Int". The patch changes this
function to annotate the error messages with the key/value we're trying
to convert, by using a new version of fromJResult.

Since the display of the key in tryFromObj is now redundant (it was
already redundant in the 'not found' case), we remove it.

The new version of fromJResult (annotateJResult) simply prepends a
description string to the actual error message.

14 years agoA few more small Node unit-tests
Iustin Pop [Wed, 26 May 2010 22:11:53 +0000 (00:11 +0200)]
A few more small Node unit-tests

14 years agoAdd more unittests
Iustin Pop [Tue, 25 May 2010 17:17:57 +0000 (19:17 +0200)]
Add more unittests

Instance, Node and Text modules have improved coverage.

14 years agoAdd more unit tests for allocation/balance
Iustin Pop [Thu, 20 May 2010 16:36:26 +0000 (18:36 +0200)]
Add more unit tests for allocation/balance

The patch adds some simple unit-tests for both the allocation function
(we can allocate small instances on an empty cluster, we can allocate in
tiered more starting from any size) and the balancing functions (one
single instance is placed optimally, a full cluster plus an empty node
can be rebalanced). The coverage has increased greatly, since this is
the bulk of the algorithm/code.

Also, the cluster tests are now being run with different options, since
they are much slower.

14 years agoMove two functions from hspace to Cluster.hs
Iustin Pop [Thu, 20 May 2010 07:36:49 +0000 (09:36 +0200)]
Move two functions from hspace to Cluster.hs

This is done so we can test a longer pipeline.

14 years agoMake CStats instance of show
Iustin Pop [Wed, 19 May 2010 14:48:27 +0000 (16:48 +0200)]
Make CStats instance of show

This helps debugging via ghci.

14 years agoClarify options related to name passing
Iustin Pop [Thu, 20 May 2010 09:11:34 +0000 (11:11 +0200)]
Clarify options related to name passing

After the name patches, we can pass in either the short or the full
name, so update the hbal man page accordingly.

14 years agoAnother haddoc fix…
Iustin Pop [Thu, 20 May 2010 09:17:39 +0000 (11:17 +0200)]
Another haddoc fix…

14 years agoAccept both full and short names in CLI
Iustin Pop [Thu, 29 Apr 2010 15:57:49 +0000 (17:57 +0200)]
Accept both full and short names in CLI

This patch introduces some new functionality in the base Element type
and in Container which supports searching for all 'known' names of an
element, such that both short and full names are accept for various
options like '-O' and '--excluded-instances'.

14 years agoStop modifying names for internal computations
Iustin Pop [Thu, 29 Apr 2010 14:07:33 +0000 (16:07 +0200)]
Stop modifying names for internal computations

Currently the name used internally is modified and holds the shortened
name of the nodes/instances. This has caused issues before, since we
always have to strip the suffix from input data and reapply it if we
need to send data back to Ganeti.

This patch changes the code such that the names are never modified, only
the alias, and all the internal computations can forget about the common
suffix addition/removal.

14 years agoAdd a new node/instance field
Iustin Pop [Thu, 29 Apr 2010 13:30:47 +0000 (15:30 +0200)]
Add a new node/instance field

This new field ('alias') will hold the shortened/beautified display
name. When resetting the name, the alias is reset too, and there's a new
function to update only the alias.

14 years agoChange some test constants
Iustin Pop [Thu, 20 May 2010 09:05:57 +0000 (11:05 +0200)]
Change some test constants

First, we reduce the max size of the disks, since Int on 32bits will
overflow for big simulated clusters. This is a real issue, that will
need fixing in real life, but for now we just "silence" this test.

Second, we increase the amount of time a test is allowed to run,
otherwise on slower computers some tests might time-out.

14 years agoFix some haddock comments
Iustin Pop [Wed, 19 May 2010 13:28:26 +0000 (15:28 +0200)]
Fix some haddock comments

14 years agoAdd more unit tests
Iustin Pop [Wed, 19 May 2010 13:09:18 +0000 (15:09 +0200)]
Add more unit tests

This increases the overall coverage by 5%-10% (depending on coverage
type). Some modules are still not unittested at all, as HUnit is a
better choice for them.

14 years agoShuffle some constants around
Iustin Pop [Wed, 19 May 2010 13:08:24 +0000 (15:08 +0200)]
Shuffle some constants around

… and export more functions. This will help with unit testing.

14 years agoRemove the noLimit values and always use limits
Iustin Pop [Tue, 18 May 2010 13:06:12 +0000 (15:06 +0200)]
Remove the noLimit values and always use limits

This patch moves from allowing no-limits for disk/cpu ratios, and always
use a real limit. For disk, it's simple since we use 0, which means no
reservations for disks. For CPU, we set an (arbitrary) limit of 64 v/p,
which should be reasonable as a default limit (it can be changed via the
command line).

14 years agohspace: change handling of N+1 bad clusters
Iustin Pop [Mon, 17 May 2010 14:40:42 +0000 (16:40 +0200)]
hspace: change handling of N+1 bad clusters

Currently we just print a fake result and exit early. This is bad, since
it doesn't use the same codepaths for all the result printing, and has
already led to a bug where hspace looks like completely ignoring the
tiered specs request.

This patch changes the code to override the computation, instead of the
printout, thus allowing tiered specs results for such cases.

14 years agoFix hspace's KM metrics
Iustin Pop [Tue, 4 May 2010 11:42:39 +0000 (13:42 +0200)]
Fix hspace's KM metrics

We returned the KM_POOL_* metrics as the final state, not as the delta
between the final and the initial state.

14 years agoUpdate NEWS file for the 0.2.5 release htools-v0.2.5
Iustin Pop [Mon, 26 Apr 2010 15:02:22 +0000 (17:02 +0200)]
Update NEWS file for the 0.2.5 release

14 years agoUpdate hspace man page
Iustin Pop [Thu, 15 Apr 2010 14:25:46 +0000 (16:25 +0200)]
Update hspace man page

14 years agohspace: show more metrics
Iustin Pop [Thu, 15 Apr 2010 14:17:34 +0000 (16:17 +0200)]
hspace: show more metrics

This patch adds the metrics of used/allocable/unallocable resources.

14 years agoFix Node hiCpu computation
Iustin Pop [Thu, 15 Apr 2010 14:16:53 +0000 (16:16 +0200)]
Fix Node hiCpu computation

In case we're not enabling limits, let's restrict this to -1, instead of
-1 times the number of pcpus.

14 years agoAdd a new function to compute allocation deltas
Iustin Pop [Thu, 15 Apr 2010 09:50:24 +0000 (11:50 +0200)]
Add a new function to compute allocation deltas

Given two cluster states, the new function can answer the following
questions:

- how much resources currently allocated
- how much resources finally allocated (delta from above is how much we
  can actually allocate on the cluster)
- unallocable resources (whatever is left free after the previous step)

14 years agoIntroduce total vcpu tracking in CStats
Iustin Pop [Thu, 15 Apr 2010 09:27:44 +0000 (11:27 +0200)]
Introduce total vcpu tracking in CStats

We add a new field that tracks the available virtual cpus (expressed as
node cpus times the vcpu ratio).

14 years agoMerge branch 'master' into next
Iustin Pop [Wed, 14 Apr 2010 12:44:22 +0000 (14:44 +0200)]
Merge branch 'master' into next

* master:
  Fix iallocator crash when no solutions exist
  Fix IAllocator multi-evacuate message

14 years agoFix iallocator crash when no solutions exist
Iustin Pop [Tue, 9 Mar 2010 14:40:44 +0000 (15:40 +0100)]
Fix iallocator crash when no solutions exist

Commit 5436576 added an un-guarded `head' call, which crashes with
“Prelude.head: empty list” when no results exists for the per-instance
allocation/relocation calls.

This patch fixes this, and also adds another check for an unguarded
`head' call during parsing of input data.
(cherry picked from commit e41f4ba0ad09bcf3a696ab4eb7a1952e29f37d1f)

14 years agoFix IAllocator multi-evacuate message
Iustin Pop [Wed, 31 Mar 2010 09:51:15 +0000 (11:51 +0200)]
Fix IAllocator multi-evacuate message

Since Ganeti passes full host names (not common-suffix-stripped), we
need to remove the suffix from the evac_nodes keys too. In case one node
is not part of the cluster, it will lead to a wrong error message, but
for now it fixes the problem.

14 years agoFix iallocator crash when no solutions exist
Iustin Pop [Tue, 9 Mar 2010 14:40:44 +0000 (15:40 +0100)]
Fix iallocator crash when no solutions exist

Commit 5436576 added an un-guarded `head' call, which crashes with
“Prelude.head: empty list” when no results exists for the per-instance
allocation/relocation calls.

This patch fixes this, and also adds another check for an unguarded
`head' call during parsing of input data.

14 years agoFix a haddock comment issue
Iustin Pop [Fri, 26 Feb 2010 13:42:41 +0000 (14:42 +0100)]
Fix a haddock comment issue

For some versions of haddock, this can create problems.

14 years agoAbstract instance running states into a list
Iustin Pop [Thu, 25 Feb 2010 13:47:17 +0000 (14:47 +0100)]
Abstract instance running states into a list

This removes some manual checks from a few places in the code with a
single list defined once.

14 years agoA number of small fixes from hlint
Iustin Pop [Thu, 25 Feb 2010 13:39:13 +0000 (14:39 +0100)]
A number of small fixes from hlint

14 years agoAdd a lint target that uses hlint
Iustin Pop [Thu, 25 Feb 2010 12:49:37 +0000 (13:49 +0100)]
Add a lint target that uses hlint

14 years agoFix unused-do-binds for ghc 6.12
Iustin Pop [Thu, 25 Feb 2010 12:35:37 +0000 (13:35 +0100)]
Fix unused-do-binds for ghc 6.12

GHC 6.12 has some new warnings, which are valid in most cases except
(IMHO) printf usage.

14 years agoFix unused imports for ghc 6.12
Iustin Pop [Thu, 25 Feb 2010 12:34:29 +0000 (13:34 +0100)]
Fix unused imports for ghc 6.12

GHC 6.12 has become more picky about unused imports, so we need to
remove/tighten some of them.

14 years agoAllow overriding the ghc compiler used
Iustin Pop [Wed, 24 Feb 2010 15:21:33 +0000 (16:21 +0100)]
Allow overriding the ghc compiler used

… via a GHC make variable.

14 years agohscan: implement LUXI backend scanning
Iustin Pop [Tue, 23 Feb 2010 17:10:51 +0000 (18:10 +0100)]
hscan: implement LUXI backend scanning

This allows hscan to work also with NO_CURL (but only for the local
machine, of course).

14 years agoLoader: abort for unknown to-be-excluded instances
Iustin Pop [Tue, 23 Feb 2010 12:53:26 +0000 (13:53 +0100)]
Loader: abort for unknown to-be-excluded instances

14 years agoEnable hbal to use the new command line option
Iustin Pop [Tue, 23 Feb 2010 12:18:13 +0000 (13:18 +0100)]
Enable hbal to use the new command line option

14 years agobalance function: use the movable flag directly
Iustin Pop [Tue, 23 Feb 2010 12:13:23 +0000 (13:13 +0100)]
balance function: use the movable flag directly

Instead of deciding based on secondary node, use the new flag.

14 years agoUpdate the loader pipeline to set the movable flag
Iustin Pop [Tue, 23 Feb 2010 12:09:46 +0000 (13:09 +0100)]
Update the loader pipeline to set the movable flag

This updates the movable flag on instances if they have only one node
(we don't rely on OpMoveInstance) or if they are set so via the command
line options.

This doesn't yet enable the use of the new flag.

14 years agoAdd a 'movable' flag on instances
Iustin Pop [Tue, 23 Feb 2010 11:56:13 +0000 (12:56 +0100)]
Add a 'movable' flag on instances

This will be used instead of checking for no secondary and for
simplifying 'do not touch' instances.

14 years agoAdd an option for excluding instances from moves
Iustin Pop [Tue, 23 Feb 2010 09:40:07 +0000 (10:40 +0100)]
Add an option for excluding instances from moves

14 years agoUpdate NEWS file for the 0.2.4 release htools-v0.2.4
Iustin Pop [Mon, 22 Feb 2010 14:18:13 +0000 (15:18 +0100)]
Update NEWS file for the 0.2.4 release

14 years agoUpdate the hail man page
Iustin Pop [Mon, 22 Feb 2010 13:46:24 +0000 (14:46 +0100)]
Update the hail man page

This adds a short note for the new iallocator mode.

Signed-off-by: Iustin Pop <iustin@google.com>

14 years agoImplement IAllocator node evacuate request
Iustin Pop [Wed, 17 Feb 2010 09:09:22 +0000 (10:09 +0100)]
Implement IAllocator node evacuate request

This patch adds the new request loading/execution (trivial), but the
actual response formatting becomes more difficult as now the response
type differs by request.

Signed-off-by: Iustin Pop <iustin@google.com>

14 years agoAdd a tryEvac function
Iustin Pop [Wed, 17 Feb 2010 09:06:52 +0000 (10:06 +0100)]
Add a tryEvac function

This will be used by the node evacuate IAllocator request type.

Signed-off-by: Iustin Pop <iustin@google.com>

14 years agoMove a type declaration to Node.hs
Iustin Pop [Wed, 17 Feb 2010 08:54:05 +0000 (09:54 +0100)]
Move a type declaration to Node.hs

We'll need AllocElement in both Cluster and IAlloc in the future, so we
move it to Node.hs which is imported by both.

Signed-off-by: Iustin Pop <iustin@google.com>

14 years agoChange an internal type from Maybe to list
Iustin Pop [Tue, 16 Feb 2010 13:22:48 +0000 (14:22 +0100)]
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.

Signed-off-by: Iustin Pop <iustin@google.com>