[RFE] Allow non-bootable iso connection/disconnection for provisioned nodes

Bug #2033288 reported by Riccardo Pittau
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ironic
Fix Released
Wishlist
Riccardo Pittau

Bug Description

Ironic currently allows attaching iso images as virtual media devices but this is limited to bootable isos used during inspection and deployment.
This proposal aims to expand that feature to attach/detach generic iso images after a node has been provisioned, for example to be accessible from the installed operating system or even for troubleshooting purposes.
Since the functionalities are mostly present in ironic, the code changes will probably be minimal, and then we just need to expose them with a new api.

The parameters accepted by the new API will be the url of the location of the iso, username and password to access the remote location, insecure/secure transaction, and device type.
The only mandatory parameter is the url of the location of the iso.
Ironic will try to insert the iso as virtual media device:
if there is no virtual media slot left it will simply fail,
otherwise the iso will be inserted and made available to be mounted by the operating system.
In case of detachment, the request to the api will eject all the virtual media devices still considered as inserted, and of a single type if specified.

The new API will look like:

[POST] /v1/nodes/{node-uuid}/vmedia

the POST method will accept a json load that looks like:

{
    "url": "remote iso url",
    "username": "username to access the remote url",
    "password": "password to access the remote url",
    "insecure": "true/false”,
    “device_type”: “CD”
}

[DELETE] /v1/nodes/{node-uuid}/vmedia?device_type={CD,DVD}

The DELETE method will eject all the attached vmedia devices, or just all the vmedia devices of type “device_type” if specified, if any are present

The current functionalities for attaching/detaching virtual media devices for inspection and deployment will be left untouched.

No changes to the sushy library are to be expected as we’ll reuse the same functions already available to insert and eject virtual media devices.

Conceptually and logically this is very similar to what ironic already does for the configdrive handling.

A use case scenario can be represented by the need to attach an iso that contains configuration data or binaries after the server has been provisioned to configure elements or run scripts post installation of the operating system.

Tags: rfe-approved
Revision history for this message
Jay Faulkner (jason-oldos) wrote :

Discussed in 8/28/2023 meeting; consensus was it made sense. Please ensure there's a use case documented for this.

tags: added: rfe-approved
Changed in ironic:
importance: Undecided → Wishlist
status: New → Triaged
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ironic (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/ironic/+/894918

Changed in ironic:
status: Triaged → In Progress
Changed in ironic:
assignee: nobody → Riccardo Pittau (rpittau)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ironic (master)

Reviewed: https://review.opendev.org/c/openstack/ironic/+/894918
Committed: https://opendev.org/openstack/ironic/commit/090291221796c5631f367de093056cd2acc7841d
Submitter: "Zuul (22348)"
Branch: master

commit 090291221796c5631f367de093056cd2acc7841d
Author: Dmitry Tantsur <email address hidden>
Date: Wed Sep 13 14:21:44 2023 +0200

    Generic API for attaching/detaching virtual media

    This patch allows to attach or detach a generic image as
    virtual media device after a node has been provisioned.

    Closes-Bug: #2033288
    Change-Id: I97b68047d769f6fb686c53e89084b5874e02b8c7

Changed in ironic:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/ironic 24.0.0

This issue was fixed in the openstack/ironic 24.0.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.