※ リポジトリは、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
@@ -483,6 +483,7 @@ | ||
483 | 483 | int promoted = 0; |
484 | 484 | node_t *chosen = NULL; |
485 | 485 | node_t *cons_node = NULL; |
486 | + enum rsc_role_e role = RSC_ROLE_UNKNOWN; | |
486 | 487 | enum rsc_role_e next_role = RSC_ROLE_UNKNOWN; |
487 | 488 | |
488 | 489 | clone_variant_data_t *clone_data = NULL; |
@@ -578,6 +579,20 @@ | ||
578 | 579 | chosen = child_rsc->fns->location(child_rsc, NULL, FALSE); |
579 | 580 | do_crm_log(scores_log_level, "%s promotion score on %s: %d", |
580 | 581 | 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 | + | |
581 | 596 | chosen = NULL; /* nuke 'chosen' so that we don't promote more than the |
582 | 597 | * required number of instances |
583 | 598 | */ |
@@ -596,6 +611,7 @@ | ||
596 | 611 | continue; |
597 | 612 | } |
598 | 613 | |
614 | + do_promote: | |
599 | 615 | chosen->count++; |
600 | 616 | crm_info("Promoting %s (%s %s)", |
601 | 617 | child_rsc->id, role2text(child_rsc->role), chosen->details->uname); |