Allow MBSs to upload disks - #1125
Conversation
226d865 to
92b87ab
Compare
92b87ab to
2ceb01e
Compare
2ceb01e to
6e4757c
Compare
|
I've tested this PR on the LINSTOR/DRBD side. The engine side of the upload -> MBS feature has no LINSTOR-specific issues. Looks great from over here 👍 |
There was a problem hiding this comment.
Firstly, about commit messages:
- "cleanup" is a bit minimal
- "Allow MSBs to upload disk", MSB = MBS ?
- 23b58f6 msg isn't really clear, maybe change it to something like:
Add support for converting QCOW2 images to RAW format when uploading
disks via the Web UI to Managed Block Storage (MBS).Previously, the Web UI lacked an option to convert these images, which
caused issues since most MBS domains require volumes in RAW format.
Now, if a user uploads a QCOW2 disk to MBS, the system automatically
usesqemu-img convertto handle the conversion. Both the source and
converted volumes are created directly on the MBS.
Code wise:
The repointing thing feels a bit iffy. I had a go at trying to do it differently. Would this work? refactor-mbs-upload-conversion.patch
Also, I think I have the same comments here as that I had on #1138 (i.e. the MBS logic is woven through everything, we should create subclasses etc.)
| private ImageDao imageDao; | ||
|
|
||
| @Inject | ||
| private StorageDomainDao storageDomainDao; |
| Guid childCmdId; | ||
| } | ||
| } | ||
| // DE72501108006231412815 |
Add the initial engine and webadmin support for uploading disks to Managed Block Storage (MBS) domains via the existing NBD image-transfer path. Extend TransferDiskImageCommand to connect and attach MBS volumes on the transfer host, validate MBS domains for TransferDiskImage, and tear down volumes when the session ends. Update AddDiskCommand and AddManagedBlockStorageDiskCommand for the MBS upload flow, and allow MBS domains in the upload UI (UploadImageModel, AbstractDiskModel). Depends on vdsm support for MBS upload-image. Signed-off-by: Slavka Peleva <slavkap@storpool.com>
Add support for converting QCOW2 images to RAW format when uploading disks via the Web UI to Managed Block Storage (MBS). Previously, the Web UI lacked an option to convert these images, which caused issues since most MBS domains require volumes in RAW format. Now, if a user uploads a QCOW2 disk to MBS, the system automatically uses qemu-img convert to handle the conversion. Both the source and converted volumes are created directly on the MBS. Signed-off-by: Slavka Peleva <slavkap@storpool.com>
Replace leftover cinderlib types with the managedblock executor and DAO in TransferDiskImageCommand's upload conversion path. Map the CONVERTING ImageTransferPhase in ImageTransferMapper so REST API clients see a valid phase while conversion is in progress. Signed-off-by: Slavka Peleva <slavkap@storpool.com>
Introduce MbsTransferDiskImageCommand and ActionType.MbsTransferDiskImage, and move MBS-specific upload/transfer logic out of TransferDiskImageCommand. Finish MBS upload conversion with a stable disk_id: update the images row in place instead of repointing base_disks and related references. Dispatch MbsTransferDiskImage from the web UI, REST API, and download flow for managed block storage domains. Signed-off-by: Slavka Peleva <slavkap@storpool.com>
|
Thanks for the review, @peter-boden — I think that I've managed to address all points: Applied your conversion-finish patch: stable disk_id, swap the images row only (no repointing). |
Both PRs branched off master independently and each claimed the then-next-free ActionType id 1054: MbsTransferDiskImage from oVirt#1125 (upload-msb-disk) and MbsExtractOva from oVirt#1138 (import-ova-mbs). They add their entries in different parts of the enum, so git merges them without a textual conflict and only ActionTypeTest notices. This is not merely a failing test: ActionType.forValue(1054) returns whichever entry comes first, so a command rebuilt from command_entities.command_type could dispatch to the wrong one. Move oVirt#1125's single entry to 1058 rather than oVirt#1138's contiguous 1054-1057 block, as the smaller change. Nothing references the numeric value (lookups go through the enum name) and no dbscript mentions it. Upstream still needs one of the two PRs renumbered; until that happens this is carried as olvm/patches/ovirt-engine/ so each re-roll re-applies it. Generated-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Both PRs branched off master independently and each claimed the then-next-free ActionType id 1054: MbsTransferDiskImage from oVirt#1125 (upload-msb-disk) and MbsExtractOva from oVirt#1138 (import-ova-mbs). They add their entries in different parts of the enum, so git merges them without a textual conflict and only ActionTypeTest notices. This is not merely a failing test: ActionType.forValue(1054) returns whichever entry comes first, so a command rebuilt from command_entities.command_type could dispatch to the wrong one. Move oVirt#1125's single entry to 1058 rather than oVirt#1138's contiguous 1054-1057 block, as the smaller change. Nothing references the numeric value (lookups go through the enum name) and no dbscript mentions it. Upstream still needs one of the two PRs renumbered; until that happens this is carried as olvm/patches/ovirt-engine/ so each re-roll re-applies it. Generated-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Changes introduced with this PR
Enables uploading disks to Managed Block Storage domains. This change adds the full upload flow for Managed Block Storage using the existing NBD-based transfer path, including connect/attach on the host and cleanup on finish.
It was tested with StorPool and Ceph as managed block storage domains
The changes in this PR highly depend on vdsm PR and fixes Support upload-image to MBS domain #313
Are you the owner of the code you are sending in, or do you have permission of the owner?
[y]