ironic.conductor.base_manager module¶
Base conductor manager functionality.
- class ironic.conductor.base_manager.BaseConductorManager(host, topic)[source]¶
- Bases: - object- has_reserved()[source]¶
- Determines if this host currently has any reserved nodes - Returns:
- True if this host has reserved nodes 
 
 - init_host(admin_context=None, start_consoles=True, start_allocations=True)[source]¶
- Initialize the conductor host. - Parameters:
- admin_context – the admin context to pass to periodic tasks. 
- start_consoles – If consoles should be started in initialization. 
- start_allocations – If allocations should be started in initialization. 
 
- Raises:
- RuntimeError when conductor is already running. 
- Raises:
- NoDriversLoaded when no drivers are enabled on the conductor. 
- Raises:
- DriverNotFound if a driver is enabled that does not exist. 
- Raises:
- DriverLoadError if an enabled driver cannot be loaded. 
- Raises:
- DriverNameConflict if a classic driver and a dynamic driver are both enabled and have the same name. 
- Raises:
- IncorrectConfiguration if invalid configuration has been set which cannot permit proper operation. 
 
 - iter_nodes(fields=None, **kwargs)[source]¶
- Iterate over nodes mapped to this conductor. - Requests node set from and filters out nodes that are not mapped to this conductor. - Yields tuples (node_uuid, driver, conductor_group, …) where … is derived from fields argument, e.g.: fields=None means yielding (‘uuid’, ‘driver’, ‘conductor_group’), fields=[‘foo’] means yielding (‘uuid’, ‘driver’, ‘conductor_group’, ‘foo’). - Parameters:
- fields – list of fields to fetch in addition to uuid, driver, and conductor_group 
- kwargs – additional arguments to pass to dbapi when looking for nodes 
 
- Returns:
- generator yielding tuples of requested fields 
 
 - prepare_host()[source]¶
- Prepares host for initialization - Prepares the conductor for basic operation by removing any existing transitory node power states and reservations which were previously held by this host. - Under normal operation, this is also when the initial database connectivity is established for the conductor’s normal operation. 
 
- ironic.conductor.base_manager.reject_when_reached(pool_size)[source]¶
- Return a function to reject new work for Ironic. - Parameters:
- pool_size – The maximum number of items in the execution pool. 
- Returns:
- A function which is executed by futurist when attempting to determine if work should be deleted, or not. 
 
