Statistics
| Branch: | Tag: | Revision:

root / lib / confd @ cd195419

# Date Author Comment
cd195419 10/26/2009 04:48 pm Guido Trotter

SimpleConfigReader: ips are partitioned by link

We were already half-doing it, but this completes the process.

1) We don't maintain a list of ips or an ip->instance map
2) We add a new link,ip->instance map (link->ips list we had)
3) We add the link parameter to GetInstanceByIp (making it...

6855f043 10/26/2009 12:17 pm Guido Trotter

Import errors in confd init

It's used by some functions defined there.

Signed-off-by: Guido Trotter <>
Reviewed-by: Olivier Tharan <>

95b487bb 10/22/2009 04:40 pm Flavio Silvestrow

confd: query the pnode of multiple instances at once

Signed-off-by: Flavio Silvestrow <>
Signed-off-by: Guido Trotter <>
Reviewed-by: Guido Trotter <>

69b99987 10/12/2009 01:48 pm Michael Hanselmann

Code and docstring style fixes

Found using pylint and epydoc.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Guido Trotter <>

23824641 09/30/2009 05:49 pm Luca Bigliardi

Extend confd instances ips query

The query now accepts a link parameter.

Signed-off-by: Luca Bigliardi <>
Reviewed-by: Guido Trotter <>

a5229439 09/29/2009 01:06 pm Guido Trotter

confd/client: make it possible to update peer list

Until now the peers have to be the same all the time. Adding a new
function to update the list, and call it from the constructor to avoid
duplicating code.

Signed-off-by: Guido Trotter <>...

5f6f260a 09/28/2009 06:58 pm Guido Trotter

confd/client: pass self to upcalls

It may be handy for upcalls to know which client called them, and call
it back. So we create a new "client" field in the upcall target,
containing the current client instance

Signed-off-by: Guido Trotter <>...

a9613def 09/28/2009 12:37 pm Guido Trotter

ConfdFilterCallback: fix a bug in expire

The HandleExpire function takes the whole "up" structure, and not just
the salt.

Signed-off-by: Guido Trotter <>
Reviewed-by: Iustin Pop <>

392ca296 09/25/2009 05:37 pm Guido Trotter

Implement ConfdFilterCallback

This callback can be stacked with another one, and will filter duplicate
or old results, making handling of results easier.

Signed-off-by: Guido Trotter <>
Reviewed-by: Michael Hanselmann <>

cf7b0cc4 09/25/2009 05:37 pm Guido Trotter

Confd client: add module level documentation

Populate the docstring with documentation on the client library's usage.

Signed-off-by: Guido Trotter <>
Reviewed-by: Iustin Pop <>

c103d7ae 09/24/2009 01:04 pm Guido Trotter

Unpack the confd reply as an object, from the dict

Signed-off-by: Guido Trotter <>
Reviewed-by: Iustin Pop <>

90469357 09/23/2009 06:07 pm Guido Trotter

Confd client: make SendRequest args optional

By default "None" will be used as an args value

Signed-off-by: Guido Trotter <>
Reviewed-by: Michael Hanselmann <>

96e03b0b 09/23/2009 06:07 pm Guido Trotter

Confd client: Change callback model

We move to one callback in total, rather than one per call, and call it
both for server replies and request expiring.

Signed-off-by: Guido Trotter <>
Reviewed-by: Michael Hanselmann <>

7d20c647 09/23/2009 06:07 pm Guido Trotter

Confd client: make confd port configurable

The port can be now chosen at library init time, with a default of
calling GetDaemonPort.

Signed-off-by: Guido Trotter <>
Reviewed-by: Michael Hanselmann <>

a3db74e4 09/23/2009 06:07 pm Guido Trotter

Confd client library: enable optional logging

If a logger is passed in, we log some debugging messages that might help
someone who's debugging a confd client to understand what's going on.

Signed-off-by: Guido Trotter <>
Reviewed-by: Michael Hanselmann <>

d01ae714 09/22/2009 05:35 pm Luca Bigliardi

Confd: add instances IPs query

Extend confd to answer queries about instances IPs.

Signed-off-by: Luca Bigliardi <>
Reviewed-by: Iustin Pop <>

efbb4fd2 09/16/2009 04:55 pm Luca Bigliardi

Confd: add primary IPs queries

Extend confd to answer queries about nodes primary IPs and master candidates
primary IPs.

Signed-off-by: Luca Bigliardi <>
Reviewed-by: Michael Hanselmann <>

e4ccf6cd 09/16/2009 03:55 pm Guido Trotter

Confd client library

Initial confd client library implementation. This initial version uses
asyncore, and supports answers via a callback.

Signed-off-by: Guido Trotter <>
Reviewed-by: Michael Hanselmann <>

9748ab35 09/16/2009 03:55 pm Guido Trotter

Move fourcc packing/unpacking to main confd module

This way it can be used by the client as well

Signed-off-by: Guido Trotter <>
Reviewed-by: Michael Hanselmann <>

4d4a651d 09/11/2009 05:33 pm Michael Hanselmann

Wrap lines over 80 characters

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Luca Bigliardi <>

d73ef63f 09/03/2009 06:45 pm Michael Hanselmann

A few style fixes

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Luca Bigliardi <>

48166551 08/31/2009 06:43 pm Guido Trotter

confd: add cluster master query

Signed-off-by: Guido Trotter <>
Reviewed-by: Michael Hanselmann <>

0bc8432b 08/31/2009 06:43 pm Guido Trotter

confd/querylib: fix docstrings

They were cut&paste from the first example queries, rather than
documenting the current ones.

Signed-off-by: Guido Trotter <>
Reviewed-by: Michael Hanselmann <>

05f1ebf3 08/28/2009 05:44 pm Guido Trotter

Move SimpleConfigReader creation to ConfdProcessor

This will be useful to make ConfdProcessor aware of a config failure,
without quitting confd.

Signed-off-by: Guido Trotter <>
Reviewed-by: Iustin Pop <>

e369f21d 08/28/2009 05:44 pm Guido Trotter

ConfdProcessor: add disabled state

This is a state the processor will get in, if it fails to load the
config.

Signed-off-by: Guido Trotter <>
Reviewed-by: Iustin Pop <>

53bd7366 08/12/2009 01:02 pm Guido Trotter

InstanceIpToNodePrimaryIpQuery

This implements CONFD_REQ_NODE_PIP_BY_INSTANCE_IP, and maps instance ips
to primary node ips.

Signed-off-by: Guido Trotter <>
Reviewed-by: Michael Hanselmann <>

7189e790 08/12/2009 01:02 pm Guido Trotter

querylib: abstract a couple of common errors

Rather than composing them every time, we'll keep "ready-made" tuples
for unknown entries and internal errors (which is, yet, unused)

Signed-off-by: Guido Trotter <>
Reviewed-by: Michael Hanselmann <>

6daf26a0 08/12/2009 12:54 pm Guido Trotter

Add NodeRoleQuery

This implements CONFD_REQ_NODE_ROLE_BYNAME.

Signed-off-by: Guido Trotter <>
Reviewed-by: Michael Hanselmann <>

4d5db19c 08/12/2009 12:54 pm Guido Trotter

Remove unused imports from confd files

confd.server and daemons/ganeti-confd import a few modules they don't
actually use. Clean them up.

Signed-off-by: Guido Trotter <>
Reviewed-by: Iustin Pop <>

12ce965f 08/12/2009 12:54 pm Guido Trotter

ConfdProcessor fix init docstring

The message is an error deriving from some code moving/refactoring
happening before the initial submission

Signed-off-by: Guido Trotter <>
Reviewed-by: Iustin Pop <>

e16e4824 08/12/2009 12:54 pm Guido Trotter

Implement confd queries

We'll start with a simple ping query, which returns ok if it gets no
query argument, and an error if it gets any. Also non-implemented query
are handled by the base ConfdQuery class, so we don't have to
special-case them in ConfdProcessor anymore....

d21eda27 08/12/2009 12:54 pm Guido Trotter

ConfdProcessor: move verification to init

During a query execution we currently verify whether we have that query
supported in our dispatch table. Since it's an error not to have it
anyway, we move this verification to the class creation, erroring out...

71f27d19 08/10/2009 04:46 pm Guido Trotter

confd.server.ConfdProcessor

A ConfdProcessor is the job processor for a confd query.
It's responsible for all the processing, from unpacking it, verifying
it, to calculating the result.

Signed-off-by: Guido Trotter <>
Reviewed-by: Iustin Pop <>

12426ae1 08/10/2009 03:57 pm Guido Trotter

Add empty ganeti.confd module

It will be used for the confd server code, and for a basic client
library.

Signed-off-by: Guido Trotter <>
Reviewed-by: Iustin Pop <>