[LDAP-Users:498] データベース設定の複製
tao
tao_0077 @ yahoo.co.jp
2009年 9月 19日 (土) 02:23:40 JST
こちらには初めて投稿いたします、タオ@地方都市です。
よろしくお願いします。
今まで OpenLDAP のレプリケーションに slurpd で頑張ってきたのですが、
Debian lenny 導入のきっかけに Syncrepl によるレプリケーションに挑戦した
いと思っています。
【前提】
1. N-way とか Mirror とかではなく、単にプロバイダからコンシュマへ特定の
LDAP ツリーを複製したい。
2. どうせなら ACL などのデータベース設定をそのままコンシュマに反映したい
ので、olcDatabase={1}hdb,cn=config も複製したい。
【環境】
プロバイダ側:OpenLDAP 2.3.43 on CentOS 5
コンシュマ側:OpenLDAP 2.4.11 on Debian lenny
【状況】
1 の単なるデータベースの複製はうまくいきました。
--- プロバイダ側 ---
:
database config
rootdn cn=config
rootpw {SSHA}xxxxxxxxxxxxxxxxxxxx
database hdb
suffix "dc=example,dc=com"
rootdn "cn=admin,dc=example,dc=com"
rootpw {SSHA}xxxxxxxxxxxxxxxxxxxxx
overlay syncprov
:
--- コンシュマ側 ---
database config
rootdn cn=config
rootpw {SSHA}xxxxxxxxxxxxxxxxxxxx
database hdb
suffix "dc=example,dc=com"
rootdn "cn=admin,dc=example,dc=com"
rootpw {SSHA}xxxxxxxxxxxxxxxxxxxxx
syncrepl rid=2
provider=ldap://provider.example.com
type=refreshAndPersist
retry="60 5 300 +"
schemachecking=off
bindmethod=simple
binddn="cn=admin,dc=example,dc=com"
credentials="xxxxxxxxxxxxx"
searchbase="ou=target,dc=example,dc=com"
filter="(objectClass=*)"
scope=sub
プロバイダ側を変更すると即座にコンシュマ側の LDAP に反映されます。
===================================
ですが、バックエンド設定まで複製しようとすると嵌ってしまいました。
--- プロバイダ側 ---
database config
rootdn cn=config
rootpw {SSHA}xxxxxxxxxxxxxxxxxxxx
overlay syncprov
database hdb
suffix "dc=example,dc=com"
rootdn "cn=admin,dc=example,dc=com"
rootpw {SSHA}xxxxxxxxxxxxxxxxxxxxx
overlay syncprov
syncrepl rid=2
provider=ldap://provider.example.com
type=refreshAndPersist
retry="60 5 300 +"
schemachecking=off
bindmethod=simple
binddn="cn=admin,dc=example,dc=com"
credentials="xxxxxxxxxxxxx"
searchbase="ou=target,dc=example,dc=com"
filter="(objectClass=*)"
scope=sub
--- コンシュマ側 ---
database config
rootdn cn=config
rootpw {SSHA}xxxxxxxxxxxxxxxxxxxxx
syncrepl rid=1
provider=ldap://provider.example.com
type=refreshAndPersist
retry="60 5 300 +"
schemachecking=off
bindmethod=simple
binddn="cn=config"
credentials="xxxxxxxxxxxxxxx"
searchbase="olcDatabase={1}hdb,cn=config"
filter="(objectClass=*)"
scope=base
データベース設定の複製 ->コンシュマ側に olcDatabase={1}hdb,cn=config の
syncrepl の設定が取り込まれる -> データベースが複製される
という目論見でしたが、うまく動作してくれません。コンシュマ側から rid=1
の syncrepl が接続しにいっているようですが、プロバイダ側の変更を検知して
くれないようです(エラー出力もありません)。rid=2 の syncrepl に至っては
全く動作していないようです。
2.3 系と 2.4 系ということで、少々トリッキーな環境とは思いますが、何かし
ら情報をお持ちの方はいらっしゃるでしょうか。
よろしくお願いします。
LDAP-Users メーリングリストの案内