Bug 854479 - [RESTAPI] Error when attaching a disk to a VM
Summary: [RESTAPI] Error when attaching a disk to a VM
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-restapi
Version: 3.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 3.1.0
Assignee: Ori Liel
QA Contact: Jakub Libosvar
URL:
Whiteboard: storage
: 862027 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-09-05 06:56 UTC by Michael Pasternak
Modified: 2016-02-10 20:37 UTC (History)
12 users (show)

Fixed In Version: SI24
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-12-04 19:59:21 UTC
oVirt Team: Storage
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
engine log (3.17 KB, text/x-log)
2012-10-24 12:56 UTC, Jakub Libosvar
no flags Details
server and engine logs (1.67 KB, application/x-gzip)
2012-10-24 12:58 UTC, Jakub Libosvar
no flags Details

Description Michael Pasternak 2012-09-05 06:56:00 UTC
On 09/04/2012 06:15 PM, Simon Grinberg wrote:
> 9. CLI: When attaching a disk to a VM with:
>    create disk --id bc2454d0-2539-41c3-85c2-91cfbdfbede3 --vm-identifier BaseRHEL6 --active True 
>   
> I got:
> unknown error: 'str' object has no attribute 'parentclass'
> 
> The attachment did succeed though.

Comment 1 Michael Pasternak 2012-09-06 08:46:14 UTC
Attach does not have disk body in response

Comment 7 Ondra Machacek 2012-10-02 09:09:22 UTC
*** Bug 862027 has been marked as a duplicate of this bug. ***

Comment 9 Ori Liel 2012-10-15 14:27:14 UTC
patch posted upstream: 
   http://gerrit.ovirt.org/#/c/8335/

patch merged upstream: 
   603e4a6e068f8ae16a20b417b46cdf642dd32aa0

patch posted downstream: 
   https://gerrit.eng.lab.tlv.redhat.com/#/c/2643/

patch merged downstream: 
   1b887fa820e492ea3ca542a5b77866165d900c0e

Comment 10 Jakub Libosvar 2012-10-24 12:56:15 UTC
With PUT request:
url:/api/vms/546e4429-4dde-4d50-8246-809efbb7c88b/disks
body:<disk href="/api/disks/3a8971a2-9905-485a-ab5a-3983d61f45e9" id="3a8971a2-9905-485a-ab5a-3983d61f45e9">
    <name>floating</name>
    <link href="/api/disks/3a8971a2-9905-485a-ab5a-3983d61f45e9/statistics" rel="statistics"/>
    <alias>floating</alias>
    <image_id>e55a411b-7574-4ccd-98a9-ed3594258130</image_id>
    <storage_domains>
        <storage_domain id="fc59298b-c119-4191-b79a-9936abd0a123"/>
    </storage_domains>
    <size>1073741824</size>
    <provisioned_size>1073741824</provisioned_size>
    <actual_size>1073741824</actual_size>
    <status>
        <state>ok</state>
    </status>
    <interface>virtio</interface>
    <format>cow</format>
    <sparse>true</sparse>
    <bootable>false</bootable>
    <shareable>false</shareable>
    <wipe_after_delete>false</wipe_after_delete>
    <propagate_errors>false</propagate_errors>
    <active>true</active>
    <quota id="00000000-0000-0000-0000-000000000000"/>
</disk>


We get code 500 response:

<html><head><title>JBoss Web/7.0.16..Final-redhat-1 - 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 500 - Could not find MessageBodyWriter for response object of type: org.ovirt.engine.core.common.businessentities.DiskImage of media type: application/xml</h1><HR size="1" noshade="noshade"><p><b>type</b> Status report</p><p><b>message</b> <u>Could not find MessageBodyWriter for response object of type: org.ovirt.engine.core.common.businessentities.DiskImage of media type: application/xml</u></p><p><b>description</b> <u>The server encountered an internal error (Could not find MessageBodyWriter for response object of type: org.ovirt.engine.core.common.businessentities.DiskImage of media type: application/xml) that prevented it from fulfilling this request.</u></p><HR size="1" noshade="noshade"><h3>JBoss Web/7.0.16..Final-redhat-1</h3></body></html>

Comment 11 Jakub Libosvar 2012-10-24 12:56:35 UTC
Created attachment 632764 [details]
engine log

Comment 12 Jakub Libosvar 2012-10-24 12:58:03 UTC
Created attachment 632766 [details]
server and engine logs

In server log:

2012-10-24 14:54:25,130 WARN  [org.jboss.resteasy.core.SynchronousDispatcher] (ajp-/127.0.0.1:8702-3) Failed executing POST /vms/546e4429-4dde-4d50-8246-809efbb7c88b/disks: org.jboss.resteasy.core.NoMessageBodyWriterFoundFailure: Could not find MessageBodyWriter for response object of type: org.ovirt.engine.core.common.businessentities.DiskImage of media type: application/xml
    at org.jboss.resteasy.core.ServerResponse.writeTo(ServerResponse.java:216) [resteasy-jaxrs.jar:2.3.3.Final-redhat-1]
    at org.jboss.resteasy.core.SynchronousDispatcher.writeJaxrsResponse(SynchronousDispatcher.java:585) [resteasy-jaxrs.jar:2.3.3.Final-redhat-1]
    at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:506) [resteasy-jaxrs.jar:2.3.3.Final-redhat-1]

Comment 13 Jakub Libosvar 2012-11-06 11:12:10 UTC
Verified rhevm-3.1.0-26.el6ev.noarch


Note You need to log in before you can comment on or make changes to this bug.