とは言え、ドレがいいのか分からないので、ここでは定番とも言える pacemaker にしよう。
対象は gemini / cancer だ。
$ sudo apt-get update
$ sudo apt-get --simulate install pacemaker
$ sudo apt-get install pacemaker
インストールが終わったら起動してみる。(基本設定してないけど…。)
(gemini) $ sudo systemctl start pacemaker
(gemini) $ systemctl --no-pager -l status pacemaker
Stonith 関係のエラーが出てる。
(gemini) $ ps -ef | grep pacemaker | grep -v grep
起動はしているようだ。
cancer も…。
(cancer) $ sudo systemctl start pacemaker
(cancer) $ systemctl --no-pager -l status pacemaker
あれ?Stonith 関連のエラーは出てこなかった…。
(cancer) $ ps -ef | grep pacemaker | grep -v grep
こちらも、起動はしているようだ。
pacemaker は、crm というコマンドを通して操作を行うようだ。
まずはステータスを見てみよう。
$ sudo crm status --verbose
どうやら、過去に構築した corosync を通して、ノード間の通信と Online 状態であることは確認できているみたいだ。
ただ、STONITHリソースが定義出来ていないので、他のリソースが起動できないよ、という警告が。っても、何のリソースも定義していないのだが…。
この後、Stonith を含む基本設定を施すことになるのだが、設定を施す前に、今どのような設定になっているかを確認しておこう。
クラスタ全体の Property 一覧は、crm の configure show_property で出力出来る。
$ sudo crm configure show_property
ただコレは、設定可能な項目の一覧なので、各項目にどのような値が設定されているか分からない。
設定されている値は、先程のコマンドの後ろに、設定項目名を入れると分かる。
例えば…
$ sudo crm configure show_property stop-orphan-resources
true
この stop-orphan-resouces というパラメータは、true が設定されている、ということだ。
一度、全部洗い出しておこう。
| # | 項目名 | 値 | 備考 |
|---|---|---|---|
| 1 | stop-orphan-resources | true | |
| 2 | dc-deadtime | 20s | |
| 3 | placement-strategy | default | |
| 4 | symmetric-cluster | true | |
| 5 | maintenance-mode | false | |
| 6 | default-action-timeout | 20s | |
| 7 | node-health-yellow | 0 | |
| 8 | start-failure-is-fatal | true | |
| 9 | shutdown-escalation | 20min | |
| 10 | stop-all-resources | false | |
| 11 | no-quorum-policy | stop | |
| 12 | dc-version | 1.1.14-70404b0 | |
| 13 | startup-fencing | true | |
| 14 | stonith-enabled | true | |
| 15 | pe-input-series-max | 4000 | |
| 16 | stonith-action | reboot | |
| 17 | pe-error-series-max | -1 | |
| 18 | is-managed-default | true | |
| 19 | node-health-red | -INFINITY | |
| 20 | remove-after-stop | false | |
| 21 | crmd-transition-delay | 0s | |
| 22 | election-timeout | 2min | |
| 23 | node-health-green | 0 | |
| 24 | node-action-limit | 0 | |
| 25 | stonith-timeout | 60s | |
| 26 | enable-acl | false | |
| 27 | batch-limit | 0 | |
| 28 | pe-warn-series-max | 5000 | |
| 29 | enable-startup-probes | true | |
| 30 | stop-orphan-actions | true | |
| 31 | default-resource-stickiness | 0 | |
| 32 | cluster-recheck-interval | 15min | |
| 33 | cluster-infrastructure | corosync | |
| 34 | crmd-integration-timeout | 3min | |
| 35 | stonith-watchdog-timeout | (null) | |
| 36 | crmd-finalization-timeout | 30min | |
| 37 | have-watchdog | false | |
| 38 | migration-limit | -1 | |
| 39 | load-threshold | 80% | |
| 40 | node-health-strategy | none | |
| 41 | cluster-delay | 60s |
デフォルト値が分かったが、どの値が何を意味しているのか分からない。
おいおい調査していくことにしよう。
逆に言うと、何をどう設定すれば何が起きるのか分からない。
なので、今はデフォルトのママにして、必要に応じて修正していくことにする。
次回は、ゲストOS(leo) をクラスタサービスにしてみる。(出来るのか?)









