Created attachment 1129930 [details] Foreman-debug Description of problem: Version-Release number of selected component (if applicable): Satellite 6.1.7 How reproducible: Always Steps to Reproduce: Steps to reproduce: 1) yum -y install katello 2) katello-installer 3) cd /mnt/backup1 4) katello-backup . 5) cd ~ 6) katello-remove 7) yum -y install katello 8) katello-installer 9) cd /mnt/backup1 10) katello-restore . 11) Above error is produced. Actual results: Fails with returned 1: unable to load Private Key Expected results: Successful restore from backup. Additional info: Another attempt with --reset or --certs-skip-check results in the same error. yum -y install katello katello-installer --reset cd /mnt/backup1 katello-restore . I noticed that that is the command 'katello-installer --reset' is run in the katello-restore script, right after it applies the configuration to the system. if I go to the root of the system and untar the configuration files: cd / && tar xf /mnt/backup1/config_files.tar.gz then run the command that appears to be erroring: /usr/bin/openssl rsa -in /root/ssl-build/katello-default-ca.key -out /root/ssl-build/katello-default-ca.key.tmp -passin file:/etc/pki/katello/private/katello-default-ca.pwd It succeeds. Then when I try to run katello-installer again, or even capsule-certs-generate, the password file changes so that the command does not work anymore. [root@sat6 ~]# katello-installer --certs-skip-check /Stage[main]/Certs/Privkey[/etc/pki/katello/private/katello-default-ca.key]: Could not evaluate: Execution of '/usr/bin/openssl rsa -in /root/ssl-build/katello-default-ca.key -out /root/ssl-build/katello-default-ca.key.tmp -passin file:/etc/pki/katello/private/katello-default-ca.pwd' returned 1: unable to load Private Key /Stage[main]/Gutterball::Database/Postgresql::Server::Db[gutterball]/Postgresql::Server::Database[gutterball]/Exec[/usr/bin/createdb --port='5432' --owner='postgres' --template=template0 --encoding 'utf8' --locale=en_US.utf8 'gutterball']: Failed to call refresh: /usr/bin/createdb --port='5432' --owner='postgres' --template=template0 --encoding 'utf8' --locale=en_US.utf8 'gutterball' returned 1 instead of one of [0] /Stage[main]/Gutterball::Database/Postgresql::Server::Db[gutterball]/Postgresql::Server::Database[gutterball]/Exec[/usr/bin/createdb --port='5432' --owner='postgres' --template=template0 --encoding 'utf8' --locale=en_US.utf8 'gutterball']: /usr/bin/createdb --port='5432' --owner='postgres' --template=template0 --encoding 'utf8' --locale=en_US.utf8 'gutterball' returned 1 instead of one of [0]
Installed a satellite on RHEL 6/7 and did a backup and restore and this issue is not longer present in the 6.1.8 build. I also tested a 6.1.7 upgraded to 6.1.8 and then a restore and this did not happen. Moving to ON_QA - Chris Roberts
Blocked with https://bugzilla.redhat.com/show_bug.cgi?id=1331117. Due to BZ 1331117, this bug will be moved to failed state.
Version tested: Sat-6.2.beta-snap-9.3
Fixed in PR https://github.com/Katello/katello-packaging/pull/189
Verified in satellite-6.2.1-1.0.el7sat.noarch Verification steps: 1 mkdir mnt/backup 2 mkdir /mnt/backup 3 cd /mnt/backup/ 4 katello-backup . 5 katello-remove 6 rpm -qa | grep satellite 7 yum -y install satellite 8 satellite-installer --scenario=satellite 9 cd /mnt/backup/ 10 katello-restore . 11 echo $? (displayedc 0) Output log is attached in output.log for reference.
Created attachment 1189278 [details] console_output.log
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-2016:1615