Bug 429902

Summary: KeyError: 'LIBUSER_CONF'
Product: Red Hat Enterprise Linux 5 Reporter: Milan Zázrivec <mzazrivec>
Component: anacondaAssignee: Chris Lumens <clumens>
Status: CLOSED ERRATA QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: 5.2CC: borgan
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: RHBA-2008-0397 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-05-21 15:32:42 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Milan Zázrivec 2008-01-23 18:35:21 UTC
Description of problem:
Anaconda installs of RHEL5.2-Server-20080123.nightly fail with following
traceback:

Traceback (most recent call last):
  File "/usr/bin/anaconda", line 683, in ?
    users.createLuserConf(anaconda.rootPath)
  File "/usr/lib/anaconda/users.py", line 25, in createLuserConf
    if os.access(os.environ["LIBUSER_CONF"], os.R_OK):
  File "/usr/lib/python2.4/UserDict.py", line 17, in __getitem__
    def __getitem__(self, key): return self.data[key]
KeyError: 'LIBUSER_CONF'
install exited abnormally [1/1]

Version-Release number of selected component (if applicable):
anaconda-11.1.2.89-1 / RHEL5.2-Server-20080123.nightly

How reproducible:
Always

Steps to Reproduce:
1. Boot RHEL5.2-Server-20080123.nightly installer
2. Make it all the way to the beginning of stage2
3. Right after stage2 is loaded, mentioned traceback occurs

Comment 1 Chris Lumens 2008-01-23 19:34:11 UTC
*** Bug 429916 has been marked as a duplicate of this bug. ***

Comment 2 Chris Lumens 2008-01-23 19:39:03 UTC
Fallout from the patch for 427388, easy to fix.

Comment 3 Chris Lumens 2008-01-23 19:40:40 UTC
diff --git a/users.py b/users.py
index 5af3cb0..9cd5ef8 100644
--- a/users.py
+++ b/users.py
@@ -22,7 +22,7 @@ import os.path
 
 def createLuserConf(instPath, saltname='md5'):
     """Writes a libuser.conf for instPath."""
-    if os.access(os.environ["LIBUSER_CONF"], os.R_OK):
+    if os.getenv("LIBUSER_CONF") and os.access(os.environ["LIBUSER_CONF"],
os.R_OK):
         fn = os.environ["LIBUSER_CONF"]
         fd = open(fn, 'w')
     else:


Comment 9 errata-xmlrpc 2008-05-21 15:32:42 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2008-0397.html