Bug 1250046 - internal error when deleting watchdog device from REST api
Summary: internal error when deleting watchdog device from REST api
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: oVirt
Classification: Retired
Component: ovirt-engine-api
Version: 3.6
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 3.6.0
Assignee: Juan Hernández
QA Contact: Shira Maximov
URL:
Whiteboard: infra
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-08-04 12:16 UTC by Shira Maximov
Modified: 2016-02-10 19:35 UTC (History)
8 users (show)

Fixed In Version: 3.6.0-10
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-04 11:16:52 UTC
oVirt Team: Infra
Embargoed:


Attachments (Terms of Use)
rhevm logs (1.06 MB, application/x-bzip)
2015-08-05 08:50 UTC, Shira Maximov
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 44910 0 master MERGED restapi: Add @Provides to watchdogs resource Never
oVirt gerrit 45065 0 ovirt-engine-3.6 MERGED restapi: Add @Provides to watchdogs resource Never

Description Shira Maximov 2015-08-04 12:16:20 UTC
Description of problem:

DELETE request content is --  
url:/api/vms/a4b7e68f-6d91-4bd6-bc12-044a5dae28b5/watchdogs/00000000-0000-0000-0000-000000000000

Failed to delete element NOT as expected:
Status: 500
Reason: Internal Server Error

Version-Release number of selected component (if applicable):
3.6.0-4
vdsm-4.17.0-1201.git7ba0684.el7.noarch

How reproducible:
100%

Steps to Reproduce:
1.DELETE request content is --  
url:/api/vms/a4b7e68f-6d91-4bd6-bc12-044a5dae28b5/watchdogs/00000000-0000-0000-0000-000000000000

2.
3.

Actual results:
Status: 500
Reason: Internal Server Error

Expected results:
the watchdog device should delete

Additional info:

Comment 1 Omer Frenkel 2015-08-05 06:56:58 UTC
please attach engine log

Comment 3 Omer Frenkel 2015-08-05 10:41:29 UTC
can't see anything suspicious in the engine.log, it seems the delete of the watchdog works ok but for some reason the test fails when reading the response

Comment 4 Juan Hernández 2015-08-17 10:40:04 UTC
This happens because the client is sending a request without including the "Accept" content header. In this situation the application server doesn't know how to convert the result to something that the client will understand, resulting in this error message:

  Could not find MessageBodyWriter for response object of type: org.ovirt.engine.api.model.Action of media type: application/octet-stream

The best way to solve this problem is to modify the client so that it explicitly sends the "Accept" header:

  DELETE /vms/{vm:id}/wathdogs/{watchdog:id}
  Accept: application/xml

It is also possible to modify the "BackendWatchdogResource" interface so that it explicitly includes the @Produces annotation with the supported media types. This will make the server consider those media types. For sake of backwards compatibility we will do that.

Comment 5 Shira Maximov 2015-08-24 07:12:12 UTC
verified on 3.6.0-10

Comment 6 Sandro Bonazzola 2015-11-04 11:16:52 UTC
oVirt 3.6.0 has been released on November 4th, 2015 and should fix this issue.
If problems still persist, please open a new BZ and reference this one.


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