Bug 833516

Summary: Ipactl exception not handled well in ipactl
Product: Red Hat Enterprise Linux 6 Reporter: Dmitri Pal <dpal>
Component: ipaAssignee: Rob Crittenden <rcritten>
Status: CLOSED ERRATA QA Contact: Namita Soman <nsoman>
Severity: unspecified Docs Contact:
Priority: medium    
Version: 6.4CC: jgalipea, mkosek, pspacek
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ipa-3.0.0-1.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-21 09:15:55 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 Dmitri Pal 2012-06-19 16:07:26 UTC
This bug is created as a clone of upstream ticket:
https://fedorahosted.org/freeipa/ticket/2850

I'm not entirely sure how IPA got into this state. I rebooted the box at the end of the day on Friday and just got back to it on Monday and found it hung. I power-cycled it and IPA didn't come up so I started it manually and saw this error.

This ticket is to improve the error handling in general. It looks like the Ipactl exception doesn't return what the global logger expects to have.

{{{
# ipactl start
Starting Directory Service
Failed to read data from Directory Service: Unknown error when retrieving list of services from LDAP: {'info': 'SASL(-4): no mechanism available: ', 'desc': 'Unknown authentication method'}
Shutting down
Traceback (most recent call last):
  File "/usr/lib64/python2.7/logging/__init__.py", line 846, in emit
    msg = self.format(record)
  File "/usr/lib64/python2.7/logging/__init__.py", line 723, in format
    return fmt.format(record)
  File "/usr/lib64/python2.7/logging/__init__.py", line 464, in format
    record.message = record.getMessage()
  File "/usr/lib64/python2.7/logging/__init__.py", line 328, in getMessage
    msg = msg % self.args
TypeError: __str__ returned non-string (type NoneType)
Logged from file installutils.py, line 657
[root@pinto rcrit]# ipactl start
Starting Directory Service
Failed to read data from Directory Service: Unknown error when retrieving list of services from LDAP: {'info': 'SASL(-4): no mechanism available: ', 'desc': 'Unknown authentication method'}
Shutting down
> /usr/lib/python2.7/site-packages/ipaserver/install/installutils.py(657)run_script()
-> root_logger.info('The %s command failed, exception: %s: %s',
(Pdb) pritn operati
*** SyntaxError: invalid syntax (<stdin>, line 1)
(Pdb) print operation_name
ipactl
(Pdb) print e
*** TypeError: __str__ returned non-string (type NoneType)
(Pdb) print e.msg
None
(Pdb) print e.rval
1
(Pdb) print e.args
()
(Pdb) print e.message

(Pdb) type(e)
<class '__main__.IpactlError'>
}}}

Comment 1 Jenny Severance 2012-06-20 15:33:38 UTC
please add steps to verify this bug

Comment 2 RHEL Program Management 2012-07-10 06:21:12 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 3 RHEL Program Management 2012-07-10 23:29:00 UTC
This request was erroneously removed from consideration in Red Hat Enterprise Linux 6.4, which is currently under development.  This request will be evaluated for inclusion in Red Hat Enterprise Linux 6.4.

Comment 5 Martin Kosek 2012-08-27 13:39:14 UTC
A relevant fix was accepted upstream:

Fixed upstream:
master: https://fedorahosted.org/freeipa/changeset/2bf68115cea1bae09c3b45e88ed9e405c57e70d2
ipa-3-0: https://fedorahosted.org/freeipa/changeset/9a2abbe167c0ecd6a3b7d31323840e446d7a5d43

Since there is no known reproduction steps, can we just test this bug in a regression-only mode?

Comment 6 Jenny Severance 2012-09-20 11:41:10 UTC
Existing ipactl automation tests will be executed, as well as restarts in many other regression test suites are sufficient to verify that no regressions were introduced by this bug fix.   Will verify sanity-only

Comment 9 Namita Soman 2013-01-23 19:41:04 UTC
Verified using: ipa-server-3.0.0-22.el6.x86_64

Run results at:
https://beaker.engineering.redhat.com/jobs/364736

Comment 11 errata-xmlrpc 2013-02-21 09:15:55 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/RHSA-2013-0528.html