Bug 1276780 - Host creation fails when creating libvirtd VM with bridged network
Host creation fails when creating libvirtd VM with bridged network
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Compute Resources (Show other bugs)
6.1.3
x86_64 Linux
unspecified Severity medium (vote)
: GA
: --
Assigned To: Marek Hulan
Sachin Ghai
http://projects.theforeman.org/issues...
: Triaged
Depends On: 1317909
Blocks:
  Show dependency treegraph
 
Reported: 2015-10-30 17:08 EDT by Balaji
Modified: 2016-07-27 07:21 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-07-27 07:21:08 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
host with bridge network failure (121.70 KB, image/png)
2015-10-30 17:08 EDT, Balaji
no flags Details
'Network' dropdown shows only bridge interfaces. (39.00 KB, image/png)
2016-05-23 04:54 EDT, Sachin Ghai
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Foreman Issue Tracker 14204 None None None 2016-04-22 12:01 EDT

  None (edit)
Description Balaji 2015-10-30 17:08:57 EDT
Created attachment 1088025 [details]
host with bridge network failure

Description of problem:
Host creation fails with the message:
Unable to save
Failed to power up a compute KVM (Libvirt) instance test.example.com: Call to virDomainCreateWithFlags failed: Unable to add bridge em1 port vnet0: Operation not supported

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


How reproducible:
 Consistent. 

Steps to Reproduce:
1.Setup a KVM env and inetgrate with Satellite 6.1.3. Setup a bridged network in the KVM. 
2.Create the host with physical (Bridge)network to encounter this error.
3.

Actual results:

Host creation fails. 
Expected results:
Should accept bridged network.

Additional info:
Workaround: Continue selecting Virtual NAT network with default network. Complete creating the host. Go to virt-manager, select the console for the new VM, and manually change the NIC setting to bridge desired.
Comment 2 Marek Hulan 2016-03-15 10:22:38 EDT
This is caused selecting wrong interface for bridged networking. Existing bridge must be selected for this type of networking, according to screenshot a physical interface em1 was used.

We shouldn't list non-bridge interfaces in the select box, unfortunately ruby-libvirt does not give us enough information. I reported the issue against ruby-libvirt, meanwhile we have to parse XML ourselves (hopefully short-term solution).
Comment 3 Marek Hulan 2016-03-15 10:27:36 EDT
Created redmine issue http://projects.theforeman.org/issues/14204 from this bug
Comment 4 Bryan Kearney 2016-03-15 12:10:30 EDT
Upstream bug component is Compute Resources
Comment 5 Bryan Kearney 2016-03-16 06:10:17 EDT
Moving to POST since upstream bug http://projects.theforeman.org/issues/14204 has been closed
-------------
Marek Hulán
Applied in changeset commit:01fde835c5f50561dcde4a4f8b7a0f1ecf1bb2db.
Comment 6 Sachin Ghai 2016-05-18 08:18:57 EDT
Verified with sat62 GA snap11.

I can create host on network_type -> "Physical(Bridge)". As soon as I select 'Libvirt' compute-resource, this option auto populated under 'Interfaces" tab.

And under Nic type, I can see 'virtio', rtl8139.

@Marek: Could you please confirm  if anything else needs to be checked ?

As per comment2, where I shouln't see non-bridged interfaces ? Is it under Interfaces -> Libvirt section -> Nic_type ??

Please confirm ?
Comment 7 Marek Hulan 2016-05-19 04:00:51 EDT
After you choose libvirt compute resource and you select Physical (Bridge) network type, there is a field Network. This field used to display all network interfaces on libvirt host but now it should display only bridges.

When there's at least one bridge it's a select box. Previously there were also non-bridge interfaces listed, usually one could see 'em1' which when selected caused problems during host build. Now you should not be able to select 'em1'. If there's not bridge on libvirt host, there is no select box but text input where user could specify bridge name (but it must exist on host, otherwise build would fail).

To test that you can select bridge, you might need to create some on libvirt host first. You can command similar to this

    sudo virsh iface-bridge enp0s25 br0

where enp0s25 is interface that will be put into the bridge br0. To unbridge the interface use

    sudo virsh iface-unbridge br0
Comment 8 Sachin Ghai 2016-05-23 04:53:07 EDT
Thanks Marek.. 
 Verified with sat6.2 GA snap12.1

I can see only bridge interfaces not all interfaces under 'Network' dropdown. And I can provision on selected bridge interface. Please see attached screenshot that shows bridge interfaces only under 'Network' dropdown. Thanks
Comment 9 Sachin Ghai 2016-05-23 04:54 EDT
Created attachment 1160481 [details]
'Network' dropdown shows only bridge interfaces.
Comment 10 Marek Hulan 2016-05-23 06:40:22 EDT
Great, I think you can consider this verified.
Comment 11 Sachin Ghai 2016-05-23 08:47:13 EDT
Oh, forgot to change the state. Moving now.
Comment 12 Bryan Kearney 2016-07-27 07:21:08 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

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

https://access.redhat.com/errata/RHBA-2016:1501

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