Bug 1671046

Summary: Mounting ISO from a ISO domain subfolder
Product: [oVirt] ovirt-engine Reporter: Giulio Casella <giulio.casella>
Component: Backend.CoreAssignee: Nobody <nobody>
Status: CLOSED WONTFIX QA Contact: Elad <ebenahar>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.2.8.1CC: bugs, frolland, giulio.casella, matonb, nsoffer
Target Milestone: ---Flags: giulio.casella: needinfo-
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-02-04 09:09:36 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Storage RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Giulio Casella 2019-01-30 16:05:21 UTC
Description of problem: Cannot mount iso image in a VM if the iso is in subfolder of ISO domain


Version-Release number of selected component (if applicable): ovirt/rhv 4.2.8 (and also in 4.2.7)


How reproducible: always


Steps to Reproduce:
1. mkdir /path/to/ISO/domain/foo
2. copy bar.iso to /path/to/ISO/domain/foo/bar.iso
3. chown -R 36:36 /path/to/ISO/domain/foo
4. in admin portal, select a VM, "change CD", choose foo/bar.iso, click "OK"

Actual results:

"Error while executing action Change CD: Drive image file could not be found"


Expected results:

ISO image mounted in VM CDROM


Additional info:

Comment 1 Brett Maton 2019-02-01 09:12:49 UTC
Probably not a bug but it would be a nice feature.

Comment 2 Nir Soffer 2019-02-01 22:02:13 UTC
(In reply to Giulio Casella from comment #0)
...
> Steps to Reproduce:
> 1. mkdir /path/to/ISO/domain/foo

What is /path/to/ISO/domain?

ISO files should be located under:

    /rhev/data-center/mnt/server:_path/sd-id/images/11111111-1111-1111-1111-111111111111/

> 2. copy bar.iso to /path/to/ISO/domain/foo/bar.iso
> 3. chown -R 36:36 /path/to/ISO/domain/foo
> 4. in admin portal, select a VM, "change CD", choose foo/bar.iso, click "OK"
> 
> Actual results:
> "Error while executing action Change CD: Drive image file could not be found"
> 
> Expected results:

The code listing iso files supports sub directories or any depth, so you should
be able to have structure like:

    /rhev/data-center/mnt/server:_path/sd-id/images/11111111-1111-1111-1111-111111111111/
        subdir/
            file.iso
            subsubdir/
                file.iso

I don't know if the code for attaching vms supports pass the iso filename correctly,
if not and the fix is trivial we can fix this.

If the code does not support this yet, we will not add this feature since iso domains
are deprecated and will be removed in future version.

The modern way to manage iso file is uploading them to data domain of any type
(e.g. NFS, iSCSI, FC). This supports flat list of iso images, no sub directories.

You can get similar results by naming the iso images:

    subdir/filename.iso
    subdir/subsubdir/filename.iso

> Probably not a bug but it would be a nice feature.

Can you explain the use case? Is this use case common and can help many users?
Do we have a different way to get the same result?

Comment 3 Nir Soffer 2019-02-01 22:08:16 UTC
Giulio, please provide engine and vdsm log showing how starting a vm
with a iso file in a subdirectory fails.

Comment 4 Fred Rolland 2019-02-04 09:09:36 UTC
Since ISO domain is going to be deprecated and it was not supported till now we won't fix it.
As a workaround, put the files on the root directory