#5725 failed ipa-server-install --uninstall returns exit code 0
Closed: Fixed Opened by ofayans.

When I try to uninstall a middle replica in a line topology under domainlevel 1 so that the installation would disconnect remote replica from master, the uninstallation fails, but the returncode is 0.

# ipa-server-install --uninstall -U
WARNING: This IPA master is still a part of the replication topology.
To properly remove the master entry and clean up related segments, run:
  $ ipa-replica-manage del vm-058-114.abc.idm.lab.eng.brq.redhat.com
Checking connectivity in topology suffix 'domain'
WARNING: Removal of 'vm-058-114.abc.idm.lab.eng.brq.redhat.com' will lead to disconnected topology in suffix 'domain'
Changes will not be replicated to all servers and data will become inconsistent.
You need to add segments to prevent disconnection of the topology.
Errors in topology after removal:
Topology does not allow server vm-058-115.abc.idm.lab.eng.brq.redhat.com to replicate with servers:
    vm-058-118.abc.idm.lab.eng.brq.redhat.com
Topology does not allow server vm-058-118.abc.idm.lab.eng.brq.redhat.com to replicate with servers:
    vm-058-115.abc.idm.lab.eng.brq.redhat.com
Checking connectivity in topology suffix 'ca'
WARNING: Removal of 'vm-058-114.abc.idm.lab.eng.brq.redhat.com' will lead to disconnected topology in suffix 'ca'
Changes will not be replicated to all servers and data will become inconsistent.
You need to add segments to prevent disconnection of the topology.
Errors in topology after removal:
Topology does not allow server vm-058-115.abc.idm.lab.eng.brq.redhat.com to replicate with servers:
    vm-058-118.abc.idm.lab.eng.brq.redhat.com
Topology does not allow server vm-058-118.abc.idm.lab.eng.brq.redhat.com to replicate with servers:
    vm-058-115.abc.idm.lab.eng.brq.redhat.com
Uninstallation leads to disconnected topology
Use '--ignore-topology-disconnect' to skip this check
Aborting uninstallation
# echo $?
0

Can you please double check that it is indeed the ipa-server-install command that returns the 0 exit code in this scenario?

The relevant code part goes as follows:

        print("Aborting uninstallation")
        sys.exit(1)

There really isn't much chance of us exiting with other than exit code 1, as far as I can see.

mbabinsk: able to reproduce with current master, the SystemExit is caught and consumed somewhere, see http://fpaste.org/336766/57622491/

The link from mbabinsk does not work anymore so I'll describe the problem here.

The fix may not be that trivial. The problem is that the control flow moves from ipapython/install/core.py:372 to ipapython/install/common.py:91 which eventually ends up with the error just being logged and as the control gets back to core.py:372. The state is then set to _FAILED but I'm not sure if this is ever checked in the ongoing magic.

4.4.0 was released, moving open tickets to 4.4.1

master:

  • 347f5ca0e145491d387f60f95b67ef59e7c28316 use separate exception handlers for executors and validators
  • f7764cda6824a2fe73abe11f6daa28758a185319 Make Continuous installer continuous only during execution phase

ipa-4-4:

  • e306e8f06d05d49784bf2bc6a235801c1b641daa use separate exception handlers for executors and validators
  • e45bd59b44c8ad9e56f7eee4a20e2e6f74c5e266 Make Continuous installer continuous only during execution phase

Metadata Update from @ofayans:
- Issue assigned to mbabinsk
- Issue set to the milestone: FreeIPA 4.4.2

Metadata