Hide Forgot
Description of problem: Via REST V3 when changing vNIC interface type the vNIC network is changed to ovirtmgmt. When doing the same in REST V4 the network doesn't changed to ovirtmgmt. Version-Release number of selected component (if applicable): ovirt-engine-4.1.0-0.0.master.20160526111325.git538ad4f.el7.centos.noarch Steps to Reproduce: 1. Attach vNIC to VM with network 'net-1' and type virtio 2. Unplug the network 3. Via REST (V3) send: PUT to /ovirt-engine/api/vms/<vm_id>/nics/vnic_id <nic> <interface>e1000</interface> </nic> Actual results:
Created attachment 1162599 [details] engine.log
Same for: <nic> <linked>false</linked> </nic> 2016-05-28 22:28:16,054 ERROR [org.ovirt.engine.core.bll.GetVmOvfByVmIdQuery] (default task-16) [] Query 'GetVmOvfByVmIdQuery' failed: null 2016-05-28 22:28:16,054 ERROR [org.ovirt.engine.core.bll.GetVmOvfByVmIdQuery] (default task-16) [] Exception: java.lang.NullPointerException at org.ovirt.engine.core.utils.ovf.OvfWriter.buildDisk(OvfWriter.java:204) [utils.jar:] at org.ovirt.engine.core.utils.ovf.OvfManager.buildOvf(OvfManager.java:118) [utils.jar:] at org.ovirt.engine.core.utils.ovf.OvfManager.exportVm(OvfManager.java:29) [utils.jar:] at org.ovirt.engine.core.bll.storage.ovfstore.OvfHelper.buildMetadataDictionaryForVm(OvfHelper.java:107) [bll.jar:] at org.ovirt.engine.core.bll.storage.ovfstore.OvfHelper.generateOvfConfigurationForVm(OvfHelper.java:87) [bll.jar:] at org.ovirt.engine.core.bll.GetVmOvfByVmIdQuery.generateOvfConfig(GetVmOvfByVmIdQuery.java:37) [bll.jar:] at org.ovirt.engine.core.bll.GetVmOvfByVmIdQuery.executeQueryCommand(GetVmOvfByVmIdQuery.java:23) [bll.jar:] at org.ovirt.engine.core.bll.QueriesCommandBase.executeCommand(QueriesCommandBase.java:101) [bll.jar:] at org.ovirt.engine.core.dal.VdcCommandBase.execute(VdcCommandBase.java:33) [dal.jar:] at org.ovirt.engine.core.bll.Backend.runQueryImpl(Backend.java:559) [bll.jar:] at org.ovirt.engine.core.bll.Backend.runQuery(Backend.java:530) [bll.jar:] at sun.reflect.GeneratedMethodAccessor90.invoke(Unknown Source) [:1.8.0_91] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_91] at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_91]
Same for: <nic> <plugged>false</plugged> </nic> On V3 when setting plugged 'false' the network changed to random one.
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.
From the trace looks like a storage related issue.
Could not reproduce with the steps above, can it be that the VM configuration is faulty to begin with?
Let me make it ever more specific, was the VM given created from a template imported from an export domain? If so it should have been solved by bug 1339686, if not please try to reproduce from today's nightly cause I could not reproduce on master.
I will need to recreate the template right?
Yes, if the template was created before the bug fix it will not work, so please try to recreate it and try again
with ovirt-engine-4.1.0-0.0.master.20160531051228.git1647007.el7.centos.noarch and after recreate the template and create VM from this template I still fail to: <nic> <linked>false</linked> </nic> with PUT into ovirt-engine/api/vms/<vm_id>/nics/<nic_id> 2016-06-01 11:27:01,456 WARN [org.ovirt.engine.core.bll.network.vm.UpdateVmInterfaceCommand] (default task-23) [nics_update_03deaab4-305f-4973] Validation of action 'UpdateVmInterface' fail ed for user admin@internal-authz. Reasons: VAR__TYPE__INTERFACE,VAR__ACTION__UPDATE,ACTIVATE_DEACTIVATE_NETWORK_NOT_IN_VDS 2016-06-01 11:27:01,457 ERROR [org.ovirt.engine.api.restapi.resource.AbstractBackendResource] (default task-23) [] Operation Failed: [The Network does not exist on the host the VM is running on. Either add the Network to the Host or migrate the VM to a Host that has this Network.] 2016-06-01 11:27:41,892 INFO [org.ovirt.engine.core.sso.utils.AuthenticationUtils] (default task-17) [] User admin@internal successfully logged in with scopes: ovirt-app-api ovirt-ext=token -info:authz-search ovirt-ext=token-info:public-authz-search ovirt-ext=token-info:validate 2016-06-01 11:27:42,815 INFO [org.ovirt.engine.core.bll.aaa.CreateUserSessionCommand] (default task-6) [69409ff0] Running command: CreateUserSessionCommand internal: false. 2016-06-01 11:27:42,905 INFO [org.ovirt.engine.core.bll.aaa.LogoutSessionCommand] (default task-6) [451f05c7] Running command: LogoutSessionCommand internal: false. 2016-06-01 11:27:42,913 INFO [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (default task-6) [451f05c7] Correlation ID: 451f05c7, Call Stack: null, Custom Event ID: -1, Message: User admin@internal-authz logged out. 2016-06-01 11:28:29,637 INFO [org.ovirt.engine.core.sso.utils.AuthenticationUtils] (default task-2) [] User admin@internal successfully logged in with scopes: ovirt-app-api ovirt-ext=token- info:authz-search ovirt-ext=token-info:public-authz-search ovirt-ext=token-info:validate 2016-06-01 11:28:29,715 INFO [org.ovirt.engine.core.bll.aaa.CreateUserSessionCommand] (default task-24) [66d9deb5] Running command: CreateUserSessionCommand internal: false. 2016-06-01 11:28:30,614 ERROR [org.ovirt.engine.core.bll.GetVmOvfByVmIdQuery] (default task-24) [] Query 'GetVmOvfByVmIdQuery' failed: null 2016-06-01 11:28:30,614 ERROR [org.ovirt.engine.core.bll.GetVmOvfByVmIdQuery] (default task-24) [] Exception: java.lang.NullPointerException at org.ovirt.engine.core.utils.ovf.OvfWriter.buildDisk(OvfWriter.java:204) [utils.jar:] at org.ovirt.engine.core.utils.ovf.OvfManager.buildOvf(OvfManager.java:118) [utils.jar:] at org.ovirt.engine.core.utils.ovf.OvfManager.exportVm(OvfManager.java:29) [utils.jar:] at org.ovirt.engine.core.bll.storage.ovfstore.OvfHelper.buildMetadataDictionaryForVm(OvfHelper.java:107) [bll.jar:] at org.ovirt.engine.core.bll.storage.ovfstore.OvfHelper.generateOvfConfigurationForVm(OvfHelper.java:87) [bll.jar:] at org.ovirt.engine.core.bll.GetVmOvfByVmIdQuery.generateOvfConfig(GetVmOvfByVmIdQuery.java:37) [bll.jar:] at org.ovirt.engine.core.bll.GetVmOvfByVmIdQuery.executeQueryCommand(GetVmOvfByVmIdQuery.java:23) [bll.jar:] at org.ovirt.engine.core.bll.QueriesCommandBase.executeCommand(QueriesCommandBase.java:101) [bll.jar:] at org.ovirt.engine.core.dal.VdcCommandBase.execute(VdcCommandBase.java:33) [dal.jar:] at org.ovirt.engine.core.bll.Backend.runQueryImpl(Backend.java:559) [bll.jar:] at org.ovirt.engine.core.bll.Backend.runQuery(Backend.java:530) [bll.jar:] at sun.reflect.GeneratedMethodAccessor105.invoke(Unknown Source) [:1.8.0_91] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_91] at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_91] at org.jboss.as.ee.component.ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptor.java:52) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
Problem was with the population of the links that invoked GetVmOvfByVmIdQuery, this also happens upon listing of the VMs or a single VM.
In the latest nightly the GetVmOvfByVmIdQuery NPE is gone. Now the issue is when calling on V3 : <nic> <linked>false</linked> </nic> The vNIC network is changed to random one Same for 'linked' So it's probably Network issue and not storage.
(In reply to Meni Yakove from comment #12) > In the latest nightly the GetVmOvfByVmIdQuery NPE is gone. > Now the issue is when calling on V3 : > <nic> > <linked>false</linked> > </nic> > > The vNIC network is changed to random one > Same for 'linked' > So it's probably Network issue and not storage. Still exist ? if so we should reopen...
The issue this bug handle is only the NPE while listing disks via REST, as for the network issue listed here which was masked by the NPE a network bug was openeed - BZ 1342054
Verified on ovirt-engine-4.0.0.4-0.1.el7ev.noarch Sent GET request to /api/vms --> no NPE in logs Sent GET request to /api/disks --> no NPE in logs Sent GET request to /api/nics --> no NPE in logs
oVirt 4.0.0 has been released, closing current release.