RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 628545 - virsh iface-start raise an error when first running after reboot the host
Summary: virsh iface-start raise an error when first running after reboot the host
Keywords:
Status: CLOSED DUPLICATE of bug 612934
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.0
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Laine Stump
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 657453
TreeView+ depends on / blocked
 
Reported: 2010-08-30 11:01 UTC by weizhang
Modified: 2010-12-28 05:28 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 657453 (view as bug list)
Environment:
Last Closed: 2010-12-07 07:16:37 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description weizhang 2010-08-30 11:01:52 UTC
Description of problem:
I test with the following steps after reboot the host for getting clean environment. After reboot the host and run iface-destroy and iface-start at first time, it fails with an error. It is very strange that after I reboot the NetworkManager, the iface-destroy and iface-start successfully, but after iface-destroy the eth0 state in iface-list is still active, and in fact it is already down.


Version-Release number of selected component (if applicable):
# rpm -qa |grep netcf
netcf-libs-0.1.6-4.el6.x86_64
# rpm -qa libvirt
libvirt-0.8.1-27.el6.x86_64
# rpm -qa NetworkManager
NetworkManager-0.8.1-5.el6.x86_64
# uname -r
2.6.32-70.el6.x86_64

How reproducible:
100%

Steps to Reproduce:

# virsh iface-list 
Name                 State      MAC Address
--------------------------------------------
eth0                 active     b8:ac:6f:3b:0d:56
lo                   active     00:00:00:00:00:00

# setenforce 0
# virsh iface-destroy eth0
Interface eth0 destroyed

# virsh iface-list
Name                 State      MAC Address
--------------------------------------------
lo                   active     00:00:00:00:00:00

# virsh iface-start eth0
error: Failed to start interface eth0
error: internal error failed to create (start) interface eth0 (netcf: failed to
execute external program - Running 'ifup eth0' failed with exit code 4)

# ifup eth0
Error: Connection activation failed: Device not managed by NetworkManager
********************************************************************************
# service NetworkManager stop
Stopping NetworkManager daemon:                            [  OK  ]
# service NetworkManager start
Setting network parameters...                              [  OK  ]
Starting NetworkManager daemon:                            [  OK  ]

# virsh iface-destroy eth0
Interface eth0 destroyed
#ifconfig
eth0      Link encap:Ethernet  HWaddr B8:AC:6F:3B:0D:56  
          inet6 addr: fe80::baac:6fff:fe3b:d56/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:6267 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2455 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:2528300 (2.4 MiB)  TX bytes:332620 (324.8 KiB)
          Memory:fdfe0000-fe000000 
...

# virsh iface-list 
Name                 State      MAC Address
--------------------------------------------
eth0                 active     b8:ac:6f:3b:0d:56
lo                   active     00:00:00:00:00:00

Actual results:
iface-start failed with error and the state of eth0 is wrong

Expected results:
it should success with no error and the status of network interface should be correct

Additional info:

Comment 1 weizhang 2010-09-01 08:21:49 UTC
I create the br0 with virt-manager and have the same problem after restart the host with NetworkManager started

#vi virt-manager.log

[Wed, 01 Sep 2010 15:56:35 virt-manager 3002] DEBUG (error:86) Uncaught Error: Error creating interface: 'Could not create interface: internal error failed to create (start) interface br0 (netcf: failed to execute external program - Running 'ifup br0' failed with exit code 1)' : Error creating interface: '<type 'exceptions.RuntimeError'> Could not create interface: internal error failed to create (start) interface br0 (netcf: failed to execute external program - Running 'ifup br0' failed with exit 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 br0 (netcf: failed to execute external program - Running 'ifup br0' failed with exit code 1)

Comment 2 Jirka Klimes 2010-11-01 13:04:48 UTC
(In reply to comment #0)
> Description of problem:
> I test with the following steps after reboot the host for getting clean
> environment. After reboot the host and run iface-destroy and iface-start at
> first time, it fails with an error. It is very strange that after I reboot the
> NetworkManager, the iface-destroy and iface-start successfully, but after
> iface-destroy the eth0 state in iface-list is still active, and in fact it is
> already down.
> 
> # setenforce 0
> # virsh iface-destroy eth0
> Interface eth0 destroyed
> 
> # virsh iface-list
> Name                 State      MAC Address
> --------------------------------------------
> lo                   active     00:00:00:00:00:00
> 
> # virsh iface-start eth0
> error: Failed to start interface eth0
> error: internal error failed to create (start) interface eth0 (netcf: failed to
> execute external program - Running 'ifup eth0' failed with exit code 4)
> 
> # ifup eth0
> Error: Connection activation failed: Device not managed by NetworkManager
> 

It could be the same as bug 612934, 'ifdown eth0' puts the link down and thus it's not available to be successfully started with 'ifup eth0' later on.

It would be nice if virsh returned the same error message as ifup ("Device not managed by NetworkManager" not just error code 4.). BTW, the error from NM is now "Device not managed by NetworkManager or unavailable", which is more exact.

(In reply to comment #1)
The error looks the same as in bug 612068.

Comment 3 Laine Stump 2010-12-07 07:16:37 UTC
I agree 100% with Jirka's analysis in Comment 2. Closing this as a duplicate of Bug 612934.

(BTW, please note that the combination of NetworkManager and netcf together is not currently supported, although it does work correctly much of the time).

*** This bug has been marked as a duplicate of bug 612934 ***


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