https://blueprints.launchpad.net/octavia/+spec/housekeeping-manager
The Housekeeping Manager will manage the spare amphora pool and the teardown of amphorae that are no longer needed. On a configurable interval the Housekeeping Manager will check the Octavia database to identify the required cleanup and maintenance actions required. The amphora-lifecycle-management specification details the Create and Deactivate amphora sequences the Housekeeping Manager will follow.
The housekeeping manager will run as a daemon process which will perform the following actions:
Establish a base class to model the desired functionality:
class HousekeepingManager(object):
""" Class to manage the spare amphora pool. This class should do
very little actual work, its main job is to monitor the spare pool
and schedule creation of new amphrae and removal of used amphrae.
By default, used amphorae will be deleted, but they may optionally
be preserved for future analysis.
"""
def get_spare_amphora_size(self):
""" Return the target capacity of the spare pool """
raise NotImplementedError
def get_ready_spare_amphora_count(self):
""" Return the number of available amphorae in the spare pool
"""
raise NotImplementedError
def create_amphora(self, num_to_create = 1):
""" Schedule the creation of the specified number of amphorae
to be added to the spare pool."""
raise NotImplementedError
def remove_amphora(self, amphora_ids):
""" Schedule the removal of the amphorae specified by
amphora_ids."""
raise NotImplementedError
The manager is expected to raise or pass along the following well-defined exceptions:
NotImplementedError - this functionality is not implemented/not supported
all if no specific exception can be found * NotFoundError - this amphora couldn’t be found/ was deleted by nova * UnauthorizedException - the driver can’t access the amphora * UnavailableException - the amphora is temporary unavailable * DeleteFailed - this load balancer couldn’t be deleted
Requires the addition of the housekeeping_interval, spare_pool_size, spare_amphora_pool_size, maximum_preserved_amphora_count, preservation_scheme, and preservation_method to the config.
None.
Must follow standard practices for database access.
There should be no end-user-visible impact.
The housekeeping_interval and spare_pool_size parameters will be adjustible by the operator in order to balance resource usage against performance.
Developers of other modules need to be aware that amphorae may be created, deleted, or saved for diagonsis by this daemon.
Al Miller <ajmiller>
Amphora driver Config manager
None - we won’t document the interface for 0.5. If that changes we need to write an interface documentation so 3rd party drivers know what we expect.