Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 866977 - Inform user when ipa-upgradeconfig reports errors
Inform user when ipa-upgradeconfig reports errors
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: ipa (Show other bugs)
6.4
Unspecified Unspecified
medium Severity unspecified
: rc
: ---
Assigned To: Rob Crittenden
Namita Soman
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-16 09:19 EDT by Dmitri Pal
Modified: 2013-09-26 20:22 EDT (History)
2 users (show)

See Also:
Fixed In Version: ipa-3.0.0-6.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-02-21 04:28:18 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2013:0528 normal SHIPPED_LIVE Low: ipa security, bug fix and enhancement update 2013-02-21 03:22:21 EST

  None (edit)
Description Dmitri Pal 2012-10-16 09:19:05 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`.
Comment 1 Namita Soman 2012-10-16 12:55:48 EDT
Please provide steps to get into situation to get the errors described above
Comment 2 Martin Kosek 2012-10-17 03:44:17 EDT
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.
Comment 3 Rob Crittenden 2012-10-19 14:55:34 EDT
fixed upstream.

master: a5ec992ed97d0f7c3c03ca6d1c54e2370d898526

ipa-3-0: 3488770fe98e2ed59b4611dfe356ba9b6f22a2b3
Comment 6 Scott Poore 2013-01-15 15:38:02 EST
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'
Comment 8 errata-xmlrpc 2013-02-21 04:28:18 EST
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

Note You need to log in before you can comment on or make changes to this bug.