Ticket was cloned from Red Hat Bugzilla (product Red Hat Enterprise Linux 7): Bug 1080532
Description of problem: When joining a machine to IPA via realmd during the machine installation with anaconda kickstart, the ipa uninstall crashes. I was not able to reproduce this issue under other conditions, only just after installation and joining via anaconda. It seems that ipa client ties to start the chronyd service, but as it is not installed it crashes. I think it should handle the situation more clearly. Version-Release number of selected component (if applicable): ipa-client-3.3.3-25.el7 How reproducible: always Steps to Reproduce: 1/ Install a machine with kickstart and join it to IPA; I use the following kickstart file: text zerombr bootloader --location=mbr clearpart --all --initlabel autopart logging --level=debug rootpw --plaintext redhat firewall --disabled keyboard us lang en_US timezone --isUtc America/New_York network --bootproto=static --device=eth0 --gateway=192.168.100.1 --ip=192.168.100.72 --netmask=255.255.255.0 --nameserver=10.34.37.24 --hostname=rhel72.ipa.baseos.qe --noipv6 --activate reboot realm join --one-time-password=MyPassword ipa.baseos.qe %packages --ignoremissing wget make @core %end 2/ After the installation log into the machine and try remove it from IPA: [root@rhel72 ~]# /usr/sbin/ipa-client-install --uninstall --unattended Unenrolling client from IPA server 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 nscd daemon is not installed, skip configuration nslcd daemon is not installed, skip configuration Traceback (most recent call last): File "/usr/sbin/ipa-client-install", line 2597, in <module> sys.exit(main()) File "/usr/sbin/ipa-client-install", line 2569, in main return uninstall(options, env) File "/usr/sbin/ipa-client-install", line 619, in uninstall ipaclient.ntpconf.restore_forced_ntpd(statestore) File "/usr/lib/python2.7/site-packages/ipaclient/ntpconf.py", line 224, in restore_forced_ntpd service.start() File "/usr/lib/python2.7/site-packages/ipapython/platform/base/systemd.py", line 119, in start ipautil.run(["/bin/systemctl", "start", self.service_instance(instance_name)], capture_output=capture_output) File "/usr/lib/python2.7/site-packages/ipapython/ipautil.py", line 328, in run raise CalledProcessError(p.returncode, arg_string, stdout) subprocess.CalledProcessError: Command '/bin/systemctl start chronyd.service' returned non-zero exit status 6 The second attempt seems to be successful: [root@rhel72 log]# [root@rhel72 log]# /usr/sbin/ipa-client-install --uninstall --unattended Unenrolling client from IPA server Unenrolling host failed: Error getting default Kerberos realm: Configuration file does not specify default realm. Removing Kerberos service principals from /etc/krb5.keytab Failed to remove Kerberos service principals: Command '/usr/sbin/ipa-rmkeytab -k /etc/krb5.keytab -r IPA.BASEOS.QE' returned non-zero exit status 5 Disabling client Kerberos and LDAP configurations Redundant SSSD configuration file /etc/sssd/sssd.conf was moved to /etc/sssd/sssd.conf.deleted nscd daemon is not installed, skip configuration nslcd daemon is not installed, skip configuration Client uninstall complete.
restore_forced_ntpd should not crash in such cases, but rather just report warning.
Moving stabilization tickets that do not affect FreeIPA 4.0 release usability in any significant way to 4.0.1 stabilization milestone.
attachment freeipa-dkupka-0001-Fix-ipa-client-install-uninstall-crash.patch
attachment freeipa-dkupka-0001-2-Fix-ipa-client-install-uninstall-crash.patch
Patch modified according to Petr^3^'s comments.
master:
ipa-4-1:
ipa-4-0:
Metadata Update from @mkosek: - Issue assigned to dkupka - Issue set to the milestone: FreeIPA 4.0.1
Login to comment on this ticket.