Search

Chapter 12. Changing the role of a replica

download PDF

In a replication topology, you can change the role of replicas. For example, if a supplier is unavailable due to a hardware outage, you can promote a consumer to a supplier. The other way around, you can demote, for example, a supplier with low hardware resources to a consumer and later add another supplier with new hardware.

12.1. Promoting a replica using the command line

You can promote:

  • A consumer to a hub or supplier
  • A hub to a supplier

This section describes how to promote a replica of the dc=example,dc=com suffix.

Prerequisites

  • The Directory Server instance is a member of a replication topology.
  • The replica to promote is a consumer or hub.

Procedure

  1. If the replica to promote is a hub with replication agreements, and the hub should no longer send data to other hosts after the promotion, remove the replication agreements:

    1. List the replication agreements on the hub:

      # dsconf -D "cn=Directory Manager" ldap://server.example.com repl-agmt list --suffix "dc=example,dc=com"
      dn: cn=example-agreement,cn=replica,cn=dc\3Dexample\2Cdc\3Dcom,cn=mapping tree,cn=config
      cn: example-agreement
      ...

      The cn attribute contains the replication agreement name that you need in the next step.

    2. Remove the replication agreement from the hub:

      # dsconf -D "cn=Directory Manager" ldap://server.example.com repl-agmt delete --suffix "dc=example,dc=com" example-agreement
  2. Promote the instance:

    • If you promote a consumer or hub to a supplier, enter:

      # dsconf -D "cn=Directory Manager" ldap://server.example.com replication promote --suffix "dc=example,dc=com" --newrole "supplier" --replica-id 2
      Important

      The replica ID must be a unique integer value between 1 and 65534 for a suffix across all suppliers in the topology.

    • If you promote a consumer to a hub, enter:

      # dsconf -D "cn=Directory Manager" ldap://server.example.com replication promote --suffix "dc=example,dc=com" --newrole "hub"
  3. If the replica in its new role should send updates to other hosts in the topology, create replication agreements.

12.2. Promoting a replica using the web console

You can promote:

  • A consumer to a hub or supplier
  • A hub to a supplier

This section describes how to promote a replica of the dc=example,dc=com suffix.

Prerequisites

  • The Directory Server instance is a member of a replication topology.
  • The replica to promote is a consumer or hub.
  • You are logged in to the instance in the web console.

Procedure

  1. If the replica to promote is a hub with replication agreements, and the hub should no longer send data to other hosts after the promotion, remove the replication agreements:

    1. Navigate to Replication Agreements.
    2. Click Actions next to the agreement you want to delete, and select Delete Agreement.
  2. Navigate to Replication Configuration, and click the Change Role button.

    • If you promote a consumer or hub to a supplier, select Supplier, and enter a unique replica ID.

      Important

      The replica ID must be a unique integer value between 1 and 65534 for a suffix across all suppliers in the topology.

    • If you promote a consumer to a hub, select Hub.
  3. Select Yes, I am sure.
  4. Click Change Role.
  5. If the replica in its new role should send updates to other hosts in the topology, create replication agreements.

12.3. Demoting a replica using the command line

You can demote:

  • A supplier or hub to a consumer
  • A hub to a consumer

This section describes how to demote a replica of the dc=example,dc=com suffix.

Prerequisites

  • The Directory Server instance is a member of a replication topology.
  • The replica to demote is a supplier or hub.

Procedure

  1. If the replica to demote has replication agreements that are no longer needed, for example, because you demote the replica to a consumer, remove the replication agreements:

    1. List the replication agreements on the replica:

      # dsconf -D "cn=Directory Manager" ldap://server.example.com repl-agmt list --suffix "dc=example,dc=com"
      dn: cn=example-agreement,cn=replica,cn=dc\3Dexample\2Cdc\3Dcom,cn=mapping tree,cn=config
      cn: example-agreement
      ...

      The cn attribute contains the replication agreement name that you need in the next step.

    2. Remove the replication agreement from the replica:

      # dsconf -D "cn=Directory Manager" ldap://server.example.com repl-agmt delete --suffix "dc=example,dc=com" example-agreement
  2. Demote the instance:

    # dsconf -D "cn=Directory Manager" ldap://server.example.com replication demote --suffix "dc=example,dc=com" --newrole "hub_or_consumer"

    Depending on the role you want to configure, set the --newrole parameter to hub or consumer.

  3. If you configured the replica as a hub and it should send updates to other hosts in the topology, create replication agreements.

12.4. Demoting a replica using the web console

You can demote:

  • A supplier or hub to a consumer
  • A hub to a consumer

This section describes how to demote a replica of the dc=example,dc=com suffix.

Prerequisites

  • The Directory Server instance is a member of a replication topology.
  • The replica to demote is a supplier or hub.
  • You are logged in to the instance in the web console.

Procedure

  1. If the replica to demote has replication agreements that are no longer needed, for example, because you demote the replica to a consumer, remove the replication agreements:

    1. Navigate to Replication Agreements.
    2. Click Actions next to the agreement you want to delete, and select Delete Agreement.
  2. Navigate to Replication Configuration, and click Change Role button.
  3. Select the new replica role.
  4. Select Yes, I am sure.
  5. Click Change Role.
  6. If the replica in its new role should send updates to other hosts in the topology, create replication agreements.
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.