Red Hat Bugzilla – Bug 866977
Inform user when ipa-upgradeconfig reports errors
Last modified: 2013-09-26 20:22:43 EDT
This bug is created as a clone of upstream ticket: https://fedorahosted.org/freeipa/ticket/3157 `ipa-upgradeconfig` may report errors when some part of the configuration upgrade process fails. However, the errors are not reported to user even though they may be important and user should follow on and investigate. Few examples of such error messages: {{{ root_logger.error('Cannot enable serial_autoincrement in %s: %s', ... root_logger.error('Cannot move CRL files to new directory: %s', e) }}} We should enable `stderr` for `ipa-upgradeconfig` in our `%post` scriptlet, just like we did with `ipa-ldap-updater`. The ''error'' level log messages would be then also reported to the user at least during RPM update. We also need to make sure that there is an actual log file with output of `ipa-upgradeconfig`.
Please provide steps to get into situation to get the errors described above
Test scenario: Target: Enter a low number of "connections" to named.conf file, which would then force the IPA upgrader to increase the number to make sure that bind-dyndb-ldap works. If we make the named.conf immutable, an error should be reported to user during RPM upgrade (as it is with plan "ipa-upgradeconfig" run). Procedure: 1) ipa-server-install --setup-dns 2) Edit named.conf and update bind-dyndb-ldap configuration: ... dynamic-db "ipa" { ... arg "connections 1"; }; 3) "chattr +i /etc/named.conf" # make /etc/named.conf immutable 4) Run RPM update - no error is reported or logged -> reproduced Clean up: "chattr -i /etc/named.conf" to enable modifications to named.conf again.
fixed upstream. master: a5ec992ed97d0f7c3c03ca6d1c54e2370d898526 ipa-3-0: 3488770fe98e2ed59b4611dfe356ba9b6f22a2b3
Verified. Version :: Automated Test Results (manually run):: ...installed rhel6.3, :: [ PASS ] :: Running 'sed -i '/dynamic-db "ipa"/,/\^}/ s/\(};\)/\targ "connections 1";\n\1/' /etc/named.conf' :: [ PASS ] :: Running 'chattr +i /etc/named.conf' [root@rhel6-1 ipa-upgrade]# upgrade_master 2>&1 | tee /tmp/upgrade_master.output123 :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: [ LOG ] :: upgrade_master: upgrade ipa master :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ...output truncated... [root@rhel6-1 ipa-upgrade]# cp /tmp/upgrade_master.output123 /tmp/upgade_master_bz_866977.out :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: [ LOG ] :: upgade_bz_866977_check: Inform user when ipa-upgradeconfig reports errors :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: [14:34:40] :: Machine in recipe is MASTER :: [ PASS ] :: File '/var/log/ipaupgrade.log' should contain 'ERROR Cannot update connections in /etc/named.conf:' :: [ PASS ] :: File '/tmp/upgade_master_bz_866977.out' should contain 'Cannot update connections in /etc/named.conf.*Permission denied' :: [ PASS ] :: BZ 866977 not found. result_server not set, assuming developer mode. Setting 192.168.122.61 to state upgade_bz_866977_check.5 :: [ PASS ] :: Running 'rhts-sync-set -s 'upgade_bz_866977_check.5' -m 192.168.122.61'
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. http://rhn.redhat.com/errata/RHSA-2013-0528.html