#3462 Part of ipa-client-install --uninstall code is not executed when confirming the reboot
Closed: Fixed None Opened 11 years ago by tbabej.

When running ipa-client-install, parts of code logic is not executed when confirming the reboot (available only in unatteded mode).

    if not options.unattended:
        root_logger.info(
            "The original nsswitch.conf configuration has been restored.")
        root_logger.info(
            "You may need to restart services or reboot the machine.")
        if not options.on_master:
            if user_input("Do you want to reboot the machine?", False):
                try:
                    run(["/sbin/reboot"])
                except Exception, e:
                    root_logger.error(
                        "Reboot command failed to exceute: %s", str(e))
                    return CLIENT_UNINSTALL_ERROR

    rv = 0

    if fstore.has_files():
        root_logger.error('Some files have not been restored, see /var/lib/ipa-client/sysrestore/sysrestore.index')
    has_state = False
    for module in statestore.modules.keys():
            root_logger.error('Some installation state for %s has not been restored, see /var/lib/ipa/sysrestore/sysrestore.state' % module)
            has_state = True
            rv = 1

    if has_state:
        root_logger.warning('Some installation state has not been restored.\nThis may cause re-installation to fail.\nIt should be safe to remove /var/lib/ipa-client/sysrestore.state but it may\nmean your system hasn\'t be restored to its pre-installation state.')

    # Remove the IPA configuration file
    try:
        os.remove("/etc/ipa/default.conf")
    except Exception:
        pass

    root_logger.info("Client uninstall complete.")

    return rv

This causes /etc/ipa/default.conf not to be removed, which we now use as a flag of ipa-client being installed. Consenquently, re-enrolling client after ipa-client-install --uninstall is not possible unless you manually remove /etc/ipa/default.conf


Metadata Update from @tbabej:
- Issue assigned to tbabej
- Issue set to the milestone: FreeIPA 3.2 - 2013/03

7 years ago

Login to comment on this ticket.

Metadata