Script ganeti_noded :: Class NodeHttpServer
[hide private]
[frames] | no frames]

Class NodeHttpServer


The server implementation.

This class holds all methods exposed over the RPC interface.

Instance Methods [hide private]
 
__init__(self, *args, **kwargs)
Initializes the HTTP server
 
HandleRequest(self, req)
Handle a request.

Inherited from ganeti.http.server.HttpServer: OnSignal, PreHandleRequest, Start, Stop, handle_accept

Inherited from ganeti.http.HttpBase: GetSslCiphers

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Inherited from asyncore.dispatcher: __getattr__, accept, add_channel, bind, close, connect, create_socket, del_channel, handle_close, handle_connect, handle_connect_event, handle_error, 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, writable

Static Methods [hide private]
 
perspective_blockdev_create(params)
Create a block device.
 
perspective_blockdev_remove(params)
Remove a block device.
 
perspective_blockdev_rename(params)
Remove a block device.
 
perspective_blockdev_assemble(params)
Assemble a block device.
 
perspective_blockdev_shutdown(params)
Shutdown a block device.
 
perspective_blockdev_addchildren(params)
Add a child to a mirror device.
 
perspective_blockdev_removechildren(params)
Remove a child from a mirror device.
 
perspective_blockdev_getmirrorstatus(params)
Return the mirror status for a list of disks.
 
perspective_blockdev_find(params)
Expose the FindBlockDevice functionality for a disk.
 
perspective_blockdev_snapshot(params)
Create a snapshot device.
 
perspective_blockdev_grow(params)
Grow a stack of devices.
 
perspective_blockdev_close(params)
Closes the given block devices.
 
perspective_blockdev_getsize(params)
Compute the sizes of the given block devices.
 
perspective_blockdev_export(params)
Compute the sizes of the given block devices.
 
perspective_drbd_disconnect_net(params)
Disconnects the network connection of drbd disks.
 
perspective_drbd_attach_net(params)
Attaches the network connection of drbd disks.
 
perspective_drbd_wait_sync(params)
Wait until DRBD disks are synched.
 
perspective_drbd_helper(params)
Query drbd helper.
 
perspective_finalize_export(params)
Expose the finalize export functionality.
 
perspective_export_info(params)
Query information about an existing export on this node.
 
perspective_export_list(params)
List the available exports on this node.
 
perspective_export_remove(params)
Remove an export.
 
perspective_lv_list(params)
Query the list of logical volumes in a given volume group.
 
perspective_vg_list(params)
Query the list of volume groups.
 
perspective_storage_list(params)
Get list of storage units.
 
perspective_storage_modify(params)
Modify a storage unit.
 
perspective_storage_execute(params)
Execute an operation on a storage unit.
 
perspective_bridges_exist(params)
Check if all bridges given exist on this node.
 
perspective_instance_os_add(params)
Install an OS on a given instance.
 
perspective_instance_run_rename(params)
Runs the OS rename script for an instance.
 
perspective_instance_shutdown(params)
Shutdown an instance.
 
perspective_instance_start(params)
Start an instance.
 
perspective_migration_info(params)
Gather information about an instance to be migrated.
 
perspective_accept_instance(params)
Prepare the node to accept an instance.
 
perspective_finalize_migration(params)
Finalize the instance migration.
 
perspective_instance_migrate(params)
Migrates an instance.
 
perspective_instance_reboot(params)
Reboot an instance.
 
perspective_instance_info(params)
Query instance information.
 
perspective_instance_migratable(params)
Query whether the specified instance can be migrated.
 
perspective_all_instances_info(params)
Query information about all instances.
 
perspective_instance_list(params)
Query the list of running instances.
 
perspective_node_tcp_ping(params)
Do a TcpPing on the remote node.
 
perspective_node_has_ip_address(params)
Checks if a node has the given ip address.
 
perspective_node_info(params)
Query node information.
 
perspective_node_add(params)
Complete the registration of this node in the cluster.
 
perspective_node_verify(params)
Run a verify sequence on this node.
 
perspective_node_start_master(params)
Promote this node to master status.
 
perspective_node_stop_master(params)
Demote this node from master status.
 
perspective_node_leave_cluster(params)
Cleanup after leaving a cluster.
 
perspective_node_volumes(params)
Query the list of all logical volume groups.
 
perspective_node_demote_from_mc(params)
Demote a node from the master candidate role.
 
perspective_node_powercycle(params)
Tries to powercycle the nod.
 
perspective_version(params)
Query version information.
 
perspective_upload_file(params)
Upload a file.
 
perspective_master_info(params)
Query master information.
 
perspective_write_ssconf_files(params)
Write ssconf files.
 
perspective_os_diagnose(params)
Query detailed information about existing OSes.
 
perspective_os_get(params)
Query information about a given OS.
 
perspective_os_validate(params)
Run a given OS' validation routine.
 
perspective_hooks_runner(params)
Run hook scripts.
 
perspective_iallocator_runner(params)
Run an iallocator script.
 
perspective_test_delay(params)
Run test delay.
 
perspective_file_storage_dir_create(params)
Create the file storage directory.
 
perspective_file_storage_dir_remove(params)
Remove the file storage directory.
 
perspective_file_storage_dir_rename(params)
Rename the file storage directory.
 
perspective_jobqueue_update(params)
Update job queue.
 
perspective_jobqueue_purge(params)
Purge job queue.
 
perspective_jobqueue_rename(params)
Rename a job queue file.
 
perspective_hypervisor_validate_params(params)
Validate the hypervisor parameters.
 
perspective_x509_cert_create(params)
Creates a new X509 certificate for SSL/TLS.
 
perspective_x509_cert_remove(params)
Removes a X509 certificate.
 
perspective_import_start(params)
Starts an import daemon.
 
perspective_export_start(params)
Starts an export daemon.
 
perspective_impexp_status(params)
Retrieves the status of an import or export daemon.
 
perspective_impexp_abort(params)
Aborts an import or export.
 
perspective_impexp_cleanup(params)
Cleans up after an import or export.
Class Variables [hide private]

Inherited from ganeti.http.server.HttpServer: MAX_CHILDREN

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, *args, **kwargs)
(Constructor)

 

Initializes the HTTP server

Parameters:
  • mainloop - Mainloop used to poll for I/O events
  • local_address - Local IP address to bind to
  • port - TCP port to listen on
  • ssl_params - SSL key and certificate
  • ssl_verify_peer - Whether to require client certificate and compare it with our certificate
  • request_executor_class - an class derived from the HttpServerRequestExecutor class
Overrides: asyncore.dispatcher.__init__

HandleRequest(self, req)

 

Handle a request.

Overrides: ganeti.http.server.HttpServer.HandleRequest

perspective_blockdev_addchildren(params)
Static Method

 

Add a child to a mirror device.

Note: this is only valid for mirror devices. It's the caller's duty to send a correct disk, otherwise we raise an error.

perspective_blockdev_removechildren(params)
Static Method

 

Remove a child from a mirror device.

This is only valid for mirror devices, of course. It's the callers duty to send a correct disk, otherwise we raise an error.

perspective_blockdev_find(params)
Static Method

 

Expose the FindBlockDevice functionality for a disk.

This will try to find but not activate a disk.

perspective_blockdev_snapshot(params)
Static Method

 

Create a snapshot device.

Note that this is only valid for LVM disks, if we get passed something else we raise an exception. The snapshot device can be remove by calling the generic block device remove call.

perspective_drbd_disconnect_net(params)
Static Method

 

Disconnects the network connection of drbd disks.

Note that this is only valid for drbd disks, so the members of the disk list must all be drbd devices.

perspective_drbd_attach_net(params)
Static Method

 

Attaches the network connection of drbd disks.

Note that this is only valid for drbd disks, so the members of the disk list must all be drbd devices.

perspective_drbd_wait_sync(params)
Static Method

 

Wait until DRBD disks are synched.

Note that this is only valid for drbd disks, so the members of the disk list must all be drbd devices.

perspective_export_info(params)
Static Method

 

Query information about an existing export on this node.

The given path may not contain an export, in which case we return None.

perspective_export_list(params)
Static Method

 

List the available exports on this node.

Note that as opposed to export_info, which may query data about an export in any path, this only queries the standard Ganeti path (constants.EXPORT_DIR).

perspective_upload_file(params)
Static Method

 

Upload a file.

Note that the backend implementation imposes strict rules on which files are accepted.

perspective_jobqueue_update(params)
Static Method

 

Update job queue.

Decorators:
  • @_RequireJobQueueLock

perspective_jobqueue_purge(params)
Static Method

 

Purge job queue.

Decorators:
  • @_RequireJobQueueLock

perspective_jobqueue_rename(params)
Static Method

 

Rename a job queue file.

Decorators:
  • @_RequireJobQueueLock