Red Hat Bugzilla – Bug 1443869
Command "openssl pkcs12 ..." failed during IPA upgrade
Last modified: 2017-08-01 05:48:56 EDT
Description of problem: IPA upgrade fails for latest ipa package (ipa-4.5.0-7.el7) Version-Release number of selected component (if applicable): ipa-4.5.0-7.el7 How reproducible: Always Steps to Reproduce: 1. Setup IPA-server at RHEL 7.3(GA) (In my case IPA server is setup in Permissive mode) 2. Use the latest repo links for RHEL 7.4 3. Update the ipa server by executing commands: # yum -y update 'ipa*' sssd selinux-policy Actual results: 1. After step3, following message is noticed for yum update process: Cleanup : libsss_nss_idmap-1.14.0-43.el7.x86_64 142/144 Cleanup : libsss_autofs-1.14.0-43.el7.x86_64 143/144 Cleanup : libsss_sudo-1.14.0-43.el7.x86_64 144/144 Default SMB Group not found Upgrade failed with Command '/usr/bin/openssl pkcs12 -in /etc/httpd/alias/tmpqQQDV9 -nocerts -nodes -out /var/lib/ipa/ra-agent.key -passin file:/tmp/tmp0P7Wbq' returned non-zero exit status 1 IPA server upgrade failed: Inspect /var/log/ipaupgrade.log and run command ipa-server-upgrade manually. ('IPA upgrade failed.', 1) The ipa-server-upgrade command failed. See /var/log/ipaupgrade.log for more information http://<repo-server-link-details>/: [Errno 14] curl#6 - "Could not resolve host: <repo-server-hostname>; Unknown error" Trying other mirror. Verifying : nss-tools-3.28.3-5.el7.x86_64 1/144 2. Following error noticed inside ipaupgrade.log. 2017-04-20T06:30:06Z ERROR Upgrade failed with Command '/usr/bin/openssl pkcs12 -in /etc/httpd/alias/tmpqQQDV9 -nocerts -nodes -out /var/lib/ipa/ra-agent.key -passin file:/tmp/tmp0P7Wbq' returned non-zero exit status 1 2017-04-20T06:30:06Z DEBUG Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/ipaserver/install/upgradeinstance.py", line 220, in __upgrade self.modified = (ld.update(self.files) or self.modified) File "/usr/lib/python2.7/site-packages/ipaserver/install/ldapupdate.py", line 911, in update self._run_updates(all_updates) File "/usr/lib/python2.7/site-packages/ipaserver/install/ldapupdate.py", line 883, in _run_updates self._run_update_plugin(update['plugin']) File "/usr/lib/python2.7/site-packages/ipaserver/install/ldapupdate.py", line 859, in _run_update_plugin restart_ds, updates = self.api.Updater[plugin_name]() File "/usr/lib/python2.7/site-packages/ipalib/frontend.py", line 1470, in __call__ return self.execute(**options) File "/usr/lib/python2.7/site-packages/ipaserver/install/plugins/update_ra_cert_store.py", line 57, in execute ca.import_ra_cert(p12file) File "/usr/lib/python2.7/site-packages/ipaserver/install/cainstance.py", line 698, in import_ra_cert "-passin", pwdarg]) File "/usr/lib/python2.7/site-packages/ipapython/ipautil.py", line 495, in run raise CalledProcessError(p.returncode, arg_string, str(output)) CalledProcessError: Command '/usr/bin/openssl pkcs12 -in /etc/httpd/alias/tmpqQQDV9 -nocerts -nodes -out /var/lib/ipa/ra-agent.key -passin file:/tmp/tmp0P7Wbq' returned non-zero exit status 1 2017-04-20T06:30:06Z DEBUG Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/ipaserver/install/service.py", line 423, in start_creation run_step(full_msg, method) File "/usr/lib/python2.7/site-packages/ipaserver/install/service.py", line 413, in run_step method() File "/usr/lib/python2.7/site-packages/ipaserver/install/upgradeinstance.py", line 228, in __upgrade raise RuntimeError(e) RuntimeError: Command '/usr/bin/openssl pkcs12 -in /etc/httpd/alias/tmpqQQDV9 -nocerts -nodes -out /var/lib/ipa/ra-agent.key -passin file:/tmp/tmp0P7Wbq' returned non-zero exit status 1 2017-04-20T06:30:06Z DEBUG [error] RuntimeError: Command '/usr/bin/openssl pkcs12 -in /etc/httpd/alias/tmpqQQDV9 -nocerts -nodes -out /var/lib/ipa/ra-agent.key -passin file:/tmp/tmp0P7Wbq' returned non-zero exit status 1 2017-04-20T06:30:06Z DEBUG [cleanup]: stopping directory server 2017-04-20T06:30:06Z DEBUG Destroyed connection context.ldap2_70086416 2017-04-20T06:30:06Z DEBUG Starting external process 2017-04-20T06:30:06Z DEBUG args=/bin/systemctl stop dirsrv@TESTRELM-TEST.service 2017-04-20T06:30:06Z DEBUG Process finished, return code=0 2017-04-20T06:30:06Z DEBUG stdout= 2017-04-20T06:30:06Z DEBUG stderr= 2017-04-20T06:30:06Z DEBUG duration: 0 seconds 2017-04-20T06:30:06Z DEBUG [cleanup]: restoring configuration 2017-04-20T06:30:06Z DEBUG Loading StateFile from '/var/lib/ipa/sysrestore/sysrestore.state' 2017-04-20T06:30:06Z DEBUG Loading StateFile from '/var/lib/ipa/sysrestore/sysrestore.state' 2017-04-20T06:30:06Z DEBUG Saving StateFile to '/var/lib/ipa/sysrestore/sysrestore.state' 2017-04-20T06:30:06Z DEBUG Loading StateFile from '/var/lib/ipa/sysrestore/sysrestore.state' 2017-04-20T06:30:06Z DEBUG Loading StateFile from '/var/lib/ipa/sysrestore/sysrestore.state' 2017-04-20T06:30:06Z DEBUG Saving StateFile to '/var/lib/ipa/sysrestore/sysrestore.state' 2017-04-20T06:30:06Z DEBUG Loading StateFile from '/var/lib/ipa/sysrestore/sysrestore.state' 2017-04-20T06:30:06Z DEBUG duration: 0 seconds 2017-04-20T06:30:06Z ERROR IPA server upgrade failed: Inspect /var/log/ipaupgrade.log and run command ipa-server-upgrade manually. 2017-04-20T06:30:06Z DEBUG File "/usr/lib/python2.7/site-packages/ipapython/admintool.py", line 172, in execute return_value = self.run() File "/usr/lib/python2.7/site-packages/ipaserver/install/ipa_server_upgrade.py", line 48, in run raise admintool.ScriptError(str(e)) 2017-04-20T06:30:06Z DEBUG The ipa-server-upgrade command failed, exception: ScriptError: ('IPA upgrade failed.', 1) 2017-04-20T06:30:06Z ERROR ('IPA upgrade failed.', 1) 2017-04-20T06:30:06Z ERROR The ipa-server-upgrade command failed. See /var/log/ipaupgrade.log for more information 3. Also ipactl command failed after upgrade: root@auto-hv-01-guest09 ~]# ipactl status Directory Service: STOPPED Directory Service must be running in order to obtain status of other services ipa: INFO: The ipactl command was successful [root@auto-hv-01-guest09 ~]# ipactl restart Upgrade required: please run ipa-server-upgrade command Aborting ipactl [root@auto-hv-01-guest09 ~]# Expected results: IPA-upgrade process should complete successfully without any errors. Additional Information: For upgrade from 7.3.z to 7.4 separate bug it logged BZ#1442740
Fixed upstream master: https://pagure.io/freeipa/c/b38750eaa82025aad56f8eca849f47775b2cbc75 ipa-4-5: https://pagure.io/freeipa/c/e3f2878909c1f92a0d92ed2a8ce00c96135e1346
IPA server version: ipa-4.5.0-8.el7 nss: 3.28.4.2.el7 Tested the bug with following steps: 1.Tested that we are able to upgrade IPA -server and the issue mentioned inside the bug is not observed anymore. 2. Tested the bug for following upgrade paths: - 7.3(GA) > 7.4 - 7.3.z > 7.4 Thus marking the status of this bug to "VERIFIED"
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://access.redhat.com/errata/RHBA-2017:2304