Merge "Enhance doc for nova services"

This commit is contained in:
Jenkins
2017-09-06 13:25:26 +00:00
committed by Gerrit Code Review
2 changed files with 8 additions and 1 deletions
+1 -1
View File
@@ -50,6 +50,6 @@ Implementation-Specific Drivers
A manager will generally load a driver for some of its tasks. The driver is responsible for specific implementation details. Anything running shell commands on a host, or dealing with other non-python code should probably be happening in a driver.
Drivers should minimize touching the database, although it is currently acceptable for implementation specific data. This may be reconsidered at some point.
Drivers should not touch the database as the database management is done inside `nova-conductor`.
It usually makes sense to define an Abstract Base Class for the specific driver (i.e. VolumeDriver), to define the methods that a different driver would need to implement.
+7
View File
@@ -136,6 +136,11 @@ class Service(service.Service):
}
def start(self):
"""Start the service.
This includes starting an RPC service, initializing
periodic tasks, etc.
"""
verstr = version.version_string_with_package()
LOG.info(_LI('Starting %(topic)s node (version %(version)s)'),
{'topic': self.topic, 'version': verstr})
@@ -256,6 +261,7 @@ class Service(service.Service):
LOG.warning(_LW('Service killed that has no database entry'))
def stop(self):
"""stop the service and clean up."""
try:
self.rpcserver.stop()
self.rpcserver.wait()
@@ -286,6 +292,7 @@ class Service(service.Service):
sys.exit(1)
def reset(self):
"""reset the service."""
self.manager.reset()