Bug 1338502

Summary: Update watchdog device without specify model via REST, raise NullPointerException
Product: [oVirt] ovirt-engine Reporter: Artyom <alukiano>
Component: RestAPIAssignee: Juan Hernández <juan.hernandez>
Status: CLOSED CURRENTRELEASE QA Contact: Shira Maximov <mshira>
Severity: low Docs Contact:
Priority: low    
Version: 4.0.0CC: alukiano, bugs, dfediuck, juan.hernandez, mavital, mperina
Target Milestone: ovirt-4.0.0-rcFlags: rule-engine: ovirt-4.0.0+
rule-engine: planning_ack+
juan.hernandez: devel_ack+
rule-engine: testing_ack+
Target Release: 4.0.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-05 07:39:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
server log none

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.