Package ganeti :: Package server :: Module masterd :: Class MasterServer
[hide private]
[frames] | no frames]

Class MasterServer

source code


Master Server.

This is the main asynchronous master server. It handles connections to the master socket.

Instance Methods [hide private]
 
__init__(self, address, uid, gid)
MasterServer constructor
source code
 
handle_connection(self, connected_socket, client_address)
Handle an already accepted connection.
source code
 
setup_queue(self) source code
 
WaitForShutdown(self)
Prepares server for shutdown.
source code
 
server_cleanup(self)
Cleanup the server.
source code

Inherited from daemon.AsyncStreamServer: handle_accept

Inherited from daemon.GanetiBaseAsyncoreDispatcher: handle_error, writable

Inherited from asyncore.dispatcher: __getattr__, __repr__, __str__, accept, add_channel, bind, close, connect, create_socket, del_channel, handle_close, handle_connect, handle_connect_event, handle_expt, handle_expt_event, handle_read, handle_read_event, handle_write, handle_write_event, listen, log, log_info, readable, recv, send, set_reuse_addr, set_socket

Class Variables [hide private]
  family = socket.AF_UNIX

Inherited from daemon.AsyncStreamServer (private): _REQUEST_QUEUE_SIZE

Inherited from asyncore.dispatcher: accepting, addr, closing, connected, connecting, debug, ignore_log_types

Method Details [hide private]

__init__(self, address, uid, gid)
(Constructor)

source code 

MasterServer constructor

Parameters:
  • address - the unix socket address to bind the MasterServer to
  • uid - The uid of the owner of the socket
  • gid - The gid of the owner of the socket
Overrides: asyncore.dispatcher.__init__

handle_connection(self, connected_socket, client_address)

source code 

Handle an already accepted connection.

Overrides: daemon.AsyncStreamServer.handle_connection
(inherited documentation)

server_cleanup(self)

source code 

Cleanup the server.

This involves shutting down the processor threads and the master socket.