Control replication

  • Name: Control replication
  • Description: Used to suspend replication, resume replication, or force immediate replication by a supplier server in an advanced replication environment. When a replication agreement is suspended, updates under the context are allowed but the agreement queues the updates to its replica server until advanced replication is resumed for the agreement. This extended operation should be targeted against a master server.
  • Assigned object identifier: 1.3.18.0.2.12.16
  • Values: The following ASN.1 syntax describes the BER encoding of the request value.
    RequestValue ::= SEQUENCE {
     action INTEGER {
         suspend             (0),
         resume              (1),
         replicateNow        (2) },
     scope INTEGER {
         singleAgreement     (0),
         allAgreements       (1) },
     entryDN LDAPDN
    }

    Where,

    action - An integer value indicating the operation to be performed on the supplier server. If set to suspend, the replication agreement queues the updates to its replica server until advanced replication is resumed for the agreement. If set to resume, advanced replication for the replication agreement continues. If set to replicateNow and the replication agreement is waiting for scheduled replication to occur, any outstanding updates are immediately replicated. replicateNow has no effect on a suspended replication agreement.

    scope - An integer value indicating the extent of the action that is to be performed. If set to singleAgreement, the request applies to a single replication agreement. If set to allAgreements, the request applies to all replication agreements within a replication context. This parameter indicates whether the entryDN is a replication agreement or context entry.

    entryDN - A distinguished name (DN) containing the replication context or agreement that this operation affects. If scope is set to singleAgreement, this specifies the distinguished name of the replication agreement that this extended operation is acting on. If scope is set to allAgreements, this specifies the distinguished name of the replication context and indicates that all agreements within the context are to be acted on.

  • Response object identifier: 1.3.18.0.2.12.16
  • Response description: This extended operation response is used to return error information when a problem is encountered with performing the Control replication extended operation.
  • Response values: The following ASN.1 syntax describes the BER encoding of the response value.
    ResponseValue :: = SEQUENCE {
     resultCode          INTEGER,
     msg                 OCTET STRING,
     consumer            OCTET STRING
    }

    Where,

    resultCode - An integer value indicating whether the extended operation is successful. Standard LDAP return codes are returned as values within this portion of the extended operation response.

    msg - A string containing a reason code message. In most cases, it is an error message indicating why the extended operation failed. In some cases, it can be an informational or warning message.

    consumer - A string containing the host:port of the consumer server that is reporting an error. This is returned when the consumer has certain problems performing the requested operation.

  • Response detailed description:

    The following table summarizes some different error scenarios and the Control replication response returned for such scenarios.

    Error scenario Control replication response
    entryDN does not exist or is not a replication context or agreement Returns an LDAP_NO_SUCH_OBJECT return code
    Backend does not support advanced replication Returns an LDAP_UNWILLING_TO_PERFORM return code
    Not authorized to perform operation Returns an LDAP_INSUFFICIENT_ACCESS return code
    Syntax of DN specified is not correct Returns an LDAP_INVALID_DN_SYNTAX return code
    Value for the input option is not valid Returns an LDAP_PROTOCOL_ERROR return code
    LDAP server is unable to decode the request Returns an LDAP_DECODING_ERROR return code