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 616060 - netcf: Show ifup output in relevant error message
Summary: netcf: Show ifup output in relevant error message
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: netcf
Version: 6.0
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Laine Stump
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On: 651032
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-07-19 14:48 UTC by Cole Robinson
Modified: 2011-12-06 15:18 UTC (History)
5 users (show)

Fixed In Version: netcf-0.1.9-1.el6
Doc Type: Bug Fix
Doc Text:
In previous versions of netcf, when a management application (e.g. virt-manager) used netcf to start or stop an interface and an error occurred during this operation, netcf could only return the exit code of the program it uses for these operations (/sbin/ifup and /sbin/ifdown). This could make it more difficult than necessary to troubleshoot problems - ifup and ifdown sometimes provide a more detailed reason for the failure than can be communicated in an exit code. netcf has been modified to capture the stdout and stderr output of ifup and ifdown, and forward that information back to the management application in the case of an error, which should make it easier to troubleshoot problems.
Clone Of:
Environment:
Last Closed: 2011-12-06 15:18:46 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1631 0 normal SHIPPED_LIVE netcf bug fix and enhancement update 2011-12-06 00:50:45 UTC

Description Cole Robinson 2010-07-19 14:48:04 UTC
netcf doesn't report cmdline output of failed commands in it's error messages. Example (via virt-manager/libvirt):

https://bugzilla.redhat.com/show_bug.cgi?id=612068
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)

Firstly, 'failed to execute' doesn't sound right in this case, my guess is ifup was launched fine. Secondly, ifup might have given us informative stdout/stderr output, and this info should be included in the error message. Code for this can probably be stolen from libvirt.

Comment 1 Suzanne Logcher 2011-03-28 19:54:01 UTC
Since RHEL 6.1 External Beta has begun, and this bug remains 
unresolved, it has been rejected as it is not proposed as an 
exception or blocker.

Red Hat invites you to ask your support representative to 
propose this request, if appropriate and relevant, in the 
next release of Red Hat Enterprise Linux.

Comment 2 Laine Stump 2011-05-18 17:36:32 UTC
A fix has been committed to upstream netcf, and will be included when RHEL netcf is rebase (see Bug 705061):

commit 3aff37e9921810eac86b4eefd9bb600495e43632
Author: Laine Stump <laine>
Date:   Mon May 16 02:54:49 2011 -0400

    Capture stdout and stderr when execing external programs
    
    This is in response to:
    
       https://bugzilla.redhat.com/show_bug.cgi?id=616060
    
    but will also be useful in an upcoming patch which needs to retrieve
    the output of /etc/rc.d/init.d/netcf-transaction.
    
    Before forking, we now create a pipe, then after forking, the child
    dup2's both stdout and stderr to the write side of the pipe, and the
    parent calls fdopen() on the read side of the pipe and then calls
    gnulib's fread_file() before calling waitpid() to reap the process.

Comment 3 Laine Stump 2011-06-14 21:36:45 UTC
A fix for this bug is included in netcf-0.1.8-1.el6. A build is available here:

https://brewweb.devel.redhat.com/buildinfo?buildID=167451

Comment 5 Vivian Bian 2011-08-04 08:11:52 UTC
tested with netcf-0.1.9-1.el6

Steps:
start virt-manager
1. click 'Edit','Connection Details','Network Interfaces'
2. click 'add','Bridge',Name->'br1', choose 'eth1'
3. click 'Finish'
4. ifup br1 
Determining IP information for br1... failed.

There is no 'exit code 1' alike errors . So set bug status to VERIFIED

Comment 6 Laine Stump 2011-11-16 16:45:29 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
In previous versions of netcf, when a management application (e.g. virt-manager) used netcf to start or stop an interface and an error occurred during this operation, netcf could only return the exit code of the program it uses for these operations (/sbin/ifup and /sbin/ifdown). This could make it more difficult than necessary to troubleshoot problems - ifup and ifdown sometimes provide a more detailed reason for the failure than can be communicated in an exit code.

netcf has been modified to capture the stdout and stderr output of ifup and ifdown, and forward that information back to the management application in the case of an error, which should make it easier to troubleshoot problems.

Comment 7 errata-xmlrpc 2011-12-06 15:18:46 UTC
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.

http://rhn.redhat.com/errata/RHBA-2011-1631.html


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