Bug 828351 - Backend: Unable to add bond through SetupNetworks via REST API. NullPointerException
Backend: Unable to add bond through SetupNetworks via REST API. NullPointerEx...
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine (Show other bugs)
x86_64 Linux
high Severity urgent
: ---
: ---
Assigned To: Moti Asayag
Yaniv Kaul
: TestBlocker
Depends On:
  Show dependency treegraph
Reported: 2012-06-04 12:44 EDT by Avi Tal
Modified: 2016-04-22 00:59 EDT (History)
9 users (show)

See Also:
Fixed In Version: si9
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: Network
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
engine logs (151.64 KB, application/x-compressed-tar)
2012-06-04 12:44 EDT, Avi Tal
no flags Details

  None (edit)
Description Avi Tal 2012-06-04 12:44:28 EDT
Created attachment 589208 [details]
engine logs

Unable to add bond through SetupNetworks via REST API. 
Command SetupNetworksVDS execution failed. Exception: NullPointerException

POST http://<rhevm>/api/hosts/<id>/nics/setupnetworks
     <option name="mode" value="1"/>

            <reason>Operation Failed</reason>

Jboss Server NullPointerException
19:35:44,187 ERROR [org.ovirt.engine.api.restapi.resource.AbstractBackendResource] (ajp-- Operation Failed: []
19:35:44,188 WARN  [org.jboss.resteasy.core.SynchronousDispatcher] (ajp-- failed to execute: org.ovirt.engine.api.restapi.resource.BaseBackendResource$WebFaultException
        at org.ovirt.engine.api.restapi.resource.BaseBackendResource.handleError(BaseBackendResource.java:207) [restapi-jaxrs-3.1.0-0001.jar:]
        at org.ovirt.engine.api.restapi.resource.BackendResource.performAction(BackendResource.java:113) [restapi-jaxrs-3.1.0-0001.jar:]
Comment 3 Moti Asayag 2012-06-20 16:57:11 EDT
The described error isn't reproduced no more, it was fixed by commit d2787650655bbf4366a6eb6856ecdcb2b566a088.

However, same error happens ahead when running same scenario:

2012-06-20 17:49:58,061 INFO  [org.ovirt.engine.core.vdsbroker.vdsbroker.SetupNetworksVDSCommand] (http-- [2b7e51b2] START, SetupNetworksVDSCommand(vdsId = c92a01aa-9484-11e1-87b6-f334ad042300), log id: 7e81ab91
2012-06-20 17:52:22,388 ERROR [org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerCommand] (http-- [2b7e51b2] Failed in SetupNetworksVDS method, for vds: venus-vdsb; host:
2012-06-20 17:52:22,392 ERROR [org.ovirt.engine.core.vdsbroker.VDSCommandBase] (http-- [2b7e51b2] Command SetupNetworksVDS execution failed. Exception: NullPointerException: 
2012-06-20 17:52:22,395 INFO  [org.ovirt.engine.core.vdsbroker.vdsbroker.SetupNetworksVDSCommand] (http-- [2b7e51b2] FINISH, SetupNetworksVDSCommand, log id: 7e81ab91
2012-06-20 17:52:22,396 ERROR [org.ovirt.engine.core.vdsbroker.vdsbroker.BrokerCommandBase] (http-- [2b7e51b2] java.lang.NullPointerException
2012-06-20 17:52:22,399 ERROR [org.ovirt.engine.core.vdsbroker.VDSCommandBase] (http-- [2b7e51b2] Command SetupNetworksVDS execution failed. Exception: RuntimeException: java.lang.NullPointerException
2012-06-20 17:52:22,439 INFO  [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (http-- [2b7e51b2] No string for UNASSIGNED type. Use default Log
2012-06-20 17:52:22,456 ERROR [org.ovirt.engine.api.restapi.resource.AbstractBackendResource] (http-- Operation Failed: []

The cause of the error is not specifying bootprotocol for the bond interface.

A patch to handle it sent to:
Comment 4 Moti Asayag 2012-07-08 02:04:32 EDT
The commit id for the patch above: daf3eb6b4fd52bcb851399f0f082f2099605c352
Comment 5 Avi Tal 2012-07-12 06:59:56 EDT
verify on SI9 - PASS
I have tested the same scenario which caused the BZ and succeeded to create bond.

One small issue which probably worth BZ is that response SetupNetworks response contain code 200 but doesn't contain body with host_nics (after adding bond )

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