#6715 Uninstall fails with No such file or directory: '/var/run/ipa/services.list'
Closed: fixed 7 years ago Opened 7 years ago by cheimes.

Unattended uninstall of a replica is failing because serves.list is missing. The same file exists on the first server.

# ipa-server-install --uninstall --unattended
Updating DNS system records
-----------------------------------------
Deleted IPA server "replica1.ipa.example"
-----------------------------------------
Shutting down all IPA services
Unconfiguring ntpd
ipa         : ERROR    [Errno 2] No such file or directory: '/var/run/ipa/services.list'

Version

# rpm -qa freeipa-server
freeipa-server-4.4.90.dev201702241512+gite2d1b21-0.fc25.x86_64

Uninstall works after I manually created the file:

# mkdir /var/run/ipa
# echo '["dirsrv", "krb5kdc", "kadmin", "named", "httpd", "ipa-custodia", "ntpd", "pki-tomcatd", "ipa-otpd", "ipa-dnskeysyncd"]' > /var/run/ipa/services.list
# ipa-server-install --uninstall --unattended
Updating DNS system records
-----------------------------------------
Deleted IPA server "replica1.ipa.example"
-----------------------------------------
Shutting down all IPA services
Configuring certmonger to stop tracking system certificates for KRA
Configuring certmonger to stop tracking system certificates for CA
Unconfiguring named
Unconfiguring ipa-dnskeysyncd
Unconfiguring web server
Unconfiguring krb5kdc
Unconfiguring kadmin
Unconfiguring directory server
Unconfiguring ipa-custodia
Unconfiguring ipa-otpd
Removing IPA client configuration
Removing Kerberos service principals from /etc/krb5.keytab
Disabling client Kerberos and LDAP configurations
Redundant SSSD configuration file /etc/sssd/sssd.conf was moved to /etc/sssd/sssd.conf.deleted
Restoring client configuration files
Unconfiguring the NIS domain.
nscd daemon is not installed, skip configuration
nslcd daemon is not installed, skip configuration
Systemwide CA database updated.
Client uninstall complete.
The ipa-client-install command was successful

I am facing same issue while uninstalling IPA server on ipa-server-4.4.90-201703141626.el7.x86_64

Looks like it's a 4.5 regression. I'm bumping the ticket to blocker.

Metadata Update from @cheimes:
- Issue priority set to: 1

7 years ago

@cheimes @akasurde Can you always reproduce it? It has been saw only rarely, e.g. after some failed installations.

More specific reproduction steps would help.

In my initial case, it was a successful installation of a replica on a fresh VM.

For me as well, this issue is not regular but very frequent. I will update issue with reproduction steps.

I'm able to reproduce this (thanks @mbasti) when uninstalling FreeIPA server when there's none installed.
The issue was introduced in https://pagure.io/freeipa/c/38c6689 before this commit tempfiles were created with rpm installation.

I propose to change uninstall to quit right after IPA is not configured (see man pages of ipa-server-install for help) because there's no point in continuing.

@dkupka Your proposal doesn't sound like the right solution. I hit the issue when I tried to uninstall a properly installed and fully working replica.

@cheimes I don't think it's complete solution. I've described one reproducible way to hit the issue and proposing solution for this case.
Other cases needs to be fixed too but for this we need reasonably stable reproducer.

@dkupka I agree, for your case (incomplete installation) it is a viable solution. Your first reply sounded like you were not going to solve my scenario. I'm glad we agree.

I propose to change uninstall to quit right after IPA is not configured (see man pages of ipa-server-install for help) because there's no point in continuing.

NACK, uninstaller should be indempotent and should clean mess even the server is uninstalled. You know yourself that sometimes is needed to run it twice. I would rather focus on why we need that list of services, uninstaller should be able to determine which services were installed by itself. For it looks more like bug in self.stop().

Metadata Update from @dkupka:
- Custom field on_review adjusted to https://github.com/freeipa/freeipa/pull/645

7 years ago

Metadata Update from @pvoborni:
- Issue assigned to dkupka
- Issue set to the milestone: FreeIPA 4.5.1

7 years ago

Metadata Update from @pvoborni:
- Custom field rhbz adjusted to https://bugzilla.redhat.com/show_bug.cgi?id=1436333

7 years ago

Metadata Update from @pvoborni:
- Custom field rhbz adjusted to https://bugzilla.redhat.com/show_bug.cgi?id=1436333

7 years ago

master:

  • 3dcd342 Create temporaty directories at the begining of uninstall
    ipa-4-5:

  • c0a3957 Create temporaty directories at the begining of uninstall

Metadata Update from @dkupka:
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

7 years ago

Log in to comment on this ticket.

Metadata