#1980 ipa-server-install does not clean after itself
Closed: Fixed None Opened 12 years ago by mkosek.

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

Description of problem:

Under some circumstances we update some files (/etc/hosts/ in that case) before
the actual installation begins. If the user then interrupts the installation
after the change the actual installation starts, he may be surprised that he
ends up with partially configured system.

This means that he has to run ipa-server-install --uninstall before he can run
ipa-server-install again.

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

ipa-server-2.1.1-101.20111004T0103zgita013597.el6.x86_64

How reproducible:

Run ipa-server-install so that /etc/hosts is updated (this happens when the
hostname is not resolvable and we install with --setup-dns or --no-host-dns):

# ipa-server-install -p secret123 -a secret123 --setup-dns --forwarder=1.2.3.4
--hostname=ipa.example.com

The log file for this installation can be found in
/var/log/ipaserver-install.log
==============================================================================
This program will set up the IPA Server.

This includes:
  * Configure the Network Time Daemon (ntpd)
  * Create and configure an instance of Directory Server
  * Create and configure a Kerberos Key Distribution Center (KDC)
  * Configure Apache (httpd)
  * Configure DNS (bind)

To accept the default shown in brackets, press the Enter key.

Existing BIND configuration detected, overwrite? [no]: y
Enter the fully qualified domain name of the computer
on which you're setting up server software. Using the form
<hostname>.<domainname>
Example: master.example.com.


Server host name [ipa.example.com]:

Warning: The host name 'ipa.example.com' does not match the system host name
'vm-063.idm.lab.bos.redhat.com'.
         Some services may not work properly.
Warning: skipping DNS resolution of host ipa.example.com
The domain name has been calculated based on the host name.

Please confirm the domain name [example.com]:

Unable to resolve IP address for host name
Please provide the IP address to be used for this host name: 10.16.78.63
Adding [10.16.78.63 ipa.example.com] to your /etc/hosts file
The IPA Master Server will be configured with
Hostname:    ipa.example.com
IP address:  10.16.78.63
Domain name: example.com

The kerberos protocol requires a Realm name to be defined.
This is typically the domain name converted to uppercase.

Please provide a realm name [EXAMPLE.COM]: [CTRL+C] was hit
Cleaning up...

Now, we cannot run installer again.

# ipa-server-install

The log file for this installation can be found in
/var/log/ipaserver-install.log
IPA server is already configured on this system.
If you want to reinstall the IPA server please uninstall it first.


Steps to Reproduce:
1. ipa-server-install -p secret123 -a secret123 --setup-dns --forwarder=1.2.3.4
--hostname=ipa.example.com
2. Interrupt the wizard after the IP address is passed to the installer (see
example above)
3. Try running ipa-server-install again

Actual results:
You have to run ipa-server-install --uninstall before you can try installing
again

Expected results:
ipa-server-install cleans up /etc/hosts  if the installation was interrupted or
exited with an error before it actually started configuring services so that
user can execute a second run of ipa-server-install without need of
uninstalling it first.

Additional info:

Patch freeipa-mkosek-161-make-ipa-server-install-clean-after-itself.patch sent for review

Metadata Update from @mkosek:
- Issue assigned to mkosek
- Issue set to the milestone: FreeIPA 3.0 Core Effort - 2011/11

7 years ago

Login to comment on this ticket.

Metadata