Bug 637892 - Fail to create the interface type 'VLAN'
Summary: Fail to create the interface type 'VLAN'
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: netcf
Version: 14
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Laine Stump
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-09-27 17:08 UTC by Laine Stump
Modified: 2010-10-15 12:44 UTC (History)
2 users (show)

Fixed In Version: netcf-0.1.7-1.fc14
Clone Of:
Environment:
Last Closed: 2010-10-15 12:44:10 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Laine Stump 2010-09-27 17:08:04 UTC
+++ This bug was initially created as a clone of Bug #585112 +++

Description of problem:
As summary.

Version-Release number of selected component (if applicable):
virt-manager-0.8.4-1.el6.noarch
python-virtinst-0.500.3-1.el6.noarch
libvirt-0.8.0-3.el6.x86_64
libvirt-python-0.8.0-3.el6.x86_64

How reproducible:
Always

Steps to Reproduce:
1.Edit -> Host Details..., and Click on the 'Networks Interfaces' tab.
2.Click on the '+' symbol on the bottom left to configure a new network interface. 
3.Select 'VLAN' in the 'Interface type' drop down list. Hit 'Forward'.
4.Click on check box 'Activate now' with checked.
5.In the 'VLAN tag' field, enter '0'.
6.In the 'Choose parent interface' field, clicking on check box 'eth1' with checked. Hit 'Finish'.
  
Actual results:
Error creating interface: '<type 'exceptions.RuntimeError'> Could not create interface: internal error failed to create (start) interface eth1.0 (netcf: failed to execute external program - Running 'ifup eth1.0' failed with error code 1)
Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/createinterface.py", line 1156, in do_install
    self.interface.install(meter, create=activate)
  File "/usr/lib/python2.6/site-packages/virtinst/Interface.py", line 258, in install
    raise RuntimeError(errmsg)
RuntimeError: Could not create interface: internal error failed to create (start) interface eth1.0 (netcf: failed to execute external program - Running 'ifup eth1.0' failed with error code 1)
'

Expected results:
The interface 'eth1.0' will be successfully created in the network interfaces
list.

Additional info:

--- Additional comment from crobinso on 2010-04-30 10:06:14 EDT ---

Can you please attach the output of virt-manager --debug when reproducing?

Does unchecking the 'Activate now' box, then trying to starting the interface by hand help? If not, what is the output if you manually attempt 'ifup eth1.0'?

--- Additional comment from nzhang on 2010-05-04 01:49:03 EDT ---

I have 2 ethernet on my machine, using eth1 with static ip.

# virt-manager --debug
2010-05-04 09:41:54,396 (virt-manager:161): Application startup
2010-05-04 09:41:54,530 (engine:338): About to connect to uris ['qemu:///system']
2010-05-04 09:41:54,565 (engine:628): window counter incremented to 1
2010-05-04 09:41:54,611 (connection:836): Scheduling background open thread for qemu:///system
2010-05-04 09:41:54,612 (connection:981): Background thread is running
2010-05-04 09:41:54,712 (connection:1019): Background open thread complete, scheduling notify
2010-05-04 09:41:54,713 (connection:1024): Notifying open result
2010-05-04 09:41:54,737 (connection:1032): qemu:///system capabilities:
<capabilities>

  <host>
    <cpu>
      <arch>x86_64</arch>
      <model>core2duo</model>
      <topology sockets='1' cores='2' threads='1'/>
      <feature name='lahf_lm'/>
      <feature name='xtpr'/>
      <feature name='cx16'/>
      <feature name='tm2'/>
      <feature name='est'/>
      <feature name='vmx'/>
      <feature name='ds_cpl'/>
      <feature name='pbe'/>
      <feature name='tm'/>
      <feature name='ht'/>
      <feature name='ss'/>
      <feature name='acpi'/>
      <feature name='ds'/>
    </cpu>
    <migration_features>
      <live/>
      <uri_transports>
        <uri_transport>tcp</uri_transport>
      </uri_transports>
    </migration_features>
    <topology>
      <cells num='1'>
        <cell id='0'>
          <cpus num='2'>
            <cpu id='0'/>
            <cpu id='1'/>
          </cpus>
        </cell>
      </cells>
    </topology>
    <secmodel>
      <model>selinux</model>
      <doi>0</doi>
    </secmodel>
  </host>

  <guest>
    <os_type>hvm</os_type>
    <arch name='i686'>
      <wordsize>32</wordsize>
      <emulator>/usr/libexec/qemu-kvm</emulator>
      <machine>rhel6.0.0</machine>
      <machine>pc-0.12</machine>
      <machine>pc-0.11</machine>
      <machine>pc-0.10</machine>
      <machine>isapc</machine>
      <machine canonical='rhel6.0.0'>pc</machine>
      <machine>rhel5.5.0</machine>
      <machine>rhel5.4.4</machine>
      <machine>rhel5.4.0</machine>
      <domain type='qemu'>
      </domain>
      <domain type='kvm'>
        <emulator>/usr/libexec/qemu-kvm</emulator>
      </domain>
    </arch>
    <features>
      <cpuselection/>
      <pae/>
      <nonpae/>
      <acpi default='on' toggle='yes'/>
      <apic default='on' toggle='no'/>
    </features>
  </guest>

  <guest>
    <os_type>hvm</os_type>
    <arch name='x86_64'>
      <wordsize>64</wordsize>
      <emulator>/usr/libexec/qemu-kvm</emulator>
      <machine>rhel6.0.0</machine>
      <machine>pc-0.12</machine>
      <machine>pc-0.11</machine>
      <machine>pc-0.10</machine>
      <machine>isapc</machine>
      <machine canonical='rhel6.0.0'>pc</machine>
      <machine>rhel5.5.0</machine>
      <machine>rhel5.4.4</machine>
      <machine>rhel5.4.0</machine>
      <domain type='qemu'>
      </domain>
      <domain type='kvm'>
        <emulator>/usr/libexec/qemu-kvm</emulator>
      </domain>
    </arch>
    <features>
      <cpuselection/>
      <acpi default='on' toggle='yes'/>
      <apic default='on' toggle='no'/>
    </features>
  </guest>

</capabilities>

2010-05-04 09:41:55,074 (connection:212): Using libvirt API for netdev enumeration
2010-05-04 09:41:55,076 (connection:251): Using libvirt API for mediadev enumeration
2010-05-04 09:41:56,797 (engine:628): window counter incremented to 2
2010-05-04 09:42:13,467 (Interface:237): Creating interface 'eth1.0' with xml:
<interface type='vlan' name='eth1.0'>
  <start mode='none'/>
  <vlan tag='0'>
    <interface name='eth1'/>
  </vlan>
</interface>

2010-05-04 09:42:13,735 (error:86): Uncaught Error: Error creating interface: 'Could not create interface: internal error failed to create (start) interface eth1.0 (netcf: failed to execute external program - Running 'ifup eth1.0' failed with error code 1)' : Error creating interface: '<type 'exceptions.RuntimeError'> Could not create interface: internal error failed to create (start) interface eth1.0 (netcf: failed to execute external program - Running 'ifup eth1.0' failed with error code 1)
Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/createinterface.py", line 1156, in do_install
    self.interface.install(meter, create=activate)
  File "/usr/lib/python2.6/site-packages/virtinst/Interface.py", line 258, in install
    raise RuntimeError(errmsg)
RuntimeError: Could not create interface: internal error failed to create (start) interface eth1.0 (netcf: failed to execute external program - Running 'ifup eth1.0' failed with error code 1)
'
2010-05-04 09:42:29,734 (engine:632): window counter decremented to 1
2010-05-04 09:42:30,422 (engine:632): window counter decremented to 0
2010-05-04 09:42:30,424 (engine:641): Exiting app normally.

--- Additional comment from nzhang on 2010-05-04 01:54:15 EDT ---

If I manually start up the interface, it also failed.

# ifup eth1.0
Device eth1.0 does not seem to be present, delaying initialization.

# cat /etc/sysconfig/network-scripts/ifcfg-eth1.0
DEVICE=eth1.0
VLAN=yes
ONBOOT=no

--- Additional comment from crobinso on 2010-05-04 15:43:47 EDT ---

Hmm, reassigning to netcf. Can't say I really know much about VLANs. Is the generated ifcfg script sufficient? Any hardware support required? Maybe there is a way to get better debugging output out of netcf or ifup?

--- Additional comment from lutter on 2010-05-04 20:48:27 EDT ---

Is there anything in /var/log/messages when you do 'ifup eth1.0' ? If this is the first time you try to use a vlan, you should see a message about loading vlan support.

--- Additional comment from nzhang on 2010-05-04 22:59:30 EDT ---

No anything present in /var/log/messages after doing 'ifup eth1.0'. The following is the interface related errors when creating eth1.0.


May  5 06:36:27 dhcp-66-70-152 libvirtd: 06:36:27.809: error : interfaceLookupByName:276 : Interface not found: couldn't find interface named 'eth1.0'
May  5 06:36:28 dhcp-66-70-152 NetworkManager:    ifcfg-rh: parsing /etc/sysconfig/network-scripts/ifcfg-eth1.0.augnew ...
May  5 06:36:28 dhcp-66-70-152 NetworkManager:    ifcfg-rh:     error: Couldn't parse file '/etc/sysconfig/network-scripts/ifcfg-eth1.0.augnew'
May  5 06:36:28 dhcp-66-70-152 NetworkManager:    ifcfg-rh: parsing /etc/sysconfig/network-scripts/ifcfg-eth1.0.augnew ...
May  5 06:36:28 dhcp-66-70-152 NetworkManager:    ifcfg-rh:     error: Couldn't parse file '/etc/sysconfig/network-scripts/ifcfg-eth1.0.augnew'
May  5 06:36:28 dhcp-66-70-152 NetworkManager:    ifcfg-rh: parsing /etc/sysconfig/network-scripts/ifcfg-eth1.0.augnew ...
May  5 06:36:28 dhcp-66-70-152 NetworkManager:    ifcfg-rh:     error: Couldn't parse file '/etc/sysconfig/network-scripts/ifcfg-eth1.0.augnew'
May  5 06:36:28 dhcp-66-70-152 NetworkManager:    ifcfg-rh: parsing /etc/sysconfig/network-scripts/ifcfg-eth1.0.augnew ...
May  5 06:36:28 dhcp-66-70-152 NetworkManager:    ifcfg-rh:     error: Couldn't parse file '/etc/sysconfig/network-scripts/ifcfg-eth1.0.augnew'
May  5 06:36:28 dhcp-66-70-152 NetworkManager:    ifcfg-rh: parsing /etc/sysconfig/network-scripts/ifcfg-eth1.0 ...
May  5 06:36:28 dhcp-66-70-152 NetworkManager:    ifcfg-rh:     read connection 'System eth1.0'
May  5 06:36:28 dhcp-66-70-152 NetworkManager:    ifcfg-rh: removed /etc/sysconfig/network-scripts/ifcfg-eth1.
May  5 06:36:28 dhcp-66-70-152 NetworkManager: <info>  (eth1): device state change: 7 -> 3 (reason 38)
May  5 06:36:28 dhcp-66-70-152 NetworkManager: <info>  (eth1): deactivating device (reason: 38).
May  5 06:36:28 dhcp-66-70-152 dnsmasq[1894]: reading /etc/resolv.conf
May  5 06:36:28 dhcp-66-70-152 dnsmasq[1894]: using nameserver 172.16.52.28#53
May  5 06:36:28 dhcp-66-70-152 dnsmasq[1894]: using nameserver 10.32.63.5#53
May  5 06:36:28 dhcp-66-70-152 dnsmasq[1894]: using nameserver 10.66.127.10#53
May  5 06:36:28 dhcp-66-70-152 avahi-daemon[1504]: Withdrawing address record for 192.168.0.1 on eth1.
May  5 06:36:28 dhcp-66-70-152 avahi-daemon[1504]: Leaving mDNS multicast group on interface eth1.IPv4 with address 192.168.0.1.
May  5 06:36:28 dhcp-66-70-152 avahi-daemon[1504]: Interface eth1.IPv4 no longer relevant for mDNS.

--- Additional comment from laine on 2010-07-26 20:41:06 EDT ---

At least part of the problem is that netcf is deleting the definition for the parent interface (eth1 in this case)

--- Additional comment from laine on 2010-07-27 09:54:04 EDT ---

A fix for this has been posted upstream:

https://fedorahosted.org/pipermail/netcf-devel/2010-July/000439.html

netcf was erroneously removing the config for the physical interface associated with new VLANs as they were being created. That behavior has been fixed.

--- Additional comment from nzhang on 2010-07-29 02:39:52 EDT ---

Still has the errors:

kernel-2.6.32-52.el6.x86_64
libvirt-0.8.1-20.el6.x86_64
virt-manager-0.8.4-7.el6.noarch
netcf-libs-0.1.6-4.el6.x86_64
netcf-0.1.6-4.el6.x86_64

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/host.py", line 887, in
start_interface
    interface.start()
  File "/usr/share/virt-manager/virtManager/interface.py", line 72, in start
    self.interface.create(0)
  File "/usr/lib64/python2.6/site-packages/libvirt.py", line 966, in create
    if ret == -1: raise libvirtError ('virInterfaceCreate() failed', net=self)
libvirtError: internal error failed to create (start) interface eth1.0 (netcf:
failed to execute external program - Running 'ifup eth1.0' failed with exit
code 1)

--- Additional comment from laine on 2010-07-29 21:57:09 EDT ---

Please disable NetworkManager and try again. I've just now tested with and without NetworkManager; it definitely doesn't work properly with NM enabled, and does work with it disabled.

Although it may sometimes work (these days it seems to be okay with normal ethernet interfaces, for example), we do not support netcf coexistence with NetworkManager.

I am filing a bug about ifup and ifdown to help this matter, but our defined, official position for 6.0 is that netcf (and thus the host interface config in libvirt and virt-manager) is supported only when NetworkManager is disabled.

--- Additional comment from nzhang on 2010-07-29 23:02:43 EDT ---

Laine,

Thanks for the comments! But I still got the same failed when I disabled NM.

# service NetworkManager stop
Stopping NetworkManager daemon:                            [  OK  ]
# service NetworkManager status
NetworkManager is stopped

--- Additional comment from laine on 2010-07-30 01:19:50 EDT ---

After logging into the machine where the earlier tests were run and doing my own successful tests, I went back and read the bug report more closely. I noticed this:

   5.In the 'VLAN tag' field, enter '0'.

A vlan of 0 means "no vlan", and as a matter of fact isn't supported by the Linux kernel. Here's the best documentation I could find of this - a patch to support setting vlan id to 0 that hasn't been accepted:

  http://patchwork.ozlabs.org/patch/36929/

If you set the VLAN tag to something other than 0, VLAN creation should work (it did for me on the test machine, both from the commandline and virt-manager, as long as NetworkManager was turned off).

(I did notice that virt-manager doesn't support configuring an IP address for the vlan interface, but that should be a separate bug report).

--- Additional comment from nzhang on 2010-07-30 01:53:27 EDT ---

OK, if setting the VLAN tag to a number except 0, it can be successfully created. Moving to VERIFIED.

Comment 1 Fedora Update System 2010-09-27 17:15:16 UTC
netcf-0.1.7-1.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/netcf-0.1.7-1.fc14

Comment 2 Fedora Update System 2010-09-27 17:17:30 UTC
netcf-0.1.7-1.fc13 has been submitted as an update for Fedora 13.
https://admin.fedoraproject.org/updates/netcf-0.1.7-1.fc13

Comment 3 Fedora Update System 2010-09-27 17:18:46 UTC
netcf-0.1.7-1.fc12 has been submitted as an update for Fedora 12.
https://admin.fedoraproject.org/updates/netcf-0.1.7-1.fc12

Comment 4 Fedora Update System 2010-09-27 20:09:23 UTC
netcf-0.1.7-1.fc14 has been pushed to the Fedora 14 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update netcf'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/netcf-0.1.7-1.fc14

Comment 5 Fedora Update System 2010-10-14 23:04:08 UTC
netcf-0.1.7-1.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 6 Fedora Update System 2010-10-14 23:06:09 UTC
netcf-0.1.7-1.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 7 Fedora Update System 2010-10-15 12:43:48 UTC
netcf-0.1.7-1.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.


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