The cinder.service Module¶
Generic Node base class for all workers that run on hosts.
- 
class Launcher¶
- Bases: - object
- 
class Service(host, binary, topic, manager, report_interval=None, periodic_interval=None, periodic_fuzzy_delay=None, service_name=None, coordination=False, cluster=None, *args, **kwargs)¶
- Bases: - oslo_service.service.Service- Service object for binaries running on hosts. - A service takes a manager and enables rpc by listening to queues based on topic. It also periodically runs tasks on the manager and reports it state to the database services table. - 
basic_config_check()¶
- Perform basic config checks before starting service. 
 - 
classmethod create(host=None, binary=None, topic=None, manager=None, report_interval=None, periodic_interval=None, periodic_fuzzy_delay=None, service_name=None, coordination=False, cluster=None)¶
- Instantiates class and passes back application object. - Parameters: - host – defaults to CONF.host
- binary – defaults to basename of executable
- topic – defaults to bin_name - ‘cinder-‘ part
- manager – defaults to CONF.<topic>_manager
- report_interval – defaults to CONF.report_interval
- periodic_interval – defaults to CONF.periodic_interval
- periodic_fuzzy_delay – defaults to CONF.periodic_fuzzy_delay
- cluster – Defaults to None, as only some services will have it
 
 - 
static is_svc_upgrading_to_n(binary)¶
- Given an RPC API class determine if the service is upgrading. 
 - 
periodic_tasks(raise_on_error=False)¶
- Tasks to be run at a periodic interval. 
 - 
report_state()¶
- Update the state of this service in the datastore. 
 - 
reset()¶
 - 
service_id= None¶
 - 
start()¶
 - 
stop()¶
 - 
wait()¶
 
- 
- 
class WSGIService(name, loader=None)¶
- Bases: - oslo_service.service.ServiceBase- Provides ability to launch API from a ‘paste’ configuration. - 
reset()¶
- Reset server greenpool size to default. - Returns: - None 
 - 
start()¶
- Start serving this service using loaded configuration. - Also, retrieve updated port number in case ‘0’ was passed in, which indicates a random port should be used. - Returns: - None 
 - 
stop()¶
- Stop serving this API. - Returns: - None 
 - 
wait()¶
- Wait for the service to stop serving this API. - Returns: - None 
 
- 
- 
get_launcher()¶
- 
process_launcher()¶
- 
serve(server, workers=None)¶
- 
setup_profiler(binary, host)¶
- 
wait()¶