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:]
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/
The commit id for the patch above: daf3eb6b4fd52bcb851399f0f082f2099605c352
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 )