#9559 Unable to install client due to python error
Closed: fixed by frenaud. Opened by raspinall.

Request for enhancement

Unable to install due to a stack trace during install

Issue

When installing the client on an amazon-linux-2 system, we receive a python error that leaves the system registered with the IPA server, but inoperable as a client.

Steps to Reproduce

  1. ipa-client-install --unattended --server --realm --domain --mkhomedir -p admin -w ''

Actual behavior

The client system enrolls with the IPA server, but is unable to operate as a registered client. Credentials cannot be established with kinit, and no usernames or other entities can be retrieved.

Expected behavior

The system to enroll correctly and function as an IPA client.

Version/Release/Distribution

$ rpm -q freeipa-server freeipa-client ipa-server ipa-client 389-ds-base pki-ca krb5-server
package freeipa-server is not installed
package freeipa-client is not installed
package ipa-server is not installed
ipa-client-4.6.8-5.amzn2.4.4.x86_64
package 389-ds-base is not installed
package pki-ca is not installed
package krb5-server is not installed

Additional info:

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


2024-03-20T16:35:20Z DEBUG Starting external process
2024-03-20T16:35:20Z DEBUG args=/usr/bin/kdestroy
2024-03-20T16:35:21Z DEBUG Process finished, return code=0
2024-03-20T16:35:21Z DEBUG stdout=
2024-03-20T16:35:21Z DEBUG stderr=
2024-03-20T16:35:21Z DEBUG File "/usr/lib/python2.7/site-packages/ipapython/admintool.py", line 178, in execute
return_value = self.run()
File "/usr/lib/python2.7/site-packages/ipapython/install/cli.py", line 319, in run
return cfgr.run()
File "/usr/lib/python2.7/site-packages/ipapython/install/core.py", line 360, in run
return self.execute()
File "/usr/lib/python2.7/site-packages/ipapython/install/core.py", line 386, in execute
for rval in self._executor():
File "/usr/lib/python2.7/site-packages/ipapython/install/core.py", line 431, in __runner
exc_handler(exc_info)
File "/usr/lib/python2.7/site-packages/ipapython/install/core.py", line 460, in _handle_execute_exception
self._handle_exception(exc_info)
File "/usr/lib/python2.7/site-packages/ipapython/install/core.py", line 450, in _handle_exception
six.reraise(exc_info)
File "/usr/lib/python2.7/site-packages/ipapython/install/core.py", line 421, in __runner
step()
File "/usr/lib/python2.7/site-packages/ipapython/install/core.py", line 418, in
step = lambda: next(self.__gen)
File "/usr/lib/python2.7/site-packages/ipapython/install/util.py", line 81, in run_generator_with_yield_from
six.reraise(
exc_info)
File "/usr/lib/python2.7/site-packages/ipapython/install/util.py", line 59, in run_generator_with_yield_from
value = gen.send(prev_value)
File "/usr/lib/python2.7/site-packages/ipapython/install/core.py", line 655, in _configure
next(executor)
File "/usr/lib/python2.7/site-packages/ipapython/install/core.py", line 431, in __runner
exc_handler(exc_info)
File "/usr/lib/python2.7/site-packages/ipapython/install/core.py", line 460, in _handle_execute_exception
self._handle_exception(exc_info)
File "/usr/lib/python2.7/site-packages/ipapython/install/core.py", line 518, in _handle_exception
self.__parent._handle_exception(exc_info)
File "/usr/lib/python2.7/site-packages/ipapython/install/core.py", line 450, in _handle_exception
six.reraise(exc_info)
File "/usr/lib/python2.7/site-packages/ipapython/install/core.py", line 515, in _handle_exception
super(ComponentBase, self)._handle_exception(exc_info)
File "/usr/lib/python2.7/site-packages/ipapython/install/core.py", line 450, in _handle_exception
six.reraise(
exc_info)
File "/usr/lib/python2.7/site-packages/ipapython/install/core.py", line 421, in __runner
step()
File "/usr/lib/python2.7/site-packages/ipapython/install/core.py", line 418, in
step = lambda: next(self.__gen)
File "/usr/lib/python2.7/site-packages/ipapython/install/util.py", line 81, in run_generator_with_yield_from
six.reraise(*exc_info)
File "/usr/lib/python2.7/site-packages/ipapython/install/util.py", line 59, in run_generator_with_yield_from
value = gen.send(prev_value)
File "/usr/lib/python2.7/site-packages/ipapython/install/common.py", line 65, in _install
for unused in self._installer(self.parent):
File "/usr/lib/python2.7/site-packages/ipaclient/install/client.py", line 3670, in main
install(self)
File "/usr/lib/python2.7/site-packages/ipaclient/install/client.py", line 2391, in install
_install(options)
File "/usr/lib/python2.7/site-packages/ipaclient/install/client.py", line 2637, in _install
attempts=options.kinit_attempts)
File "/usr/lib/python2.7/site-packages/ipalib/install/kinit.py", line 66, in kinit_keytab
validate_principal(principal)
File "/usr/lib/python2.7/site-packages/ipalib/install/kinit.py", line 51, in validate_principal
hostname = match[2]

2024-03-20T16:35:21Z DEBUG The ipa-client-install command failed, exception: TypeError: '_sre.SRE_Match' object has no attribute 'getitem'
2024-03-20T16:35:21Z ERROR '_sre.SRE_Match' object has no attribute 'getitem'
2024-03-20T16:35:21Z ERROR The ipa-client-install command failed. See /var/log/ipaclient-install.log for more information

As a side note, we were able to workaround this by running:
yum downgrade ipa-client-4.6.8-5.amzn2.4.3 ipa-client-common-4.6.8-5.amzn2.4.3 python2-ipaclient-4.6.8-5.amzn2.4.3 ipa-common-4.6.8-5.amzn2.4.3 python2-ipalib-4.6.8-5.amzn2.4.3

It's the 2.4.4 versions that are broken.

It looks like they pulled in an upstream change and didn't test it. I can work on fixing this upstream but it'll be on them to pull it in.

Metadata Update from @rcritten:
- Issue assigned to rcritten

Metadata Update from @rcritten:
- Issue priority set to: important

PR https://github.com/freeipa/freeipa/pull/7282

Your PR says it fixes issue 9541, not this issue, is that intentional? 9541 seems to be related to something different.

I referenced the originating issue. I can add a fixes for this one too.

Just checking, and thank you so much for taking care of this so quickly.

ipa-4-6:

  • a84db9a254f8955151e84bc0c8c438f0e06c9e27 validate_principal: Fix python2 issues

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

Metadata