Bug 1737234
Summary: | Attach a non-existent ISO to vm by the API return 201 and marks the Attach CD checkbox as ON | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Virtualization Manager | Reporter: | Beni Pelled <bpelled> | ||||
Component: | ovirt-engine | Assignee: | Liran Rotenberg <lrotenbe> | ||||
Status: | CLOSED ERRATA | QA Contact: | Beni Pelled <bpelled> | ||||
Severity: | unspecified | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | 4.3.5 | CC: | ahadas, dfediuck, lrotenbe, michal.skrivanek, mtessun, rdlugyhe | ||||
Target Milestone: | ovirt-4.4.1 | ||||||
Target Release: | --- | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: |
Previously, if you sent the RHV Manager an API command to attach a non-existing ISO to a VM, it attached an empty CD or left an existing one intact. The current release fixes this issue. Now, the Manager checks if the specified ISO exists, and throws an error if it doesn't.
|
Story Points: | --- | ||||
Clone Of: | Environment: | ||||||
Last Closed: | 2020-08-04 13:20:00 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: | |||||||
Attachments: |
|
You could remove an iso any time later too and it would behave the same. There's not much point in checking it.. WARN: Bug status (ON_QA) wasn't changed but the folowing should be fixed: [Found non-acked flags: '{}', ] For more info please contact: rhv-devops: Bug status (ON_QA) wasn't changed but the folowing should be fixed: [Found non-acked flags: '{}', ] For more info please contact: rhv-devops WARN: Bug status (ON_QA) wasn't changed but the folowing should be fixed: [Found non-acked flags: '{}', ] For more info please contact: rhv-devops: Bug status (ON_QA) wasn't changed but the folowing should be fixed: [Found non-acked flags: '{}', ] For more info please contact: rhv-devops WARN: Bug status (ON_QA) wasn't changed but the folowing should be fixed: [Found non-acked flags: '{}', ] For more info please contact: rhv-devops: Bug status (ON_QA) wasn't changed but the folowing should be fixed: [Found non-acked flags: '{}', ] For more info please contact: rhv-devops WARN: Bug status (ON_QA) wasn't changed but the folowing should be fixed: [Found non-acked flags: '{}', ] For more info please contact: rhv-devops: Bug status (ON_QA) wasn't changed but the folowing should be fixed: [Found non-acked flags: '{}', ] For more info please contact: rhv-devops Verified on: - ovirt-engine-4.4.0-0.14.master.el7.src.rpm Verification steps: 1. create a VM. 2. Run the following command: curl -k -X POST -H "Accept: application/xml" -H "Content-Type: application/xml" -u <USER:PASS> -d "<cdrom><file id='non-existent.iso'/></cdrom>" https://<ENGINE-FQDN>/ovirt-engine/api/vms/<VM-ID>/cdroms Result: - 'Attach CD' under 'Edit VM > Boot Options' is unchecked and the API return: /vms/<VM-ID>/cdroms <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <fault> <detail>[Invalid ISO image path]</detail> <reason>Operation Failed</reason> </fault> WARN: Bug status (VERIFIED) wasn't changed but the folowing should be fixed: [Found non-acked flags: '{}', ] For more info please contact: rhv-devops: Bug status (VERIFIED) wasn't changed but the folowing should be fixed: [Found non-acked flags: '{}', ] For more info please contact: rhv-devops The documentation text flag should only be set after 'doc text' field is provided. Please provide the documentation text and set the flag to '?' again. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Important: RHV Manager (ovirt-engine) 4.4 security, bug fix, and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2020:3247 |
Created attachment 1600342 [details] attache_a_non-existent_iso_image Description of problem: Attempting to attach a non-existent ISO image to vm by the API returns 201 and marks the Attach CD checkbox as ON (screenshot attached), In case the vm already has a ISO image attached, The ISO will remain unchanged but we'll still get 201. Version-Release number of selected component (if applicable): 4.3.5.4-0.1.el7 How reproducible: 100% Steps to Reproduce: 1. Create a vm. 2. Attach a non-existent ISO image by the API: curl -k -X POST -H "Accept: application/xml" -H "Content-Type: application/xml" -u <USER:PASS> -d "<cdrom><file id='non-existent.iso'/></cdrom>" https://<ENGINE-FQDN>/ovirt-engine/api/vms/<VM-ID>/cdroms 3. Open the Edit VM window on the Admin Portal and see the 'Attach CD' checkbox under 'Boot Options' tab (screenshot attached) Actual results: The API return 201 with the following response and the Attache CD checkbox marks as ON: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <cdrom href="/ovirt-engine/api/vms/<VM-ID>/cdroms/00000000-0000-0000-0000-000000000000" id="00000000-0000-0000-0000-000000000000"> <vm href="/ovirt-engine/api/vms/<VM-ID>" id="<VM-ID>"/> <file id="non-existent.iso"/> </cdrom> Expected results: The API should return some error code and the checkbox shouldn't change. Additional info: