[Linux-ha-jp] pcs resource group addに関して

Back to archive index

doraemon kinpu****@gmail*****
2014年 3月 3日 (月) 16:09:53 JST


松島様
お世話になっております。
二見です。
ご返信いただき、ありがとうございました。

>さて、一旦Slaveで起動する件ですが、どうやらRAの作法のようです
>いきなりマスタで上げてデータの時系列が二分してしまうのを防ぐ意図があるのだと思います。
>PostgreSQLもそのような動作をしていますので、これに関しましては問題ないと思います

なるほどです。そうなんですね。ありがとうございます。

>redis-serverの本体の実行ビットを外してkillされたとのことですが、実行ビットを付けたままkillしたらどうなりますでしょうか。

上記ですが、(マスタで)kill -9 でしばらくするとマスタ上で再度redisのプロセスが上がってきました。


>また、差し支えなければ、pcs config showの結果を拝見できますでしょうか。マズイ部分はマスクしていただいて構いません。

長くなりますが、結果をお送りいたします。
いろいろご教授いただいてありがとうございます。

お手数おかけいたします。よろしくお願いいたします。


--------- pcs config showの結果 ---------

# pcs config show
Cluster Name: monkeyclst1
Corosync Nodes:

Pacemaker Nodes:
 rs01 rs02

Resources:
 Resource: VirtualIP1 (class=ocf provider=heartbeat type=IPaddr2)
  Attributes: ip=XXX.XXX.XXX.XXX cidr_netmask=18
  Operations: monitor interval=30s (VirtualIP1-monitor-interval-30s)
  Master: redis-master
  Meta Attrs: master-max=1 master-node-max=1 clone-max=2 clone-node-max=1
notify=true
  Resource: redis (class=ocf provider=heartbeat type=redis)
   Operations: monitor interval=60s (redis-monitor-interval-60s)
               start interval=0 timeout=120s
(redis-name-start-interval-0-timeout-120s)
               stop interval=0 timeout=120s
(redis-name-stop-interval-0-timeout-120s)
               monitor interval=20s timeout=30s
(redis-name-monitor-interval-20s-timeout-30s)
               monitor interval=10s role=Master timeout=30s
(redis-name-monitor-interval-10s-role-Master-timeout-30s)
               monitor interval=30s role=Slave timeout=30s
(redis-name-monitor-interval-30s-role-Slave-timeout-30s)
               promote interval=0 timeout=120s
(redis-name-promote-interval-0-timeout-120s)
               demote interval=0 timeout=120s
(redis-name-demote-interval-0-timeout-120s)
               notify interval=0 timeout=90s
(redis-name-notify-interval-0-timeout-90s)

Stonith Devices:
Fencing Levels:

Location Constraints:
Ordering Constraints:
Colocation Constraints:
  VirtualIP1 with redis-master (INFINITY) (rsc-role:Started)
(with-rsc-role:Master) (id:colocation-VirtualIP1-redis-master-INFINITY)

Cluster Properties:
 cluster-infrastructure: classic openais (with plugin)
 dc-version: 1.1.10-14.el6_5.1-368c726
 expected-quorum-votes: 2
 last-lrm-refresh: 1393821612
 no-quorum-policy: ignore
 stonith-enabled: false


2014年3月3日 15:04 Takehiro Matsushima <takeh****@gmail*****>:

> 二見さん
>
> 松島です。お世話になっております。
> 無事設定出来ましたようで、安心致しました。
> 私もまだまだ不慣れでして試行錯誤の毎日です。
>
> さて、一旦Slaveで起動する件ですが、どうやらRAの作法のようです(あまり詳しくないのですが...)。
> いきなりマスタで上げてデータの時系列が二分してしまうのを防ぐ意図があるのだと思います。
> PostgreSQLもそのような動作をしていますので、これに関しましては問題ないと思います。
>
> redis-serverの本体の実行ビットを外してkillされたとのことですが、実行ビットを付けたままkillしたらどうなりますでしょうか。
> きちんとSlaveがMasterに昇格するという動作をしていますでしょうか。
> また、差し支えなければ、pcs config showの結果を拝見できますでしょうか。マズイ部分はマスクしていただいて構いません。
>
> ちなみに、Failed actionsに'not
> installed'とでていますが、これはRAの中でredis-serverが実行可能かどうかを確かめており、
> 実行可能でない場合にはこのエラーを吐くようにしているようです(私の見ているredis RAと同一でしたら)。
>
> 以上、よろしくお願いいたします。
>
>
> 2014年3月3日 13:51 doraemon <kinpu****@gmail*****>:
> > 松島様
> > お世話になっております。
> >
> > 二見です。ご返信が遅くなってしまいましたこと、お詫び申し上げます;
> > また、有益な情報大変ありがとうございます!
> >
> >
> >>Master/Slaveに対してVIPのリソースをつける方法ですが同居制約 colocation を使います。
> >>二見さんの例では、「VirtualIP1は、redis-masterのMasterロールと同じノードに起動しなくてはならない」
> >>と発想してcolocation設定をします。
> >>pcs constraint colocation add VirtualIP1 with master redis-master
> INFINITY
> >
> > 上記丁寧なご説明ありがとうございます。
> > constraint colocationの件、理解できました!
> >
> > 取り急ぎ実行したところコマンドは通りました。
> > (crm_monではどのような状態かはわからなそうですが、cibファイルにはconstraint
> colocationの設定が追記されておりました。)
> > -------------------------------------------------------
> > Last updated: Mon Mar  3 13:40:34 2014
> > Last change: Mon Mar  3 13:40:33 2014 via cibadmin on rs2
> > Stack: classic openais (with plugin)
> > Current DC: rs1- partition with quorum
> > Version: 1.1.10-14.el6_5.1-368c726
> > 2 Nodes configured, 2 expected votes
> > 3 Resources configured
> >
> >
> > Online: [ rs1rs2]
> >
> > VirtualIP1      (ocf::heartbeat:IPaddr2):       Started rs2
> >  Master/Slave Set: redis-master [redis]
> >      Masters: [ rs2]
> >      Slaves: [ rs1]
> > -------------------------------------------------------
> >     <constraints>
> >       <rsc_colocation id="colocation-VirtualIP1-redis-master-INFINITY"
> > rsc="VirtualIP1" rsc-role="Started" score="INFINITY"
> with-rsc="redis-master"
> > with-rsc-role="Master"/>
> >     </constraints>
> > ---------------------------------------------------------
> >
> >
> > 実際に稼働系のredis-serverのパーミッションを実行できないようにし、
> > (ちなみに一度ローカルリカバリを試みるのはデフォルトでしょうか。。)
> > killしたところ何やら無限ループのような状態で、
> > エラーが出てしまいました。
> > こちらはocfファイル廻りがおかしいのですかね。。
> >
> > また、ご教授いただきました、
> > ダミーでの挙動でも試してみようかと思います。
> >
> > いろいろありがとうございます。もう少し自分でいろいろやってみようかと思います。
> >
> > ご教授ありがとうございます。
> >
> >
> > >実際のリソースを使わずに、動きを検証するのにはocf:heartbeat:Dummyリソースや
> > >ocf:pacemaker:Statefulリソースが便利です。
> > >Dummyは何もしない単体リソース(Cloneは可能)、Statefulは何もしないMaster/Slave構成可能リソースです。
> >
> >
> > Last updated: Mon Mar  3 13:32:45 2014
> > Last change: Mon Mar  3 13:25:52 2014 via crmd on rs2
> > Stack: classic openais (with plugin)
> > Current DC: rs1 - partition with quorum
> > Version: 1.1.10-14.el6_5.1-368c726
> > 2 Nodes configured, 2 expected votes
> > 3 Resources configured
> >
> >
> > Online: [ rs1 rs2]
> >
> > VirtualIP1      (ocf::heartbeat:IPaddr2):       Started rs2
> >  Master/Slave Set: redis-master [redis]
> >      redis      (ocf::heartbeat:redis): FAILED Master rs2(unmanaged)
> >      Stopped: [ rs1 ]
> >
> > Failed actions:
> >     redis_stop_0 on rs2'not installed' (5): call=515, status=complete,
> > last-rc-change='Mon Mar  3 13:31:37 2014', queued=25ms, exec=0ms
> >     redis_monitor_60000 on rs1 'master' (8): call=8479, status=complete,
> > last-rc-change='Mon Mar  3 13:32:44 2014', queued=73ms, exec=139m
> > s
> >
> >
> >
> >
> > _______________________________________________
> > Linux-ha-japan mailing list
> > Linux****@lists*****
> > http://lists.sourceforge.jp/mailman/listinfo/linux-ha-japan
> >
>
> _______________________________________________
> Linux-ha-japan mailing list
> Linux****@lists*****
> http://lists.sourceforge.jp/mailman/listinfo/linux-ha-japan
>
-------------- next part --------------
HTMLの添付ファイルを保管しました...
Descargar 



Linux-ha-japan メーリングリストの案内
Back to archive index