Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
.Installing KRA fails if all KRA members are hidden replicas
The `ipa-kra-install` utility fails on a cluster where the Key Recovery Authority (KRA) is already present, if the first KRA instance is installed on a hidden replica. Consequently, you cannot add further KRA instances to the cluster.
To work around this problem, unhide the hidden replica that has the KRA role before you add new KRA instances. You can hide it again when `ipa-kra-install` completes successfully.
This bug is created as a clone of upstream ticket:
https://pagure.io/freeipa/issue/8240
### Issue
ipa-kra-install fails on a cluster with KRA already installed if all the KRA-enabled replica are hidden.
#### Steps to Reproduce
1. install master (DNS, CA)
2. install replica0 (DNS, CA) as hidden
3. install KRA on replica0 (so: on the hidden replica)
4. install KRA on master
#### Actual behavior
Lookup failed: Preferred host master.ipa.test does not provide KRA.
Failed to find an active KRA server!
#### Expected behavior
KRA successfully installed.
#### Version/Release/Distribution
Any up to at least 2020-3-24 IPA from git master.
#### Additional info:
- this is because ipa-kra-install does:
```
config.kra_host_name = find_providing_server(
'KRA', api.Backend.ldap2, [api.env.ca_host]
)
```
and masters.find_providing_servers() does:
```
def find_providing_servers(svcname, conn=None, preferred_hosts=(), api=api):
(...)
if ENABLED_SERVICE in cfgstrings:
servers.append(servername)
# use hidden services on preferred hosts
elif HIDDEN_SERVICE in cfgstrings and servername in preferred_hosts:
servers.append(servername)
```
e.g. in the absence of preferred_hosts, find_providing_servers() returns an empty list.
The workaround is therefore to set ca_host in default.conf to the hidden replica's FQDN right before ipa-kra-install, and remove that setting right after ipa-kra-install.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory (Moderate: idm:DL1 and idm:client security, bug fix, and enhancement update), and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHSA-2020:4670