#1715 IPA does not always properly detect its configuration status
Closed: Fixed None Opened 12 years ago by rcritten.

https://bugzilla.redhat.com/show_bug.cgi?id=733436

Description of problem:

The RHEV-M team reports a problem when installing their product, uninstalling it and the rpms, then re-installing it:

2011-08-24 16:34:03::DEBUG::rhevm-setup::2035::root:: checking IPA installation status
2011-08-24 16:34:03::DEBUG::common_utils::164::root:: cmd = /sbin/service ipa status
2011-08-24 16:34:03::DEBUG::common_utils::169::root:: output =
2011-08-24 16:34:03::DEBUG::common_utils::170::root:: stderr = IPA is not configured (see man pages of ipa-server-install for help)

2011-08-24 16:34:03::DEBUG::common_utils::171::root:: retcode = 4

The install later fails with:

An existing Directory Server has been detected.

Only a single Directory Server instance is allowed on an IPA
server, the one used by IPA itself.

Version-Release number of selected component (if applicable):

ipa-server-2.0.0-23.el6

So here is what we should do for this ticket:

Any leftover item from the old install of:

  • IPA
  • DS
  • CS
  • whatever we care about...

that we check on the install that can prevent a successful install should be checked on the uninstall and an appropriate remediation should be provided.
It can be backing up or removing depending upon the situation but the bottom line is that the uninstall should allow the system to be brought into the compliance with the install requirements regarding cleanness of the system.

This ticket does NOT cover other reasons like DNS and hostname resolution that can prevent IPA from successful installation and functioning.

It should also log the name (location) of the DS instance(s) it finds already installed.

I don't think the uninstaller should be responsible for hosing down the system, just for undoing what was installed.

We can do some sanity checking on uninstallation and do things like:

  • show any 389-ds instances that exist (it is possible to set one up post-IPA)
  • show any stored state in the IPA server uninstall that wasn't restored
  • same with IPA client state
  • unify the "is IPA configured" routines.

These may require some user intervention to resolve but this could be dangerous if we did it automatically.

This is fine as long as the user is told what to do to resolve the issue manually and there is an error code that a calling script might want to catch to determine whether to attempt the install or not. Then for cases when IPA is embedded into a bigger project (especially in beta cases) we should recommend running uninstall first and checking this code.

Some possible ways to test this:

Positive tests:
- install
- uninstall
- exit status = 0, no warnings

Negative tests:
- install
- Add some state (can be any name=value pair) to /var/lib/ipa/sysrestore/sysrestore.state
- uninstall, should get warning about state, rv = 1

- install
- Add a tracked file to /var/lib/ipa/sysrestore/sysrestore.index
- uninstall, should get warning about file, rv = 1

- install
- set up a new 389-ds instance
- uninstall
- Should get warning about existing 389-ds preventing re-instlal, rv = 1

Metadata Update from @rcritten:
- Issue assigned to rcritten
- Issue set to the milestone: FreeIPA 2.1.1 (bug fixing)

7 years ago

Login to comment on this ticket.

Metadata