Bug 1131187
Summary: | ipa-ldap-upgrade should restore Directory Server settings when upgrade fails | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Martin Kosek <mkosek> |
Component: | ipa | Assignee: | Martin Kosek <mkosek> |
Status: | CLOSED ERRATA | QA Contact: | Namita Soman <nsoman> |
Severity: | unspecified | Docs Contact: | |
Priority: | medium | ||
Version: | 7.0 | CC: | jgalipea, mkosek, nhosoi, nkinder, pviktori, rcritten, rmeggins, spoore, sramling, tlavigne |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | ipa-4.1.0-0.1.alpha1.el7 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | 1130252 | Environment: | |
Last Closed: | 2015-03-05 10:13:22 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | 1130252 | ||
Bug Blocks: |
Description
Martin Kosek
2014-08-18 15:55:04 UTC
Upstream ticket: https://fedorahosted.org/freeipa/ticket/4499 Fixed upstream master: https://fedorahosted.org/freeipa/changeset/9a188607fcf68721fc8c38c3c73ee02cac76b58a ipa-4-1: https://fedorahosted.org/freeipa/changeset/b333e7adc98ff7c5335fbc7ce1bde5b9dfb3f5ef Additional fix to not display error in SystemError(0) case. master: https://fedorahosted.org/freeipa/changeset/f86618623964f9a97244ce08117c575b200a34af ipa-4-1: https://fedorahosted.org/freeipa/changeset/540f4166e45752ae74f652f66eec9b92413a5d1e Is this change just a change in error output? How can I test this? Any thoughts on how to force an upgrade failure? I personally just run [CTRL+C] combo during ipa-ldap-upgrade or did a direct update of the script to break. With the updated code, you should see that ipa-ldap-upgrade catches the failure and cleans up. CCing Petr Viktorin, maybe he had a more sophisticated reproduction method. Verified. Version :: ---> Package ipa-server.x86_64 0:3.3.3-28.el7 will be updated ---> Package ipa-server.x86_64 0:4.1.0-13.el7 will be an update Results :: using CTRL+C during yum update, I see it error, traceback, and cleanup in ipaupgade.log: 2015-01-15T19:33:06Z DEBUG Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/ipaserver/install/service.py", line 382, in start_creation run_step(full_msg, method) File "/usr/lib/python2.7/site-packages/ipaserver/install/service.py", line 372, in run_step method() File "/usr/lib/python2.7/site-packages/ipaserver/install/upgradeinstance.py", line 145, in __update_schema dm_password='', ldapi=True, live_run=self.live_run) or self.modified File "/usr/lib/python2.7/site-packages/ipaserver/install/schemaupdate.py", line 167, in update_schema conn.update_entry(schema_entry) File "/usr/lib/python2.7/site-packages/ipapython/ipaldap.py", line 1628, in update_entry self.conn.modify_s(entry.dn, modlist) File "/usr/lib/python2.7/site-packages/ipapython/ipaldap.py", line 560, in modify_s return self.conn.modify_s(dn, modlist) File "/usr/lib64/python2.7/site-packages/ldap/ldapobject.py", line 357, in modify_s return self.result(msgid,all=1,timeout=self.timeout) File "/usr/lib64/python2.7/site-packages/ldap/ldapobject.py", line 458, in result resp_type, resp_data, resp_msgid = self.result2(msgid,all,timeout) File "/usr/lib64/python2.7/site-packages/ldap/ldapobject.py", line 462, in result2 resp_type, resp_data, resp_msgid, resp_ctrls = self.result3(msgid,all,timeout) File "/usr/lib64/python2.7/site-packages/ldap/ldapobject.py", line 469, in result3 resp_ctrl_classes=resp_ctrl_classes File "/usr/lib64/python2.7/site-packages/ldap/ldapobject.py", line 476, in result4 ldap_result = self._ldap_call(self._l.result4,msgid,all,timeout,add_ctrls,add_intermediates,add_extop) File "/usr/lib64/python2.7/site-packages/ldap/ldapobject.py", line 99, in _ldap_call result = func(*args,**kwargs) KeyboardInterrupt 2015-01-15T19:33:06Z DEBUG [error] KeyboardInterrupt: 2015-01-15T19:33:06Z DEBUG [cleanup]: stopping directory server 2015-01-15T19:33:06Z DEBUG Starting external process 2015-01-15T19:33:06Z DEBUG args='/bin/systemctl' 'stop' 'dirsrv' 2015-01-15T19:33:08Z DEBUG Process finished, return code=0 2015-01-15T19:33:08Z DEBUG stdout= 2015-01-15T19:33:08Z DEBUG stderr= 2015-01-15T19:33:08Z DEBUG duration: 1 seconds 2015-01-15T19:33:08Z DEBUG [cleanup]: restoring configuration 2015-01-15T19:33:08Z DEBUG Saving StateFile to '/var/lib/ipa/sysrestore/sysrestore.state' 2015-01-15T19:33:08Z DEBUG Saving StateFile to '/var/lib/ipa/sysrestore/sysrestore.state' 2015-01-15T19:33:08Z DEBUG duration: 0 seconds 2015-01-15T19:33:08Z DEBUG File "/usr/lib/python2.7/site-packages/ipapython/admintool.py", line 171, in execute return_value = self.run() File "/usr/lib/python2.7/site-packages/ipaserver/install/ipa_ldap_updater.py", line 144, in run upgrade.create_instance() File "/usr/lib/python2.7/site-packages/ipaserver/install/upgradeinstance.py", line 93, in create_instance show_service_name=False) File "/usr/lib/python2.7/site-packages/ipaserver/install/service.py", line 382, in start_creation run_step(full_msg, method) File "/usr/lib/python2.7/site-packages/ipaserver/install/service.py", line 372, in run_step method() File "/usr/lib/python2.7/site-packages/ipaserver/install/upgradeinstance.py", line 145, in __update_schema dm_password='', ldapi=True, live_run=self.live_run) or self.modified File "/usr/lib/python2.7/site-packages/ipaserver/install/schemaupdate.py", line 167, in update_schema conn.update_entry(schema_entry) File "/usr/lib/python2.7/site-packages/ipapython/ipaldap.py", line 1628, in update_entry self.conn.modify_s(entry.dn, modlist) File "/usr/lib/python2.7/site-packages/ipapython/ipaldap.py", line 560, in modify_s return self.conn.modify_s(dn, modlist) File "/usr/lib64/python2.7/site-packages/ldap/ldapobject.py", line 357, in modify_s return self.result(msgid,all=1,timeout=self.timeout) File "/usr/lib64/python2.7/site-packages/ldap/ldapobject.py", line 458, in result resp_type, resp_data, resp_msgid = self.result2(msgid,all,timeout) File "/usr/lib64/python2.7/site-packages/ldap/ldapobject.py", line 462, in result2 resp_type, resp_data, resp_msgid, resp_ctrls = self.result3(msgid,all,timeout) File "/usr/lib64/python2.7/site-packages/ldap/ldapobject.py", line 469, in result3 resp_ctrl_classes=resp_ctrl_classes File "/usr/lib64/python2.7/site-packages/ldap/ldapobject.py", line 476, in result4 ldap_result = self._ldap_call(self._l.result4,msgid,all,timeout,add_ctrls,add_intermediates,add_extop) File "/usr/lib64/python2.7/site-packages/ldap/ldapobject.py", line 99, in _ldap_call result = func(*args,**kwargs) 2015-01-15T19:33:08Z DEBUG The ipa-ldap-updater command failed, exception: KeyboardInterrupt: 2015-01-15T19:33:08Z ERROR Cancelled. Petr, Do you have a better way to test this? Something I might be able to use in test automation? Thanks, Scott Unfortunately I don't. This is handling of unknown errors, if an error was known it would be fixed elsewhere. I tested the same way as Martin, Ctrl+C or modifying the code itself. 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. https://rhn.redhat.com/errata/RHSA-2015-0442.html |