Bug 833516 - Ipactl exception not handled well in ipactl
Ipactl exception not handled well in ipactl
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: ipa (Show other bugs)
Unspecified Unspecified
medium Severity unspecified
: rc
: ---
Assigned To: Rob Crittenden
Namita Soman
Depends On:
  Show dependency treegraph
Reported: 2012-06-19 12:07 EDT by Dmitri Pal
Modified: 2013-02-21 04:15 EST (History)
3 users (show)

See Also:
Fixed In Version: ipa-3.0.0-1.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-02-21 04:15:55 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2013:0528 normal SHIPPED_LIVE Low: ipa security, bug fix and enhancement update 2013-02-21 03:22:21 EST

  None (edit)
Description Dmitri Pal 2012-06-19 12:07:26 EDT
This bug is created as a clone of upstream ticket:

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
(Pdb) print e
*** TypeError: __str__ returned non-string (type NoneType)
(Pdb) print e.msg
(Pdb) print e.rval
(Pdb) print e.args
(Pdb) print e.message

(Pdb) type(e)
<class '__main__.IpactlError'>
Comment 1 Jenny Galipeau 2012-06-20 11:33:38 EDT
please add steps to verify this bug
Comment 2 RHEL Product and Program Management 2012-07-10 02:21:12 EDT
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 Product and Program Management 2012-07-10 19:29:00 EDT
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 09:39:14 EDT
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 Galipeau 2012-09-20 07:41:10 EDT
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 14:41:04 EST
Verified using: ipa-server-3.0.0-22.el6.x86_64

Run results at:
Comment 11 errata-xmlrpc 2013-02-21 04:15:55 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.