#8240 KRA install fails if all KRA members are Hidden Replicas
Closed: fixed 4 years ago by fcami. Opened 4 years ago by fcami.

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.


Metadata Update from @fcami:
- Custom field on_review adjusted to https://github.com/freeipa/freeipa/pull/4428

4 years ago

Metadata Update from @fcami:
- Custom field rhbz adjusted to https://bugzilla.redhat.com/show_bug.cgi?id=1816784

4 years ago

So, the better workaround is to unhide temporarily the hidden replica.
Overriding ca_host at ipa-kra-install time produces undesirable side-effects.

master:

  • f980455 ipatests: test_replica_promotion.py: test KRA on Hidden Replica

ipa-4-8:

  • a692212 ipatests: test_replica_promotion.py: test KRA on Hidden Replica

Closing, the only change is to test the workaround / workflow.

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

4 years ago

Metadata Update from @fcami:
- Custom field changelog adjusted to Test that a hidden replica containing the first KRA can be temporarily made visible to install more KRA instances.

4 years ago

Metadata Update from @fcami:
- Issue assigned to fcami

4 years ago

If the first KRA instance is installed on a hidden replica, more KRA
instances cannot be added to the cluster. As a workaround, temporarily
make the the hidden replica with the KRA role visible before adding
more KRA instances. The previously-hidden replica can be hidden again
as soon as ipa-kra-install is complete.

Metadata Update from @fcami:
- Custom field changelog adjusted to If the first KRA instance is installed on a hidden replica, more KRA instances cannot be added to the cluster. As a workaround, temporarily make the the hidden replica with the KRA role visible before adding more KRA instances. The previously-hidden replica can be hidden again as soon as ipa-kra-install is complete. (was: Test that a hidden replica containing the first KRA can be temporarily made visible to install more KRA instances.)

4 years ago

Metadata Update from @abbra:
- Custom field knownissue adjusted to on

4 years ago

Metadata Update from @abbra:
- Custom field knownissue reset (from on)

3 years ago

Metadata Update from @abbra:
- Custom field affects_doc adjusted to on
- Custom field knownissue adjusted to on (was: false)

3 years ago

Login to comment on this ticket.

Metadata