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 812391 - IPA uninstall after upgrade returns some sysrestore.state errors
Summary: IPA uninstall after upgrade returns some sysrestore.state errors
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: ipa
Version: 6.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Rob Crittenden
QA Contact: IDM QE LIST
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-04-13 15:11 UTC by Scott Poore
Modified: 2013-10-07 18:55 UTC (History)
4 users (show)

Fixed In Version: ipa-2.2.0-10.el6
Doc Type: Bug Fix
Doc Text:
No documentation needed.
Clone Of:
Environment:
Last Closed: 2012-06-20 13:27:05 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2012:0819 0 normal SHIPPED_LIVE ipa bug fix and enhancement update 2012-06-19 20:34:17 UTC

Description Scott Poore 2012-04-13 15:11:33 UTC
Description of problem:

I'm seeing errors from the following after upgrading from 2.1.3-9 to 2.2.0-9:

# ipa-server-install --uninstall -U
Shutting down all IPA services
Removing IPA client configuration
Unconfiguring ntpd
Unconfiguring CA directory server
Unconfiguring CA
Unconfiguring named
Unconfiguring web server
Unconfiguring krb5kdc
Unconfiguring directory server
Unconfiguring ipa_memcached
ipa         : ERROR    Some installation state for dirsrv has not been restored, see /var/lib/ipa/sysrestore/sysrestore.state
ipa         : ERROR    Some installation state for pkids has not been restored, see /var/lib/ipa/sysrestore/sysrestore.state


Version-Release number of selected component (if applicable):
initial 6.2 build with IPA 2.1.3:
ipa-server-2.1.3-9.el6.x86_64
389-ds-base-1.2.9.14-1.el6.x86_64

Updraded to 2.2.0:
ipa-server-2.2.0-9.el6.x86_64
389-ds-base-1.2.10.2-6.el6.x86_64

How reproducible:
Seems to be very to always reproducible.

Steps to Reproduce:
1.  <configure 2.1.3 IPA server on RHEL6.2>
2.  <add repoconfig for RHEL6.3 and 2.2.0-9>
3.  yum update 'ipa*'
4.  <add some data user-add, host-add, etc>
5.  ipa-server-install --uninstall -U
  
Actual results:

Errors seen from output:
# ipa-server-install --uninstall -U
Shutting down all IPA services
Removing IPA client configuration
Unconfiguring ntpd
Unconfiguring CA directory server
Unconfiguring CA
Unconfiguring named
Unconfiguring web server
Unconfiguring krb5kdc
Unconfiguring directory server
Unconfiguring ipa_memcached
ipa         : ERROR    Some installation state for dirsrv has not been restored, see /var/lib/ipa/sysrestore/sysrestore.state
ipa         : ERROR    Some installation state for pkids has not been restored, see /var/lib/ipa/sysrestore/sysrestore.state



Expected results:

No errors seen.

Additional info:

/var/log/ipaserver-uninstall.log has this at the end which reflects also what was seen on command output:

2012-04-13T14:42:18Z DEBUG Saving Index File to '/var/lib/ipa/sysrestore/sysrestore.index'
2012-04-13T14:42:18Z DEBUG   -> no files, removing file
2012-04-13T14:42:18Z DEBUG Loading StateFile from '/var/lib/ipa/sysrestore/sysrestore.state'
2012-04-13T14:42:18Z DEBUG Saving StateFile to '/var/lib/ipa/sysrestore/sysrestore.state'
2012-04-13T14:42:18Z DEBUG args=/sbin/chkconfig ipa off
2012-04-13T14:42:18Z DEBUG stdout=
2012-04-13T14:42:18Z DEBUG stderr=
2012-04-13T14:42:18Z ERROR Some installation state for dirsrv has not been restored, see /var/lib/ipa/sysrestore/sysrestore.state
2012-04-13T14:42:18Z ERROR Some installation state for pkids has not been restored, see /var/lib/ipa/sysrestore/sysrestore.state
2012-04-13T14:42:18Z WARNING Some installation state has not been restored.
This will cause re-installation to fail.
It should be safe to remove /var/lib/ipa/sysrestore.state but it may
mean your system hasn't be restored to its pre-installation state.

Comment 1 Rob Crittenden 2012-04-13 15:19:09 UTC
Upstream ticket:
https://fedorahosted.org/freeipa/ticket/2637

Comment 2 Rob Crittenden 2012-04-13 15:20:17 UTC
I think this is related to the fix for the shutdown problem on uninstall.

Comment 4 Scott Poore 2012-04-13 15:32:33 UTC
Could be.  I don't think I saw this until 2.2.0-9 but, I'd have to go back and check -8 or older to confirm that.

FYI, I didn't see this issue when I tried against a fresh 2.2.0-9 install.   Only after upgrading from 2.1.3.

Need me to test against -8 or older and do you need any logs uploaded?

Comment 5 Martin Kosek 2012-04-17 09:31:14 UTC
Fixed upstream:
master: https://fedorahosted.org/freeipa/changeset/9c39f95f2174d8197102080314eab7a10cf8c86c
ipa-2-2: https://fedorahosted.org/freeipa/changeset/d4350c05badd20f69de5d782850cd26b9128889a

To reproduce it, one just need to upgrade from ipa-server where "running" state was used (before a fix for Bug 801376 was in, i.e. before ipa-2.2.0-9.el6) to current ipa-server and then run --uninstall.

Comment 8 Scott Poore 2012-04-20 00:40:44 UTC
Verified.

Version :: ipa-server-2.2.0-10.el6.x86_64

Automated Test Results ::

# ipa_uninstall_master 

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: ipa_uninstall_master: Uninstall IPA Master software
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [19:18:41] ::  Machine in recipe is MASTER
Shutting down all IPA services
Removing IPA client configuration
Unconfiguring ntpd
Unconfiguring CA directory server
Unconfiguring CA
Unconfiguring named
Unconfiguring web server
Unconfiguring krb5kdc
Unconfiguring directory server
Unconfiguring ipa_memcached
:: [   PASS   ] :: Running 'ipa-server-install --uninstall -U'
...output truncated as this shows no error here...

# upgrade_bz_812391 

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: upgrade_bz_812391: IPA uninstall after upgrade returns some sysrestore.state errors
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [19:32:20] ::  Machine in recipe is MASTER
:: [19:32:20] ::  Checking ipaserver-uninstall.log on MASTER (spoore-dvm1.example.com) for BZ 812391 Errors
:: [   PASS   ] :: BZ 812391 not found...installation state errors not found in ipaserver-uninstall.log
...truncated excess...

Manual Test Results ::
# grep ERROR /var/log/ipaserver-uninstall.log

# grep state /var/log/ipaserver-uninstall.log
2012-04-20T00:18:41Z DEBUG Loading StateFile from '/var/lib/ipa/sysrestore/sysrestore.state'
2012-04-20T00:19:37Z DEBUG Loading StateFile from '/var/lib/ipa/sysrestore/sysrestore.state'
2012-04-20T00:19:37Z DEBUG Saving StateFile to '/var/lib/ipa/sysrestore/sysrestore.state'
2012-04-20T00:19:37Z DEBUG Saving StateFile to '/var/lib/ipa/sysrestore/sysrestore.state'
2012-04-20T00:19:37Z DEBUG Loading StateFile from '/var/lib/ipa/sysrestore/sysrestore.state'
2012-04-20T00:19:37Z DEBUG Loading StateFile from '/var/lib/ipa/sysrestore/sysrestore.state'
2012-04-20T00:19:37Z DEBUG Saving StateFile to '/var/lib/ipa/sysrestore/sysrestore.state'
2012-04-20T00:19:37Z DEBUG Saving StateFile to '/var/lib/ipa/sysrestore/sysrestore.state'
2012-04-20T00:19:42Z DEBUG Saving StateFile to '/var/lib/ipa/sysrestore/sysrestore.state'
2012-04-20T00:19:42Z DEBUG Loading StateFile from '/var/lib/ipa/sysrestore/sysrestore.state'
2012-04-20T00:19:42Z DEBUG Loading StateFile from '/var/lib/ipa/sysrestore/sysrestore.state'
2012-04-20T00:19:42Z DEBUG Saving StateFile to '/var/lib/ipa/sysrestore/sysrestore.state'
2012-04-20T00:19:56Z DEBUG Saving StateFile to '/var/lib/ipa/sysrestore/sysrestore.state'
2012-04-20T00:19:56Z DEBUG Loading StateFile from '/var/lib/ipa/sysrestore/sysrestore.state'
2012-04-20T00:19:56Z DEBUG Saving StateFile to '/var/lib/ipa/sysrestore/sysrestore.state'
2012-04-20T00:19:56Z DEBUG Saving StateFile to '/var/lib/ipa/sysrestore/sysrestore.state'
2012-04-20T00:19:56Z DEBUG Saving StateFile to '/var/lib/ipa/sysrestore/sysrestore.state'
2012-04-20T00:19:56Z DEBUG Saving StateFile to '/var/lib/ipa/sysrestore/sysrestore.state'
2012-04-20T00:19:56Z DEBUG Saving StateFile to '/var/lib/ipa/sysrestore/sysrestore.state'
2012-04-20T00:19:56Z DEBUG Saving StateFile to '/var/lib/ipa/sysrestore/sysrestore.state'
2012-04-20T00:19:56Z DEBUG Saving StateFile to '/var/lib/ipa/sysrestore/sysrestore.state'
2012-04-20T00:19:56Z DEBUG Saving StateFile to '/var/lib/ipa/sysrestore/sysrestore.state'
2012-04-20T00:19:56Z DEBUG Saving StateFile to '/var/lib/ipa/sysrestore/sysrestore.state'
2012-04-20T00:19:56Z DEBUG Saving StateFile to '/var/lib/ipa/sysrestore/sysrestore.state'
2012-04-20T00:19:57Z DEBUG Loading StateFile from '/var/lib/ipa/sysrestore/sysrestore.state'
2012-04-20T00:19:57Z DEBUG Saving StateFile to '/var/lib/ipa/sysrestore/sysrestore.state'
2012-04-20T00:19:57Z DEBUG Saving StateFile to '/var/lib/ipa/sysrestore/sysrestore.state'
2012-04-20T00:20:02Z DEBUG Saving StateFile to '/var/lib/ipa/sysrestore/sysrestore.state'
2012-04-20T00:20:31Z DEBUG Saving StateFile to '/var/lib/ipa/sysrestore/sysrestore.state'
2012-04-20T00:21:00Z DEBUG Loading StateFile from '/var/lib/ipa/sysrestore/sysrestore.state'
2012-04-20T00:21:00Z DEBUG Saving StateFile to '/var/lib/ipa/sysrestore/sysrestore.state'
2012-04-20T00:21:00Z DEBUG Saving StateFile to '/var/lib/ipa/sysrestore/sysrestore.state'
2012-04-20T00:21:01Z DEBUG Loading StateFile from '/var/lib/ipa/sysrestore/sysrestore.state'
2012-04-20T00:21:01Z DEBUG Loading StateFile from '/var/lib/ipa/sysrestore/sysrestore.state'
2012-04-20T00:21:01Z DEBUG Saving StateFile to '/var/lib/ipa/sysrestore/sysrestore.state'
2012-04-20T00:21:01Z DEBUG Saving StateFile to '/var/lib/ipa/sysrestore/sysrestore.state'
2012-04-20T00:21:01Z DEBUG Saving StateFile to '/var/lib/ipa/sysrestore/sysrestore.state'
2012-04-20T00:21:05Z DEBUG Saving StateFile to '/var/lib/ipa/sysrestore/sysrestore.state'
2012-04-20T00:21:05Z DEBUG Loading StateFile from '/var/lib/ipa/sysrestore/sysrestore.state'
2012-04-20T00:21:05Z DEBUG Saving StateFile to '/var/lib/ipa/sysrestore/sysrestore.state'
2012-04-20T00:21:05Z DEBUG Saving StateFile to '/var/lib/ipa/sysrestore/sysrestore.state'
2012-04-20T00:21:05Z DEBUG Loading StateFile from '/var/lib/ipa/sysrestore/sysrestore.state'
2012-04-20T00:21:05Z DEBUG Saving StateFile to '/var/lib/ipa/sysrestore/sysrestore.state'

# grep restored /var/log/ipaserver-uninstall.log

# grep dirsrv /var/log/ipaserver-uninstall.log
2012-04-20T00:18:41Z DEBUG /usr/sbin/ipa-server-install was invoked with options: {'zone_refresh': 30, 'reverse_zone': None, 'realm_name': None, 'create_sshfp': True, 'conf_sshd': True, 'conf_ntp': True, 'subject': None, 'no_forwarders': False, 'ui_redirect': True, 'domain_name': None, 'idmax': 0, 'hbac_allow': False, 'no_reverse': False, 'dirsrv_pkcs12': None, 'unattended': True, 'selfsign': False, 'trust_sshfp': False, 'external_ca_file': None, 'no_host_dns': False, 'http_pkcs12': None, 'forwarders': None, 'idstart': 1032200000, 'external_ca': False, 'ip_address': None, 'zonemgr': None, 'setup_dns': False, 'host_name': None, 'debug': False, 'external_cert_file': None, 'uninstall': True}
Shutting down dirsrv: 
2012-04-20T00:21:01Z DEBUG Restoring system configuration file '/etc/sysconfig/dirsrv'
2012-04-20T00:21:01Z DEBUG args=/sbin/restorecon /etc/sysconfig/dirsrv
2012-04-20T00:21:01Z DEBUG args=/sbin/chkconfig dirsrv off

Comment 10 Martin Kosek 2012-04-25 11:55:07 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
No documentation needed.

Comment 12 errata-xmlrpc 2012-06-20 13:27:05 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/RHBA-2012-0819.html


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