Bug 1131918 - "hosted-engine --deploy" allows selection of unusable NICs
Summary: "hosted-engine --deploy" allows selection of unusable NICs
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-hosted-engine-setup
Version: 3.4.1-1
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ovirt-3.6.0-rc
: 3.6.0
Assignee: Simone Tiraboschi
QA Contact: Nikolai Sednev
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-08-20 09:48 UTC by Barak Korren
Modified: 2016-02-24 06:36 UTC (History)
6 users (show)

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.
Clone Of:
Environment:
Last Closed: 2016-02-17 07:17:44 UTC
oVirt Team: Integration
Target Upstream Version:


Attachments (Terms of Use)


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

Description Barak Korren 2014-08-20 09:48:31 UTC
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 09:52:35 UTC
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 13:32:22 UTC
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 16:38:07 UTC
(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 07:17:44 UTC
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.