This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 828351 - Backend: Unable to add bond through SetupNetworks via REST API. NullPointerException
Backend: Unable to add bond through SetupNetworks via REST API. NullPointerEx...
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine (Show other bugs)
3.1.0
x86_64 Linux
high Severity urgent
: ---
: ---
Assigned To: Moti Asayag
Yaniv Kaul
network
: TestBlocker
Depends On:
Blocks:
  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:
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: ---


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
<action>
 <host_nics>
  <host_nic>
   <name>eth1</name>
   <network>
    <name>sw1</name>
   </network>
   <boot_protocol>none</boot_protocol>
  </host_nic>
  <host_nic>
   <name>bond0</name>
   <network>
    <name>sw2</name>
   </network>
   <bonding>
    <options>
     <option name="mode" value="1"/>
    </options>
    <slaves>
     <host_nic>
      <name>eth2</name>
     </host_nic>
     <host_nic>
      <name>eth3</name>
     </host_nic>
    </slaves>
   </bonding>
  </host_nic>
  <host_nic>
   <name>eth0</name>
   <network>
    <name>rhevm</name>
   </network>
   <boot_protocol>dhcp</boot_protocol>
  </host_nic>
 </host_nics>
 <force>false</force>
 <checkConnectivity>true</checkConnectivity>
 <connectivityTimeout>60</connectivityTimeout>
</action>

RECEIVE 400
<fault>
            <reason>Operation Failed</reason>
            <detail>[]</detail>
    </fault>


Jboss Server NullPointerException
19:35:44,187 ERROR [org.ovirt.engine.api.restapi.resource.AbstractBackendResource] (ajp--0.0.0.0-8009-5) Operation Failed: []
19:35:44,188 WARN  [org.jboss.resteasy.core.SynchronousDispatcher] (ajp--0.0.0.0-8009-5) 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--0.0.0.0-8080-4) [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--0.0.0.0-8080-4) [2b7e51b2] Failed in SetupNetworksVDS method, for vds: venus-vdsb; host: 10.35.1.238
2012-06-20 17:52:22,392 ERROR [org.ovirt.engine.core.vdsbroker.VDSCommandBase] (http--0.0.0.0-8080-4) [2b7e51b2] Command SetupNetworksVDS execution failed. Exception: NullPointerException: 
2012-06-20 17:52:22,395 INFO  [org.ovirt.engine.core.vdsbroker.vdsbroker.SetupNetworksVDSCommand] (http--0.0.0.0-8080-4) [2b7e51b2] FINISH, SetupNetworksVDSCommand, log id: 7e81ab91
2012-06-20 17:52:22,396 ERROR [org.ovirt.engine.core.vdsbroker.vdsbroker.BrokerCommandBase] (http--0.0.0.0-8080-4) [2b7e51b2] java.lang.NullPointerException
2012-06-20 17:52:22,399 ERROR [org.ovirt.engine.core.vdsbroker.VDSCommandBase] (http--0.0.0.0-8080-4) [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--0.0.0.0-8080-4) [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--0.0.0.0-8080-4) Operation Failed: []

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

A patch to handle it sent to:
http://gerrit.ovirt.org/#/c/5568/
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.