Bug 961046

Summary: RHEVM-ENGINE: AttachNetworkToVdsGroupCommand: Error - JBWEB000065: HTTP Status 500 - java.lang.NullPointerException
Product: Red Hat Enterprise Virtualization Manager Reporter: Barak Dagan <bdagan>
Component: ovirt-engine-restapiAssignee: lpeer <lpeer>
Status: CLOSED CURRENTRELEASE QA Contact: Elena <edolinin>
Severity: high Docs Contact:
Priority: high    
Version: 3.2.0CC: acathrow, bazulay, dyasny, hateya, iheim, lpeer, masayag, mpastern, myakove, oramraz, pstehlik, Rhev-m-bugs, rnori, sgrinber, srevivo, yeylon, ykaul
Target Milestone: ---Keywords: Regression
Target Release: 3.2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: network
Fixed In Version: sf17 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 961352 (view as bug list) Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Network RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 949642    

Description Barak Dagan 2013-05-08 15:40:39 UTC
Description of problem:
Getting this error in many CLI requests, for example:
1)  add network --cluster-identifier 'f55fee84-dd0f-4bc2-b6c8-c0a87f1a8b02'  --usages-usage 'vm' --data_center-id '02258528-324e-4292-8919-b8c15a40b902' --id '63042a67-2b7c-4e7e-b967-65b55b8e4580' --name 'testrest1' --mtu 0 --stp false

2) action vm '123d1a10-7a94-4e99-9217-7fdc09f95c82' import_vm --storagedomain-identifier '8804221a-51fc-455a-ba83-ae58dfba2bcb'  --cluster-name 'RestCluster1'


Version-Release number of selected component (if applicable):
SF15

How reproducible:
100%

Steps to Reproduce:
1. see above
2.
3.
  
Actual results:


Expected results:


Additional info:(rnori)
from stack trace looks like
VdcReturnValueBase.getActionReturnValue is null. Resulting in NPE on API

VdcReturnValueBase.setActionReturnValue is not being called for
AttachNetworkToVdsGroupCommand in the engine code.

Comment 1 Michael Pasternak 2013-05-08 15:51:35 UTC
Barak,

please always attach logs (cli+engine) when reporting such bugs.

Comment 4 Barak 2013-05-09 13:04:30 UTC
The above bug description contains 2 different issues:

1 -  AttachNetworkToVdsGroupCommand -  command does not return a value which 
     causes the exception.

2 -  ImportVmCommand - has NPE when the cli does not specify the target SD.


Hence dividing this bug into 2 separate bugs.
This Bug will remain at network.

Comment 5 Ravi Nori 2013-05-09 15:38:46 UTC
The root cause is invalid network name. When an invalid network name is provided to the add command the server throws an internal error rather than sending a bad request response with the appropriate error message.

add network --cluster-identifier '99408929-82cf-4dc7-a532-9d998063fa95' --usages-usage 'vm' --data_center-id '5849b030-626e-47cb-ad90-3ce782d831b3' --name 'invalidname' --mtu 0 --stp false --id '00000000-0000-0000-0000-000000000009'

Comment 6 Moti Asayag 2013-05-13 11:48:52 UTC
The implemented behaviour is as follow:

If only the network id or only the network name are provided (but not both) and the network doesn't exists - error 404 (object not found) is returned.

If both network's id and name are provided, but there is no match between the name to the id, error 400 (bad request) is returned.

Comment 7 Barak Dagan 2013-05-20 09:48:08 UTC
Verified on SF17

backend version: 3.2
sdk version    : 3.2.0.11
cli version    : 3.2.0.9
python version : 2.6.6.final.0

[RHEVM shell (connected)]# add network --data_center-id '4ff89715-2ced-4982-814a-39704e79063c' --name 'test22'

id            : 878cb294-efca-4ec4-b872-58eeb2b8685c
name          : test22
data_center-id: 4ff89715-2ced-4982-814a-39704e79063c
mtu           : 0
stp           : False
usages-usage  : vm



[RHEVM shell (connected)]# add network --cluster-identifier 'f55fee84-dd0f-4bc2-b6c8-c0a87f1a8b02' --name 'test22' --foo-bar


error: "foo" is invalid argument segment.

Comment 8 Itamar Heim 2013-06-11 09:01:08 UTC
3.2 has been released

Comment 9 Itamar Heim 2013-06-11 09:01:09 UTC
3.2 has been released

Comment 10 Itamar Heim 2013-06-11 09:01:10 UTC
3.2 has been released

Comment 11 Itamar Heim 2013-06-11 09:02:25 UTC
3.2 has been released

Comment 12 Itamar Heim 2013-06-11 09:31:43 UTC
3.2 has been released