Bug 1338502 - Update watchdog device without specify model via REST, raise NullPointerException
Summary: Update watchdog device without specify model via REST, raise NullPointerExcep...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: RestAPI
Version: 4.0.0
Hardware: x86_64
OS: Linux
low
low
Target Milestone: ovirt-4.0.0-rc
: 4.0.0
Assignee: Juan Hernández
QA Contact: Shira Maximov
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-05-22 07:13 UTC by Artyom
Modified: 2016-07-05 07:39 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-05 07:39:53 UTC
oVirt Team: Infra
Embargoed:
rule-engine: ovirt-4.0.0+
rule-engine: planning_ack+
juan.hernandez: devel_ack+
rule-engine: testing_ack+


Attachments (Terms of Use)
server log (737.59 KB, text/plain)
2016-05-22 07:13 UTC, Artyom
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 58249 0 master MERGED restapi: Check watchdog model and action before mapping 2016-05-31 18:51:06 UTC
oVirt gerrit 58403 0 ovirt-engine-4.0 MERGED restapi: Check watchdog model and action before mapping 2016-05-31 20:37:22 UTC

Description Artyom 2016-05-22 07:13:20 UTC
Created attachment 1160271 [details]
server log

Description of problem:
Update watchdog device without specify model via REST, raise NullPointerException under server log

Version-Release number of selected component (if applicable):
ovirt-engine-4.0.0-0.0.master.20160516171427.git0860aa2.el7.centos.noarch

How reproducible:
Always

Steps to Reproduce:
1. Run PUT request on watchdog device
<watchdog>
  <action>reset</action>
</watchdog>
2.
3.

Actual results:
<html><head><title>Error</title></head><body>Internal Server Error</body></html>

Expected results:
Request succeed and watchdog device has updated action

Additional info:
I also do not agree with behaviour under 3.6
on PUT request
<watchdog>
  <action>reset</action>
</watchdog>

I receive
<fault>
<reason>Invalid value</reason>
<detail>null is not a member of WatchdogModel. Possible values for WatchdogModel are: i6300esb</detail>
</fault>
I do not really see a reason to specify model if I want only to update watchdog action

Comment 1 Yaniv Kaul 2016-05-23 06:48:33 UTC
1. Update with what data?
2. Does it work well when specifying the model?
3. With which API version?

Comment 2 Doron Fediuck 2016-05-23 07:13:10 UTC
Similar to bug 1338503 this is a low prio issue.
Are you sure it's a regression?

Comment 3 Artyom 2016-05-23 08:22:34 UTC
To Yaniv:
1) Please check the reproduce steps you can see exact data that I send to REST
2) Yes
3) Both API versions

To Doron:
Yes, see 3.6 behaviour under additional info

Comment 4 Doron Fediuck 2016-05-30 08:04:05 UTC
Is it reproducible on latest 3.6.z?

Comment 5 Red Hat Bugzilla Rules Engine 2016-05-30 08:05:16 UTC
This bug report has Keywords: Regression or TestBlocker.
Since no regressions or test blockers are allowed between releases, it is also being identified as a blocker for this release. Please resolve ASAP.

Comment 6 Juan Hernández 2016-05-30 09:21:41 UTC
This regression is a side effect of the introduction of type safe enums, so I'm moving to the infra team.

Comment 7 Artyom 2016-05-30 11:55:03 UTC
Bug relevant only for ovirt 4.0, under rhevm-3.6.7-0.1.el6.noarch if I try to update only with the watchdog action I recieve:
<fault>
<reason>Invalid value</reason>
<detail>null is not a member of WatchdogModel. Possible values for WatchdogModel are: i6300esb</detail>
</fault>

Comment 8 Juan Hernández 2016-06-07 21:48:13 UTC
As this only affects version 4 of the API I'm removing the regression keyword and the blocker flag.

Comment 9 Martin Perina 2016-06-13 14:06:16 UTC
Merged long time ago and definitely part of 4.0.0.4 build

Comment 10 Shira Maximov 2016-06-13 14:42:29 UTC
verified on :
oVirt Engine Version: 4.1.0-0.0.master.20160609051254.gita18ebb1.el7.centos

verification steps: 
1. Run PUT request on watchdog device
<watchdog>
  <action>reset</action>
</watchdog>

Comment 11 Sandro Bonazzola 2016-07-05 07:39:53 UTC
oVirt 4.0.0 has been released, closing current release.


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