7.4.6 OUDレプリケーションの確認

作成されたすべてのポッドがREADY (つまり、1/1)として表示されたら、複数のOracle Unified Directory (OUD)インスタンス間でレプリケーションを確認できます。

レプリケーション・グループを確認するには、コンテナに接続し、OUD管理コマンドを発行して詳細を表示します。コンテナの名前を検索するには、次を発行します:
kubectl get pods -n <namespace> -o jsonpath='{.items[*].spec.containers[*].name}'
例:
kubectl get pods -n oudns -o jsonpath='{.items[*].spec.containers[*].name}'
出力は次のようになります:
oud-ds-rs oud-ds-rs oud-ds-rs
コンテナ名を取得したら、次の方法でレプリケーション・ステータスを確認できます:
  • ポッド内でのdsreplicationの実行
  • kubectlコマンドの使用

ポッド内でのdsreplicationの実行

  1. 次のコマンドを実行して、ポッドにBashシェルを作成します:
    kubectl --namespace <namespace> exec -it -c <containername> <podname> -- bash
    例:
    kubectl --namespace oudns exec -it -c oud-ds-rs oud-ds-rs-0 -- bash
    これにより、ポッドに移動します:
    [oracle@oud-ds-rs-0 oracle]$
  2. プロンプトから、dsreplicationコマンドを使用して、レプリケーション・グループのステータスを確認します:
    cd /u01/oracle/user_projects/oud-ds-rs-0/OUD/bin
    ./dsreplication status --trustAll \
    --hostname oud-ds-rs-0 --port 1444 --adminUID admin \
    --dataToDisplay compat-view --dataToDisplay rs-connections
    出力は次のようになりますプロンプトが表示されたら、資格証明を入力します:
    >>>> Specify Oracle Unified Directory LDAP connection parameters
        
    Password for user 'admin':
        
    Establishing connections and reading configuration ..... Done.
        
    dc=example,dc=com - Replication Enabled
    =======================================
        
    Server               : Entries : M.C. [1] : A.O.M.C. [2] : Port [3] : Encryption [4] : Trust [5] : U.C. [6] : Status [7] : ChangeLog [8] : Group ID [9] : Connected To [10]
    ---------------------:---------:----------:--------------:----------:----------------:-----------:----------:------------:---------------:--------------:-------------------------------
    oud-ds-rs-0:1444     : 202     : 0        : 0            : 1898     : Disabled       : Trusted   : --       : Normal     : Enabled       : 1            : oud-ds-rs-0:1898
                         :         :          :              :          :                :           :          :            :               :              : (GID=1)
    oud-ds-rs-1:1444     : 202     : 0        : 0            : 1898     : Disabled       : Trusted   : --       : Normal     : Enabled       : 1            : oud-ds-rs-1:1898
                         :         :          :              :          :                :           :          :            :               :              : (GID=1)
    oud-ds-rs-2:1444     : 202     : 0        : 0            : 1898     : Disabled       : Trusted   : --       : Normal     : Enabled       : 1            : oud-ds-rs-2:1898
                         :         :          :              :          :                :           :          :            :               :              : (GID=1)
        
    Replication Server [11]        : RS #1 : RS #2 : RS #3
    -------------------------------:-------:-------:------
    oud-ds-rs-0:1898               : --    : Yes   : Yes
    (#1)                           :       :       :
    oud-ds-rs-1:1898               : Yes   : --    : Yes
    (#2)                           :       :       :
    oud-ds-rs-2:1898               : Yes   : Yes   : --
    (#3)                           :       :       :
        
    [1] The number of changes that are still missing on this element (and that have been applied to at least one other server).
    [2] Age of oldest missing change: the age (in seconds) of the oldest change that has not yet arrived on this element.
    [3] The replication port used to communicate between the servers whose contents are being replicated.
    [4] Whether the replication communication initiated by this element is encrypted or not.
    [5] Whether the directory server is trusted or not. Updates coming from an untrusted server are discarded and not propagated.
    [6] The number of untrusted changes. These are changes generated on this server while it is untrusted. Those changes are not propagated to the rest of the topology but are effective on the untrusted server.
    [7] The status of the replication on this element.
    [8] Whether the external change log is enabled for the base DN on this server or not.
    [9] The ID of the replication group to which the server belongs.
    [10] The replication server this server is connected to with its group ID between brackets.
    [11] This table represents the connections between the replication servers.  The headers of the columns use a number as identifier for each replication server.  See the values of the first column to identify the corresponding replication server for each number.
  3. exitと入力してポッドを終了します。

kubectlコマンドの使用

kubectlコマンドを使用してレプリケーションを確認するには:
  1. dsreplication statusコマンドは、次のkubectlコマンドを使用して起動できます:
    kubectl --namespace <namespace> exec -it -c <containername> <podname> -- \
    /u01/oracle/user_projects/<OUD Instance/Pod Name>/OUD/bin/dsreplication status \
    --trustAll --hostname <OUD Instance/Pod Name> --port 1444 --adminUID admin \
    --dataToDisplay compat-view --dataToDisplay rs-connections
    例:
    kubectl --namespace oudns exec -it -c oud-ds-rs oud-ds-rs-0 -- \
    /u01/oracle/user_projects/oud-ds-rs-0/OUD/bin/dsreplication status \
    --trustAll --hostname oud-ds-rs-0 --port 1444 --adminUID admin \
    --dataToDisplay compat-view --dataToDisplay rs-connections
    出力は、前述の「ポッド内でのdsreplicationの実行」と同じになります。