Bug 1154391

Summary: oVirt Change CD incorrectly rejecting isos with uppercase extensions (ISO vs iso)
Product: [oVirt] ovirt-engine Reporter: Tyler Pitchford <tyler.pitchford>
Component: GeneralAssignee: Shmuel Melamud <smelamud>
Status: CLOSED CURRENTRELEASE QA Contact: Ilanit Stein <istein>
Severity: medium Docs Contact:
Priority: medium    
Version: ---CC: agkesos, bcholler, bugs, gklein, iheim, istein, jbelka, lsurette, mavital, michal.skrivanek, mikedep333, rbalakri, rob, s.kieske, srevivo, stefano.stagnaro, ykaul
Target Milestone: ovirt-3.6.5Flags: rule-engine: ovirt-3.6.z+
istein: testing_plan_complete+
ylavi: planning_ack+
rule-engine: devel_ack+
mavital: testing_ack+
Target Release: 3.6.5.1   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: 3.6.5-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1294855 (view as bug list) Environment:
Last Closed: 2016-04-21 14:36:18 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Virt RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1294855, 1301866    
Attachments:
Description Flags
images list
none
run once dialog none

Description Tyler Pitchford 2014-10-19 12:19:39 UTC
Description of problem:

When you add a new iso to oVirt, the file will get added correctly, but if you need to use the VirtIO iso or another iso image during installation oVirt will reject any attempted to switch to an iso image with an uppercase extension. 

Version-Release number of selected component (if applicable): 3.5

How reproducible:

Every time

Steps to Reproduce:
1. During an installation try to switch to an iso with with a .ISO extension

Actual results:

oVirt will return an ACTION_TYPE_FAILED_INVALID_CDROM_DISK_FORMAT error and refuse to mount the iso. If you reload the .ISO file as .iso it works correctly.

Expected results:

oVirt should mount the iso regardless of case.

Additional info:

/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ChangeDiskCommand.java, line 56: if (StringUtils.isNotEmpty(cdImagePath) && !cdImagePath.endsWith(ValidationUtils.ISO_SUFFIX)) {

should be: if (StringUtils.isNotEmpty(cdImagePath) && !cdImagePath.toLowerCase().endsWith(ValidationUtils.ISO_SUFFIX)) {

Comment 1 Sven Kieske 2014-11-11 14:55:51 UTC
General remark:

you should not go the windows way and reject/accept files based on their
file extension but the file header should get parsed correctly.

Comment 2 ihasn2004 2014-12-12 14:05:54 UTC
Same issue as original poster.  Re-uploaded Windows.ISO as Windows.iso and was able to attach it properly.

Comment 4 Jiri Belka 2015-11-26 14:35:34 UTC
fail with rhevm-3.6.1-0.2.el6.noarch as this is partly solved - you _can_ see for example IPXE.ISO on Images list of ISO domain but you do not see IPXE.ISO in Change CD dialog, iso list in Run Once dialog or in Boot Options submenu of Edit VM dialog (refresh button clicked couple of times).

See screenshots.

Comment 5 Jiri Belka 2015-11-26 14:36:04 UTC
Created attachment 1099301 [details]
images list

Comment 6 Jiri Belka 2015-11-26 14:36:29 UTC
Created attachment 1099303 [details]
run once dialog

Comment 7 Red Hat Bugzilla Rules Engine 2015-11-27 05:55:38 UTC
Target release should be placed once a package build is known to fix a issue. Since this bug is not modified, the target version has been reset. Please use target milestone to plan a fix for a oVirt release.

Comment 10 Michal Skrivanek 2015-12-02 14:31:38 UTC
inconsistency should be fixed

Comment 11 Shmuel Melamud 2016-02-03 17:26:52 UTC
Important note regarding reproduction and verification of the bug:

To reproduce the bug, after adding and activating an ISO domain, go to Storage tab, select the ISO domain and open Images subtab. This action refreshes metadata cache, filling it with incorrect information which causes the bug.

To verify the fix, repeat the same with freshly created ISO domain.

If you need to fix the metadata for an ISO domain that was already used, apply the fix, run the Engine and repeat this action (Storage -> domain name -> Images) on the ISO domain twice. Only after the second access the metadata cache will be filled with the correct information.

Comment 12 Michal Skrivanek 2016-02-10 08:21:47 UTC
*** Bug 1294855 has been marked as a duplicate of this bug. ***

Comment 13 Eyal Edri 2016-03-31 08:35:22 UTC
Bugs moved pre-mature to ON_QA since they didn't have target release.
Notice that only bugs with a set target release will move to ON_QA.

Comment 14 Ilanit Stein 2016-04-07 13:23:45 UTC
Verified on rhevm 3.6.5-2.

images with .ISO extensions are seen on the list of change CD,
and picking it from this list, end up successfully:
Event:
"CD IPXE.ISO was inserted to VM test by admin@internal"