Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 866977

Summary: Inform user when ipa-upgradeconfig reports errors
Product: Red Hat Enterprise Linux 6 Reporter: Dmitri Pal <dpal>
Component: ipaAssignee: Rob Crittenden <rcritten>
Status: CLOSED ERRATA QA Contact: Namita Soman <nsoman>
Severity: unspecified Docs Contact:
Priority: medium    
Version: 6.4CC: mkosek, spoore
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
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 09:28:18 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Dmitri Pal 2012-10-16 13:19:05 UTC
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 16:55:48 UTC
Please provide steps to get into situation to get the errors described above

Comment 2 Martin Kosek 2012-10-17 07:44:17 UTC
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 18:55:34 UTC
fixed upstream.

master: a5ec992ed97d0f7c3c03ca6d1c54e2370d898526

ipa-3-0: 3488770fe98e2ed59b4611dfe356ba9b6f22a2b3

Comment 6 Scott Poore 2013-01-15 20:38:02 UTC
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 09:28:18 UTC
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