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

Bug 1538170

Summary: Network interface of the hosted engine VM is unplugged after fresh deploy
Product: [oVirt] ovirt-engine Reporter: Andrej Krejcir <akrejcir>
Component: GeneralAssignee: Alona Kaplan <alkaplan>
Status: CLOSED CURRENTRELEASE QA Contact: Nikolai Sednev <nsednev>
Severity: medium Docs Contact:
Priority: medium    
Version: futureCC: akrejcir, bugs, danken, lsvaty, lveyde, mavital, ylavi
Target Milestone: ovirt-4.2.2Keywords: Triaged
Target Release: ---Flags: rule-engine: ovirt-4.2+
ylavi: exception+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-engine-4.2.2.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-03-29 11:07:34 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Network RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Logs - engine, vdsm, HE-setup, HE-ha none

Description Andrej Krejcir 2018-01-24 15:06:30 UTC
Created attachment 1385643 [details]
Logs - engine, vdsm, HE-setup, HE-ha

Description of problem:
After newly deploying the hosted engine, the network interface of the VM is unplugged.
Probably, this is only a wrong value in the DB, because the VM is reachable by network and the libvirt xml
contains the interface definition:

<interface type='bridge'>
  <mac address='00:1a:4c:10:3f:15'/>
  <source bridge='ovirtmgmt'/>
  <target dev='vnet0'/>
  <model type='virtio'/>
  <link state='up'/>
  <alias name='net0'/>
  <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>


As a consequence, the unplugged interface is not present in the libvirt domain xml stored in the OVF.


Version-Release number of selected component (if applicable):

ovirt-engine - 4.2.1.2-0.0.master.20180115100502
ovirt-engine-appliance - 4.2-20180121.1.el7.centos
ovirt-hosted-engine-setup - 2.2.7-0.0.master.20180122124130
ovirt-hosted-engine-ha - 2.2.5-0.0.master.20180117160214
vdsm - 4.20.14-22.git543a886.el7.centos


How reproducible:
Always

Steps to Reproduce:
1. Deploy the hosted engine.
2. Check network interfaces of the HE VM.

Actual results:
The interface is unplugged.

Expected results:
The interface should be plugged.

Comment 1 Andrej Krejcir 2018-01-25 15:10:12 UTC
The bug is caused by case sensitive comparing of MAC addresses.

There is no problem if the MAC address used during hosted engine setup is lowercase.

Comment 2 Dan Kenigsberg 2018-01-29 16:26:52 UTC
(In reply to Andrej Krejcir from comment #1)
> The bug is caused by case sensitive comparing of MAC addresses.
> 
> There is no problem if the MAC address used during hosted engine setup is
> lowercase.

Could you elaborate? What does this comparison, and when?

Comment 3 Andrej Krejcir 2018-01-29 16:54:25 UTC
The problematic comparison is at:

org.ovirt.engine.core.vdsbroker.libvirt.VmDevicesConverter # parseInterfaces 

In this code:

VmNetworkInterface dbInterface = dbInterfaces.stream()
    .filter(iface -> iface.getMacAddress().equals(macAddress))
    .findFirst()
    .orElse(null);


The MAC address stored in the DB is the same case as user entered during HE install.
The 'macAddress' is parsed from libvirt XML and is lowercase.

The fix is trivial, but I was wondering if we should force all mac addresses in the engine to be the same case.

Comment 4 Nikolai Sednev 2018-03-18 15:22:43 UTC
Works for me on these components:
ovirt-hosted-engine-ha-2.2.7-1.el7ev.noarch
ovirt-hosted-engine-setup-2.2.13-1.el7ev.noarch
rhvm-appliance-4.2-20180202.0.el7.noarch
Linux 3.10.0-861.el7.x86_64 #1 SMP Wed Mar 14 10:21:01 EDT 2018 x86_64 x86_64 x86_64 GNU/Linux
Red Hat Enterprise Linux Server release 7.5 (Maipo)
Deployed over iSCSI and NFS and observed in UI that NIC was plugged and up.

Comment 5 Sandro Bonazzola 2018-03-29 11:07:34 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.