Bug 813387 - zero-length /etc/sysconfig/network file
zero-length /etc/sysconfig/network file
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: ipa-client (Show other bugs)
Unspecified Unspecified
urgent Severity urgent
: rc
: ---
Assigned To: Rob Crittenden
: Regression
Depends On:
  Show dependency treegraph
Reported: 2012-04-17 11:52 EDT by Dmitri Pal
Modified: 2013-06-20 13:24 EDT (History)
5 users (show)

See Also:
Fixed In Version: ipa-client-2.1.3-3.el5
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-01-08 02:08:16 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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

  None (edit)
Description Dmitri Pal 2012-04-17 11:52:45 EDT
This bug is created as a clone of upstream ticket:

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:


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 10:42:45 EDT
Re-assigning product to RHEL 5, this does not occur in RHEL 6.
Comment 2 Rob Crittenden 2012-05-08 10:43:42 EDT
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 14:28:34 EDT
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 09:07:30 EDT
Created attachment 583270 [details]
Correct creation of temporary file for replacing variables

Corrected patch.
Comment 11 errata-xmlrpc 2013-01-08 02:08:16 EST
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.


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