• R/O
  • SSH

pm_diskd: コミット

※ リポジトリは、pm-diskd ブランチが https://github.com/linux-ha-japan/pm_diskd-1.0 へ、pm-diskd-2.0ブランチが https://github.com/linux-ha-japan/pm_diskd へ移行しました。

Pacemaker 対応ディスク故障監視機能。

Pacemaker-1.0公式リポジトリのクローンに対し、パッチ作成用のブランチを作成して管理する。
ブランチ名: pm-diskd

初回 hg clone 実行後は、hg update -r pm-diskd を実行すること。

Heartbeat-2.1.4 用 hb-diskd(*) のPacemaker対応版
(*) http://sourceforge.jp/projects/linux-ha/releases/?package_id=10555


コミットメタ情報

リビジョン701617deb1ef7918086f4d1439d0a682e3843112 (tree)
日時2008-09-02 18:44:29
作者Andrew Beekhof <abeekhof@suse...>
コミッターAndrew Beekhof

ログメッセージ

High: PE: Bug LF:1955 - Ensure unmanaged masters are unconditionally repromoted to ensure they are monitored correctly.
This will now also work when master's don't have master-mode rsc_location constraints

変更サマリ

差分

diff -r e28a080dfd88 -r 701617deb1ef pengine/master.c
--- a/pengine/master.c Tue Sep 02 11:28:15 2008 +0200
+++ b/pengine/master.c Tue Sep 02 11:44:29 2008 +0200
@@ -483,6 +483,7 @@
483483 int promoted = 0;
484484 node_t *chosen = NULL;
485485 node_t *cons_node = NULL;
486+ enum rsc_role_e role = RSC_ROLE_UNKNOWN;
486487 enum rsc_role_e next_role = RSC_ROLE_UNKNOWN;
487488
488489 clone_variant_data_t *clone_data = NULL;
@@ -578,6 +579,20 @@
578579 chosen = child_rsc->fns->location(child_rsc, NULL, FALSE);
579580 do_crm_log(scores_log_level, "%s promotion score on %s: %d",
580581 child_rsc->id, chosen?chosen->details->uname:"none", child_rsc->sort_index);
582+
583+ role = child_rsc->fns->state(child_rsc, TRUE);
584+ if(is_not_set(child_rsc->flags, pe_rsc_managed) && role == RSC_ROLE_MASTER) {
585+ CRM_ASSERT(chosen != NULL); /* cant be a master with no node */
586+
587+ crm_info("Forcing unmanaged master %s to remain promoted",
588+ child_rsc->id);
589+
590+ /* get the parent's copy so that the allocation count is correct */
591+ chosen = pe_find_node_id(rsc->allowed_nodes, chosen->details->id);
592+
593+ goto do_promote;
594+ }
595+
581596 chosen = NULL; /* nuke 'chosen' so that we don't promote more than the
582597 * required number of instances
583598 */
@@ -596,6 +611,7 @@
596611 continue;
597612 }
598613
614+ do_promote:
599615 chosen->count++;
600616 crm_info("Promoting %s (%s %s)",
601617 child_rsc->id, role2text(child_rsc->role), chosen->details->uname);
旧リポジトリブラウザで表示