Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1131918 - "hosted-engine --deploy" allows selection of unusable NICs
"hosted-engine --deploy" allows selection of unusable NICs
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-hosted-engine-setup (Show other bugs)
3.4.1-1
Unspecified Unspecified
medium Severity low
: ovirt-3.6.0-rc
: 3.6.0
Assigned To: Simone Tiraboschi
Nikolai Sednev
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2014-08-20 05:48 EDT by Barak Korren
Modified: 2016-02-24 01:36 EST (History)
6 users (show)

See Also:
Fixed In Version: ovirt-3.6.0-beta1
Doc Type: Bug Fix
Doc Text:
Previously, hosted-engine-setup was letting the user choose an invalid interface to create the management bridge on. Now, the list of allowed responses is better filtered.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-02-17 02:17:44 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Integration
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 43829 master MERGED packaging: setup: get NIC list from VDSM Never
Red Hat Product Errata RHEA-2016:0375 normal SHIPPED_LIVE ovirt-hosted-engine-setup bug fix and enhancement update 2016-03-09 18:48:34 EST

  None (edit)
Description Barak Korren 2014-08-20 05:48:31 EDT
Description of problem:
When asking for a NIC to bridge on, the script shows some options that are unusable and would cause the installer to crash later on.

Version-Release number of selected component (if applicable):
package version: 1.1.5-1.el6ev

How reproducible:
Easily

Steps to Reproduce:
1. Install kvm, libvirt, ovirt, vdsm, etc.
2. Use something like virsh or virt-manager to create virtual networks, bridges etc.
3. Run "hosted-engine --deploy", when asked to select NIC for bridge, you will be shown wierd options like "virbr0-nic"
4. If you'll select on of those options, e.g. "virbr0-nic", the installed will later on fail to execute the network configuration stage.

Actual results:
- Example installer output:
  [ ERROR ] Failed to execute stage 'Misc configuration': 'virbr1-nic'

- Excerpt from installer log:
  2014-08-20 11:14:08 INFO otopi.plugins.ovirt_hosted_engine_setup.network.bridge bridge._misc:196 Configuring the management bridge
  2014-08-20 11:14:09 DEBUG otopi.plugins.ovirt_hosted_engine_setup.network.bridge bridge._misc:204 getVdsCapabilities for virbr1-nic: {...
  2014-08-20 11:14:09 DEBUG otopi.context context._executeMethod:152 method exception
  Traceback (most recent call last):
    File "/usr/lib/python2.6/site-packages/otopi/context.py", line 142, in _executeMethod
      method['method']()
    File "/usr/share/ovirt-hosted-engine-setup/scripts/../plugins/ovirt-hosted-engine-setup/network/bridge.py", line 223, in _misc
      caps = nics_caps[selected]
  KeyError: 'virbr1-nic'
  2014-08-20 11:14:09 ERROR otopi.context context._executeMethod:161 Failed to execute stage 'Misc configuration': 'virbr1-nic'
  2014-08-20 11:14:09 DEBUG otopi.transaction transaction.abort:131 aborting ...

Expected results:
Unusable NICs probably shouldn't show up as option in the installer

Additional info:
Digging in /usr/share/ovirt-hosted-engine-setup/plugins/ovirt-hosted-engine-setup/network/bridge.py
It seems the _customization and _misc methods use different sources to obtain the list of NICs, while _customization uses the 'ethtool' module, _misc obtains the list from VDSM. Probably should both use VDSM.
Comment 1 Sandro Bonazzola 2015-01-26 04:52:35 EST
In order to get the same device list, we'll change the first part of the customization for using vdsm instead of ethtool for getting the devices list.
Comment 2 Nikolai Sednev 2016-01-20 08:32:22 EST
Isn't it a dirty environment? Host should not have any virtual bridges/interfaces on it before hosted-engine deployment and also only "yum install ovirt-hosted-engine-setup -y" should trigger installation of all dependent packages like libvirt/quemu-kvm-rhev/sanlock/mom/etc, all these components should not be installed manually.
Comment 3 Doron Fediuck 2016-01-25 11:38:07 EST
(In reply to Nikolai Sednev from comment #2)
> Isn't it a dirty environment? Host should not have any virtual
> bridges/interfaces on it before hosted-engine deployment and also only "yum
> install ovirt-hosted-engine-setup -y" should trigger installation of all
> dependent packages like libvirt/quemu-kvm-rhev/sanlock/mom/etc, all these
> components should not be installed manually.

I agree we shouldn't support dirty environments, however we have several specific
cases such as ovirt-live which is supposed to ignore external interfaces and rely
on an internal one. Another rare case is where we have a special layout the installer does not support and the user creates it manually. In most other cases
we should discourage noisy environments.
Comment 4 Gil Klein 2016-02-17 02:17:44 EST
This bug was fixed and is slated to be in the upcoming version. As we
are focusing our testing at this phase on severe bugs, this bug was
closed without going through its verification step. If you think this
bug should be verified by QE, please set its severity to high and move
it back to ON_QA

Note You need to log in before you can comment on or make changes to this bug.