ironic.console.container.container module

Docker compatible engine console container provider.

class ironic.console.container.container.ContainerConsoleContainer[source]

Bases: BaseConsoleContainer

Console container provider which uses a Docker compatible engine.

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

stop_container(task)[source]

Stop a console container for a node.

Any existing container for this node will be removed. Console containers are stateless, so no graceful stop period is needed.

Parameters:

task – A TaskManager instance.

Raises:

ConsoleContainerError