Bug 813387 - zero-length /etc/sysconfig/network file
Summary: zero-length /etc/sysconfig/network file
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: ipa-client
Version: 5.7
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: rc
: ---
Assignee: Rob Crittenden
QA Contact: IDM QE LIST
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-04-17 15:52 UTC by Dmitri Pal
Modified: 2013-06-20 17:24 UTC (History)
5 users (show)

Fixed In Version: ipa-client-2.1.3-3.el5
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-01-08 07:08:16 UTC
Target Upstream Version:


Attachments (Terms of Use)
Correct creation of temporary file for replacing variables (4.86 KB, patch)
2012-05-08 18:28 UTC, Rob Crittenden
no flags Details | Diff
Correct creation of temporary file for replacing variables (7.60 KB, patch)
2012-05-09 13:07 UTC, Rob Crittenden
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:0019 0 normal SHIPPED_LIVE ipa-client bug fix update 2013-01-07 15:29:07 UTC

Description Dmitri Pal 2012-04-17 15:52:45 UTC
This bug is created as a clone of upstream ticket:
https://fedorahosted.org/freeipa/ticket/2640

User reported that on CentOS 5 with 2.1.3-1 ipa-client-install was creating a zero-length /etc/sysconfig/network file.

The contents of the original file were:

NETWORKING=yes
NETWORKING_IPV6=yes
HOSTNAME=kelvin-c5

He was installing with:

ipa-client-install --no-ntp --force --hostname=kelvin-c5.<dnsdomainname>

The full thread is at https://www.redhat.com/archives/freeipa-users/2012-April/msg00049.html

Comment 1 Rob Crittenden 2012-05-08 14:42:45 UTC
Re-assigning product to RHEL 5, this does not occur in RHEL 6.

Comment 2 Rob Crittenden 2012-05-08 14:43:42 UTC
I have been able to reproduct in el5.7 but not 6.2, 6,3 or several versions of Fedora. This must be a bug in the backport of 2.1.3 back to RHEL 5.x

Comment 3 Rob Crittenden 2012-05-08 18:28:34 UTC
Created attachment 583056 [details]
Correct creation of temporary file for replacing variables

Basically we were opening a temporary file to be used to do the variable replacement and then trying to read that file as the source. Since we just opened it there was nothing to read so we exited, leaving a zero-length file.

Once the right file was used I found a block indention problem that was causing us to try to operate on a closed file.

With both of these fixed the --hostname argument no longer results in a zero-length /etc/sysconfig/network file.

Comment 5 Rob Crittenden 2012-05-09 13:07:30 UTC
Created attachment 583270 [details]
Correct creation of temporary file for replacing variables

Corrected patch.

Comment 11 errata-xmlrpc 2013-01-08 07:08:16 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-2013-0019.html


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