If you run ipa-server-install --uninstall from a non-existent directory or you are sitting in a directory that will be removed by the uninstaller then you will see warnings and a potential failure.
I've seen this by a user sitting in the dogtag alias directory and myself in development.
# ipa-server-install --uninstall -U shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory ------------------------------------ Deleted IPA server "ipa.example.com" ------------------------------------ Shutting down all IPA services Unconfiguring ntpd Configuring certmonger to stop tracking system certificates for KRA Configuring certmonger to stop tracking system certificates for CA Unconfiguring CA Unconfiguring web server Unconfiguring krb5kdc Unconfiguring kadmin Unconfiguring directory server ipapython.install.common: ERROR Unable to determine the current directory: [Errno 2] No such file or directory Exception ignored in: <bound method CertDB.__del__ of <ipaserver.install.certs.CertDB object at 0x7fa50286c9b0>> Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/ipaserver/install/certs.py", line 227, in __del__ os.chdir(self.cwd) AttributeError: 'CertDB' object has no attribute 'cwd'
There are many other scenarios, perhaps simpler, to reproduce. This is just how I most often run into it.
fail, missing cwd.
We should do two things:
os.chdir()
subprocess.check_call(..., cwd=directory)
os.chdir(
Metadata Update from @rcritten: - Issue priority set to: low - Issue set to the milestone: FreeIPA 4.7 - Issue tagged with: easyfix
https://github.com/freeipa/freeipa/pull/1606
https://github.com/freeipa/freeipa/pull/1781 removes os.chdir() from certdb and the p11 helper tests. This revealed another buggy test suite.
master:
Metadata Update from @rcritten: - Issue set to the milestone: FreeIPA 4.7.1 (was: FreeIPA 4.7)
FreeIPA 4.7 has been released, moving to FreeIPA 4.7.1 milestone
Metadata Update from @rcritten: - Issue set to the milestone: FreeIPA 4.7.2 (was: FreeIPA 4.7.1)
FreeIPA 4.7.1 has been released, moving to FreeIPA 4.7.2 milestone
Metadata Update from @rcritten: - Issue close_status updated to: fixed - Issue status updated to: Closed (was: Open)
Login to comment on this ticket.