#4869 IPA does not handle well restoring services after unninstall
Closed: Fixed None Opened 7 years ago by mbasti.

1) Service is not stopped before configuration files are restored. Service is even not restarted. Respectively service is running with wrong configuration after IPA uninstall.

2) IPA disable all services by default. After unninstall service is not enabled, but optionally disabled again.

        if not enabled is None and not enabled:
            self.disable()

3) Code doesnt meet PEP8 recommendations and contains too complicated boolean expressions.

NOW:
    if not running is None and running:

BETTER:
    if running:

4)
Some services are enabled by default, other are disabled by default during installation. Status of several services is not restored as expected.


1) please ignore, service are stopped before calling uninstall methods.

another issue:

class SimpleServiceInstance:

    def __enable(self):
        self.enable()
        self.backup_state("enabled", self.is_enabled())
        if self.gensvc_name == None:
            self.enable()
        else:
            self.ldap_enable(self.gensvc_name, self.fqdn,
                             self.dm_password, self.suffix)
  • service enabled
  • store status (always enabled !)
  • enable again or disable service (ldap_enable)

We can look at it during 4.2 installer work.

master:

  • c3edfa2 Fix restoring services status during uninstall
  • f499e50 Fix do not enable service before storing status
  • b5e06b9 Uninstall configured services only
  • d216cab Fix saving named restore status

Metadata Update from @mbasti:
- Issue assigned to mbasti
- Issue set to the milestone: FreeIPA 4.2 Backlog

5 years ago

Login to comment on this ticket.

Metadata