Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1539356

Summary: Can not add new VNIC to hosted-engine VM
Product: [oVirt] ovirt-engine Reporter: Artyom <alukiano>
Component: BLL.VirtAssignee: Arik <ahadas>
Status: CLOSED CURRENTRELEASE QA Contact: Polina <pagranat>
Severity: high Docs Contact:
Priority: high    
Version: 4.2.1.2CC: ahadas, alkaplan, alukiano, bugs, lveyde, pagranat
Target Milestone: ovirt-4.2.2Flags: rule-engine: ovirt-4.2+
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: ovirt-engine-4.2.2 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-03-29 11:12:01 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Virt RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1469538    
Attachments:
Description Flags
engine log
none
engine.log DEBUG none

Description Artyom 2018-01-28 08:15:57 UTC
Created attachment 1387133 [details]
engine log

Description of problem:
Can not add new VNIC to hosted-engine VM

Version-Release number of selected component (if applicable):
rhvm-4.2.1.3-0.1.el7.noarch
ovirt-hosted-engine-ha-2.2.4-1.el7ev.noarch
ovirt-hosted-engine-setup-2.2.8-2.el7ev.noarch
vdsm-4.20.17-1.el7ev.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Create new network
2. Add this network to the host where runs HE VM
3. Create new VNIC on HE VM with the above network

Actual results:
2018-01-28 10:07:59,299+02 ERROR [org.ovirt.engine.core.bll.network.vm.ActivateDeactivateVmNicCommand] (default task-5) [4ad2af5c] Command 'org.ovirt.engine.core.bll.network.vm.ActivateDeactivateVmNicCommand' failed: EngineException: java.lang.NullPointerException (Failed with error ENGINE and code 5001)

Expected results:
Action succeeds without any exceptions

Additional info:

Comment 1 Martin Sivák 2018-02-07 10:40:13 UTC
Was this legacy deployment or Node 0?

Comment 2 Artyom 2018-02-07 11:45:51 UTC
Node 0 deployments.

Comment 3 Martin Sivák 2018-02-07 11:56:09 UTC
We create the VM using the ansible modules there. So somebody needs to take a look at what the defaults are for the networking settings.

Comment 4 Alona Kaplan 2018-02-07 15:35:32 UTC
Artyom, can you please attach the vdsm logs?

Comment 5 Alona Kaplan 2018-02-08 09:59:26 UTC
Created attachment 1393111 [details]
engine.log DEBUG

Comment 6 Alona Kaplan 2018-02-08 10:11:27 UTC
The NPE is because the vm.getEmulatedMachine() is null.

Caused by: java.lang.NullPointerException
        at org.ovirt.engine.core.common.businessentities.ChipsetType.fromMachineType(ChipsetType.java:21) [common.jar:]
        at org.ovirt.engine.core.vdsbroker.builder.vminfo.LibvirtVmXmlBuilder.init(LibvirtVmXmlBuilder.java:194) [vdsbroker.jar:]
        at org.ovirt.engine.core.vdsbroker.builder.vminfo.LibvirtVmXmlBuilder.<init>(LibvirtVmXmlBuilder.java:169) [vdsbroker.jar:]
        at org.ovirt.engine.core.vdsbroker.vdsbroker.HotPlugOrUnplugNicVDSCommand.generateDomainXml(HotPlugOrUnplugNicVDSCommand.java:83) [vdsbroker.jar:]
        ...

Moving to virt team.

Comment 7 Polina 2018-02-20 08:20:58 UTC
verified on 

ovirt-hosted-engine-setup-2.2.10-1.el7ev.noarch
ovirt-hosted-engine-ha-2.2.5-1.el7ev.noarch
ovirt-engine-4.2.2-0.1.el7.noarch

the second nic is added to HE VM.
checked on VM OS that it remains also after restart (hosted-engine --vm-poweroff /--vm-start)

ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 00:1a:4a:16:10:9f brd ff:ff:ff:ff:ff:ff
    inet 10.35.92.159/22 brd 10.35.95.255 scope global noprefixroute dynamic eth0
       valid_lft 27989sec preferred_lft 27989sec
    inet6 2620:52:0:235c:21a:4aff:fe16:109f/64 scope global mngtmpaddr dynamic 
       valid_lft 2591879sec preferred_lft 604679sec
    inet6 fe80::21a:4aff:fe16:109f/64 scope link 
       valid_lft forever preferred_lft forever
4: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 00:1a:4a:16:10:45 brd ff:ff:ff:ff:ff:ff

Comment 8 Sandro Bonazzola 2018-03-29 11:12:01 UTC
This bugzilla is included in oVirt 4.2.2 release, published on March 28th 2018.

Since the problem described in this bug report should be
resolved in oVirt 4.2.2 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.