During investigation of https://github.com/freeipa/freeipa-container/issues/131 we found a bug in ipa-replica-conncheck: the class that encapsulates SSH logins to remote master returns a tuple of empty strings when '/usr/bin/ssh' is not installed (i.e. in a container).
The caller, however, assumes that the return value is a NamedTuple containing the return code and stdout/stderr and thus the command crashes violently with AttributeError:
Connection from replica to master is OK. Start listening on required ports for remote master check Get credentials to log in to remote master Check RPC connection to remote master Retrying using SSH... Check SSH connection to remote master WARNING: ssh not installed, skipping ssh test ipa : DEBUG stderr=Traceback (most recent call last): File "/usr/sbin/ipa-replica-conncheck", line 557, in <module> sys.exit(main()) File "/usr/sbin/ipa-replica-conncheck", line 530, in main if result.returncode != 0: AttributeError: 'tuple' object has no attribute 'returncode'
A proper fix would be to raise an exception in this case that the caller can process and decide to issue a warning or terminate gracefully.
Metadata Update from @pvoborni: - Custom field rhbz adjusted to 0 - Issue priority set to: critical - Issue set to the milestone: FreeIPA 4.5.1
Metadata Update from @frenaud: - Issue assigned to frenaud
Metadata Update from @frenaud: - Custom field on_review adjusted to https://github.com/freeipa/freeipa/pull/797
Metadata Update from @mbasti: - Issue set to the milestone: FreeIPA 4.5.2 (was: FreeIPA 4.5.1)
FreeIPA 4.5.1 has been released, moving to FreeIPA 4.5.2 milestone
ipa-4-5:
master:
Metadata Update from @mbabinsk: - Issue close_status updated to: fixed - Issue status updated to: Closed (was: Open)
Log in to comment on this ticket.