Bug 1250046 - internal error when deleting watchdog device from REST api
internal error when deleting watchdog device from REST api
Status: CLOSED CURRENTRELEASE
Product: oVirt
Classification: Community
Component: ovirt-engine-api (Show other bugs)
3.6
Unspecified Unspecified
medium Severity medium
: ---
: 3.6.0
Assigned To: Juan Hernández
Shira Maximov
infra
: Automation
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-04 08:16 EDT by Shira Maximov
Modified: 2016-02-10 14:35 EST (History)
8 users (show)

See Also:
Fixed In Version: 3.6.0-10
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-11-04 06:16:52 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Infra
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 44910 master MERGED restapi: Add @Provides to watchdogs resource Never
oVirt gerrit 45065 ovirt-engine-3.6 MERGED restapi: Add @Provides to watchdogs resource Never

  None (edit)
Description Shira Maximov 2015-08-04 08:16:20 EDT
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 02:56:58 EDT
please attach engine log
Comment 3 Omer Frenkel 2015-08-05 06:41:29 EDT
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 06:40:04 EDT
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 03:12:12 EDT
verified on 3.6.0-10
Comment 6 Sandro Bonazzola 2015-11-04 06:16:52 EST
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.