ironic.console.container.container module¶
Docker compatible engine console container provider.
- class ironic.console.container.container.ContainerConsoleContainer[source]¶
Bases:
BaseConsoleContainerConsole container provider which uses a Docker compatible engine.
- is_stopped(task)[source]¶
Check whether the console container for this node has stopped.
- Parameters:
task – A TaskManager instance.
- Returns:
True if the container is definitively not running (stopped, exited, or deleted), False if it is running.
- Raises:
ConsoleContainerError
- provider_name = 'container'¶
- start_container(task, app_name, app_info)[source]¶
Start a console container for a node.
Any existing container for this node will be removed first, then a container is run from the rendered command template, blocking until its published VNC endpoint returns RFB data.
- Parameters:
task – A TaskManager instance.
app_name – Sets container environment APP value
app_info – Sets container environment APP_INFO value
- Returns:
Tuple of host IP address and published port
- Raises:
ConsoleContainerError
- stop_all_containers()[source]¶
Stops all console containers managed by this conductor
This is run on conductor startup and graceful shutdown to ensure no console containers are running. The list is scoped to this conductor’s label so a shared engine’s containers belonging to other conductors are never affected. –all also collects exited containers, which matters when a custom template omits –rm.
- Raises:
ConsoleContainerError