Script ganeti_masterd :: Class MasterServer
[hide private]
[frames] | no frames]

Class MasterServer


Master Server.

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

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

Inherited from ganeti.daemon.AsyncStreamServer: handle_accept

Inherited from ganeti.daemon.GanetiBaseAsyncoreDispatcher: handle_error, writable

Inherited from asyncore.dispatcher: __getattr__, __repr__, 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 asyncore.dispatcher: accepting, addr, closing, connected, debug, ignore_log_types

Method Details [hide private]

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

 

MasterServer constructor

Parameters:
  • mainloop (ganeti.daemon.Mainloop) - Mainloop used to poll for I/O events
  • 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)

 

Handle an already accepted connection.

Overrides: ganeti.daemon.AsyncStreamServer.handle_connection
(inherited documentation)

server_cleanup(self)

 

Cleanup the server.

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