Bug 808640

Summary: Unable to update template disk due to <detail>[Cannot edit Virtual Machine Disk. VM is not found.]</detail>
Product: [Retired] oVirt Reporter: Andrey Falko <afalko>
Component: ovirt-engine-coreAssignee: lpeer <lpeer>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: acathrow, dyasny, iheim, michal.skrivanek, ykaul
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: virt
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-12-12 10:43:21 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Andrey Falko 2012-03-31 00:38:22 UTC
Description of problem:
I am attempting to update a template's disk from ide to virtio via the API:

curl -v -u <user/pw> -H "Content-type: application/xml" -T /tmp/upload.xml 'https://host:8443/api/vms/cdc12a3f-5f8f-4f60-ab35-104105f577c0/disks/75ab1a7f-3920-40a7-9647-99ca7ea67ab7'

I get the following:

<fault>
    <reason>Operation Failed</reason>
    <detail>[Cannot edit Virtual Machine Disk. VM is not found.]</detail>
</fault>

Version-Release number of selected component (if applicable):
# rpm -qa | grep ovirt
ovirt-engine-restapi-3.1.0_0001-1.8.el6.x86_64
ovirt-engine-backend-3.1.0_0001-1.8.el6.x86_64
ovirt-engine-genericapi-3.1.0_0001-1.8.el6.x86_64
ovirt-engine-3.1.0_0001-1.8.el6.x86_64
ovirt-engine-jboss-deps-3.1.0_0001-1.8.el6.x86_64
ovirt-engine-userportal-3.1.0_0001-1.8.el6.x86_64
ovirt-engine-iso-uploader-3.1.0_0001-1.8.el6.x86_64
ovirt-engine-image-uploader-3.1.0_0001-1.8.el6.x86_64
ovirt-engine-log-collector-3.1.0_0001-1.8.el6.x86_64
ovirt-engine-dbscripts-3.1.0_0001-1.8.el6.x86_64
ovirt-engine-notification-service-3.1.0_0001-1.8.el6.x86_64
ovirt-engine-tools-common-3.1.0_0001-1.8.el6.x86_64
ovirt-engine-jbossas-1.2-2.fc16.x86_64
ovirt-engine-sdk-1.6.4-1.el6.noarch
ovirt-engine-setup-3.1.0_0001-1.8.el6.x86_64
ovirt-engine-webadmin-portal-3.1.0_0001-1.8.el6.x86_64
ovirt-engine-config-3.1.0_0001-1.8.el6.x86_64

How reproducible:
Set reproduce steps

Steps to Reproduce:
1. Import a template using virt-v2v
2. Create the following upload xml:
<disk><interface>virtio</interface></disk>
3. Through browser, successfully find the target disk for the template:
/api/vms/cdc12a3f-5f8f-4f60-ab35-104105f577c0/disks/75ab1a7f-3920-40a7-9647-99ca7ea67ab7

I pulled this URL from this page:
/api/templates/cdc12a3f-5f8f-4f60-ab35-104105f577c0/disks
from this line:
<disk href="/api/vms/cdc12a3f-5f8f-4f60-ab35-104105f577c0/disks/75ab1a7f-3920-40a7-9647-99ca7ea67ab7" id="75ab1a7f-3920-40a7-9647-99ca7ea67ab7">  

Actual results:
The error above

Expected results:
The disk is updated

Additional info:

Comment 1 Andrey Falko 2012-03-31 00:43:23 UTC
If I change the url to have templates instead of VMs, I get this:

<html><head><title>JBoss Web/7.0.3.Final - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 405 - </h1><HR size="1" noshade="noshade"><p><b>type</b> Status report</p><p><b>message</b> <u></u></p><p><b>description</b> <u>The specified HTTP method is not allowed for the requested resource ().</u></p><HR size="1" noshade="noshade"><h3>JBoss Web/7.0.3.Final</h3></body></html>

Comment 2 Itamar Heim 2012-12-12 10:43:21 UTC
Closing old bugs. If this issue is still relevant/important in current version, please re-open the bug.