Bug 812391 - IPA uninstall after upgrade returns some sysrestore.state errors
IPA uninstall after upgrade returns some sysrestore.state errors
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: ipa (Show other bugs)
6.3
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Rob Crittenden
IDM QE LIST
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-04-13 11:11 EDT by Scott Poore
Modified: 2013-10-07 14:55 EDT (History)
4 users (show)

See Also:
Fixed In Version: ipa-2.2.0-10.el6
Doc Type: Bug Fix
Doc Text:
No documentation needed.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-06-20 09:27:05 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Scott Poore 2012-04-13 11:11:33 EDT
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 11:19:09 EDT
Upstream ticket:
https://fedorahosted.org/freeipa/ticket/2637
Comment 2 Rob Crittenden 2012-04-13 11:20:17 EDT
I think this is related to the fix for the shutdown problem on uninstall.
Comment 4 Scott Poore 2012-04-13 11:32:33 EDT
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 05:31:14 EDT
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-19 20:40:44 EDT
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 07:55:07 EDT
    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 09:27:05 EDT
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.