#2850 Ipactl exception not handled well in ipactl
Closed: Fixed None Opened 11 years ago by rcritten.

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'>

I figured out how it got into this state. I accidentally updated to 389-ds-base 1.2.11.

Need steps to reproduce.

patch posted

[PATCH 80] Ticket #2850 - Ipactl exception not handled well

Moving closed RC1 tickets to Beta 3.

Metadata Update from @rcritten:
- Issue assigned to jdennis
- Issue set to the milestone: FreeIPA 3.0 Beta 3

7 years ago

Login to comment on this ticket.

Metadata