VNC console support for Ironic driver

Registered by Mathieu Mitchell

Leverage Ironic VNC console support to enable graphical console support on baremetal instances.

Blueprint information

Status:
Not started
Approver:
sean mooney
Priority:
Undefined
Drafter:
Mathieu Mitchell
Direction:
Approved
Assignee:
Mathieu Mitchell
Definition:
Approved
Series goal:
Accepted for antelope
Implementation:
Unknown
Milestone target:
None

Related branches

Sprints

Whiteboard

As part of the initiative to offer graphical console access to baremetal nodes, this change suggests making use of Ironic's graphical console capabilities within Nova, through a virt driver's ``get_vnc_console`` method.

The ironic virt driver would call Ironic's ``get-graphical-console`` and return a ``ctype.ConsoleVNC`` with the required connection information. Additionally, we would add a configuration option to allow the driver to auto-start the console whenever requested. This would allow a behavior similar to libvirt, where the console is always enabled.

To allow backward compatibility, ``get_vnc_console`` should raise ``ConsoleNotFoundForInstance`` in the following cases:

  * Ironic is running a version prior to the introduction of the graphical console calls

  * ``get-graphical-console`` raised an exception because the console was not running

  * ``set-graphical-console-state`` raised an exception because the node is using a driver that does not support the graphical console

Gerrit topic: https://review.openstack.org/#q,topic:ironic-vnc-console,n,z

Addressed by: https://review.openstack.org/398270
    DNM PoC Enable VNC console access to Ironic nodes

[20230116 bauzas] Spec approved for 2023.1 cycle https://review.opendev.org/c/openstack/nova-specs/+/863773/

(?)

Work Items

Work items:
Implement get_vnc_console (incl. integration tests): TODO
Allow autostart if console is down: TODO

This blueprint contains Public information 
Everyone can see this information.