Statistics
| Branch: | Tag: | Revision:

root / Ganeti / HTools / Rapi.hs @ 934c62dc

History | View | Annotate | Download (4.8 kB)

# Date Author Comment
6402a260 12/11/2009 06:17 pm Iustin Pop

Use the oper_ram field if available

For the RAPI and LUXI backends, we can get the actual memory usage (if
instances are running) via the oper_ram, whereas backend/memory only
tell what the instance will use at the next boot.

Not using oper_ram means that the node model is flawed and we consider...

b45222ce 12/09/2009 12:30 pm Iustin Pop

rapi, luxi: treat drained nodes as offline

Commit e97f211 changed the iallocator backend to handle drained nodes as
offline. This commit completes that change by making the rapi and luxi
backend do the same (the text backend ignores any '?' values which are...

ea017cbc 12/01/2009 11:53 am Iustin Pop

Read cluster tags in the RAPI backend

This also shows them in hbal in verbose mode.

94e05c32 11/27/2009 05:13 pm Iustin Pop

Introduce support for reading the cluster tags

While these are not actually populated from the backends, and all the
programs ignore them, this patch contains the changes in the function
types required.

17e7af2b 11/11/2009 12:10 pm Iustin Pop

Add a tags attribute to instances

… and read it in all the loaders. hscan is modified to save it to the
files it generates.

The attribute is not yet used in any place.

117dc2d8 11/06/2009 07:23 pm Iustin Pop

Enhance the error reporting for Rapi and Luxi

Currently the JSON conversion in Rapi and Luxi are giving something
like:
Error: failed to load data. Details:
Unable to read Double

This doesn't tell one where the error is (in a node specification? and...

262f3e6c 11/06/2009 07:23 pm Iustin Pop

Change the Utils.fromObj signature

Currently the fromObj function takes a JSON object which is then
converted into a list of (String, JSValue) in which we make a lookup.
However, most of the callers of this function call it repeatedly on the
same object, which means we do the object→list conversion repeatedly....

135a6c6a 07/14/2009 03:56 pm Iustin Pop

Introduce timeout in RAPI queries

The patch adds two constants in Types.hs for connect and query timeout,
then modifies Rapi.hs to use them as the connect and general curl
timeout.

Rapi could be improved more, as currently we wait double the total
timeout due to not aborting early in case the node queries failed.

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

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

d752eb39 06/10/2009 10:42 pm Iustin Pop

Add a new vcpus attribute to instances

This patch adds reading of vcpu count for instances, in preparation for
using the vcpu ratio in cluster scoring.

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.

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.

a8946537 05/25/2009 10:22 pm Iustin Pop

Fix some haddock issues

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

e3a684c5 05/24/2009 02:43 am Iustin Pop

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.

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

1297ce13 05/21/2009 02:11 am Iustin Pop

Small syntax improvement

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

e015b554 05/21/2009 01:24 am Iustin Pop

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

ba00ad4d 05/21/2009 12:55 am Iustin Pop

Remove some 1.2 specific code

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

5aa48dbe 05/21/2009 12:54 am Iustin Pop

Generalize some Result function into monad ones

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

942403e6 05/21/2009 12:25 am Iustin Pop

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

aff363a4 05/20/2009 12:50 am Iustin Pop

Drop RAPI v1 compatiblity

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

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.

9ba5c28f 05/18/2009 12:03 pm Iustin Pop

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.

190ce47c 03/23/2009 12:32 am Iustin Pop

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

f82f1f39 03/22/2009 12:24 pm Iustin Pop

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

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.

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.