ipa-client-install --automount-location=location should configure a host for automount of e.g. NFS home directories. However the option does not work. Automount configuration always fails because the automount tool thinks that the system is not (yet) an IPA client.
ipa-client-install --automount-location=location
ipa-client-install --automount-location=default
System is not configured for automount. ipa-client-install does not fail either. Instead it ignores the error and logs the error to the ipaclient install log.
ipa-client-install
Configuring automount: 2023-11-28T12:24:12Z DEBUG Starting external process 2023-11-28T12:24:12Z DEBUG args=['/usr/sbin/ipa-client-automount', '--debug', '-U', '--location', 'default'] 2023-11-28T12:24:13Z DEBUG Process finished, return code=2 2023-11-28T12:24:13Z DEBUG stdout=IPA client is not configured on this system 2023-11-28T12:24:13Z DEBUG stderr= 2023-11-28T12:24:13Z ERROR Automount configuration failed: CalledProcessError(Command ['/usr/sbin/ipa-client-automount', '--debug', '-U', '--location', 'default'] returned non-zero exit status 2: '')
ipa-client-install successfully configures a system for automount.
ipa-client-4.10.2-4.el9_3.1.x86_64
Any additional information, configuration, data or log snippets that is needed for reproduction or investigation of the issue.
Log file locations: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Linux_Domain_Identity_Authentication_and_Policy_Guide/config-files-logs.html Troubleshooting guide: https://www.freeipa.org/page/Troubleshooting
Problem: - ipa-client-automount checks the installation state of the host and fails if the current host is not an IPA client - ipa-client-install sets the installation state after it runs ipa-client-automount, https://github.com/freeipa/freeipa/blob/60fe752da468e84a642af51090b27468446606f7/ipaclient/install/client.py#L3307-L3340
ipa-client-automount
The simplest fix for the problem is to move configure_automount(options) after statestore.backup_state('installation', 'complete', True).
configure_automount(options)
statestore.backup_state('installation', 'complete', True)
That could work. We'd need special handling to ensure that in the unlikely case the embedded ipa-client-automount call failed it would fail the entire client install.
The uninstall has the same issue if executed with ipa-client-install --uninstall. Things are left over in the sysrestore state file because the uninstall exits early because it thinks the client is not configured.
Metadata Update from @rcritten: - Issue assigned to rcritten
https://github.com/freeipa/freeipa/pull/7100
master:
ipa-4-11:
ipa-4-10:
Metadata Update from @frenaud: - Issue close_status updated to: fixed - Issue status updated to: Closed (was: Open)
Metadata Update from @frenaud: - Custom field rhbz adjusted to https://issues.redhat.com/browse/RHEL-21810
Log in to comment on this ticket.