Statistics
| Branch: | Tag: | Revision:

root / daemons / ganeti-confd @ 7e1fac25

History | View | Annotate | Download (11.6 kB)

# Date Author Comment
1fea2f0d 09/28/2009 12:36 pm Guido Trotter

ganeti-confd: cleanup imports

Many functionalities of confd have been moved to other classes/modules,
and the main confd daemon doesn't reference these modules directly
anymore.

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

0b678558 09/28/2009 12:36 pm Guido Trotter

ganeti-confd: don't depend on the os log dir

ganeti-confd doesn't need to log anything related to os installations.

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

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

ganeti-confd: remove partial imports

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

4f16b4a0 09/16/2009 03:55 pm Guido Trotter

ConfdAsyncUDPServer: handle signals at read time

Currently if a signal is delivered during an attempted read, an
exception is logged in the logfile. There is no need for this, so we
handle this case explicitely.

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

465b8ee3 09/16/2009 03:55 pm Guido Trotter

ConfdAsyncUDPServer: defer handling writes

Currently if we fail writing to the socket (perhaps because a signal was
delivered) we lose the data we were sending. Although this is not too
bad (it's udp, and data may get lost anyway) we try to avoid this by...

5f3269fc 09/16/2009 03:55 pm Guido Trotter

Abstract AsyncUDPSocket to daemon

This allows this extended asyncore+udp module to be used also in other
daemons, and in the confd client library

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

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

ConfdAsyncUDPServer: fix a docstring

It refers to an older input variable

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

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

Add a magic fourcc code to confd packets

This will make it easier to change the protocol later on

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

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

ganeti-confd: explicitely log failed big sends

Make sure that if we try to send packages which are too big (which
shouldn't happen) this gets properly logged in the config file.

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

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

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

confd: avoid spamming the logfile

When confd is disabled we don't want to be noticed every timer interval.

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

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

confd: start in polling mode

This allows us not to enable the inotify handler immediately, and thus
to make it easier for us should the config file not exist at all.

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

22d3e184 08/28/2009 05:44 pm Guido Trotter

Confd: don't fail if the config doesn't load

Rather than quitting we'll just continue to poll the config at a slow
rate, hoping that sooner or later we'll get it back. This allows also
working on non-MC nodes, and smoothly transitioning from MC to non-MC,...

176d3122 08/28/2009 05:44 pm Guido Trotter

confd: s/confd_event_handler/inotify_handler/

In a case we don't encounter frequently (file modified but not
overwritten) the notify handler we use is called with a wrong name.

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

e2be81cf 08/28/2009 02:17 pm Guido Trotter

Implement timers in confd

Timers are used both for checking for inotify failures, and for polling,
should inotify notices become too frequent.

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

ef4ca33b 08/28/2009 02:08 pm Guido Trotter

ConfdInotifyEventHandler.enable: use InotifyError

Rather than raising ConfdFatalError directly
ConfdInotifyEventHandler.enable raises InotifyError should it not be
able to configure inotify, allowing the caller to decide what to do.

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

4afe249b 08/28/2009 02:07 pm Guido Trotter

ConfdInotifyEventHandler, move to a callback

ConfdInotifyEventHandler used to reload the config whenever a
notification arrived. Moving to a callback system, so that
ConfdConfigurationReloader can be responsible for that functionality.

Additionally the inotify class no longer reenables itself automatically,...

562bee4d 08/28/2009 02:07 pm Guido Trotter

Move creation of inotify handler to a new class

This class will be responsible for managing inotify notifications,
timers, and rate-limiting reloads. For now none of these features is
implemented. :)

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

46c9b31d 08/28/2009 02:06 pm Guido Trotter

ConfdInotifyEventHandler: add enable/disable

Make possible to enable and disable the inotify event handler. The
inotify handler will remain enabled, unless explicitely told to disable
itself.

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

6c948699 08/25/2009 07:00 pm Michael Hanselmann

Style fixes for ganeti-*

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

f91c7223 08/20/2009 05:08 pm Guido Trotter

Convert ganeti-confd to Mainloop

Now that mainloop is asyncore-enabled we can easily do that.

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

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

b84cb9a0 08/10/2009 04:46 pm Guido Trotter

Initial confd implementation

ganeti-confd is a simple asynchronous daemon, which listens on a UDP
port, passes each packet to a processor, and sends back to the client
the result.

It also listens on an inotify socket, in order to reload its
configuration when the ganeti config file changes....