<kleind> detach and reattach with m/s resource is broken again if you don't have constraints for the master role. upon start, the cluster reports all resources running fine in the correct mode, but sees -1 promotion score for all drbd instances, which renders any master colocated resource unrunnable. then stop colocated, demote drbd is executed, which calls crm_master, now we have a promotion score and so we have a new promotion and colocated start. <kleind> on the one hand you say not to use constraints for the master role because crm_master is to take care of that ... <beekhof> its only broken if the RA is broken :) <beekhof> the RA needs to call crm_master during probes <kleind> probes would be monitor, right? <beekhof> with interval = 0 <kleind> monitor_0 <beekhof> yep <kleind> is there some $interval we can see in the RA or whats the suggested way? <beekhof> http://hg.clusterlabs.org/pacemaker/stable-1.0/file/9ec6e48c1207/extra/resources/Stateful <kleind> thx
This patch calls drbd_update_prefs if the master role is detected during the probe. Within that function, crm_master is called and sets an appropriate promotion score. That keeps the master instance running in its current location. Regards Dominik
exporting patch: # HG changeset patch # User Dominik Klein <[EMAIL PROTECTED]> # Date 1228835412 -3600 # Node ID 1a5685e8f1ed6c230ae3892856892e6a3a57d208 # Parent 057a733858655a68948f650ffb52fdddd5eb9db9 Medium: RA: drbd - make sure crm_master scores are set during probes diff -r 057a73385865 -r 1a5685e8f1ed resources/OCF/drbd --- a/resources/OCF/drbd Tue Dec 02 20:29:32 2008 +0100 +++ b/resources/OCF/drbd Tue Dec 09 16:10:12 2008 +0100 @@ -383,7 +383,11 @@ drbd_monitor() { ocf_log debug "$RESOURCE monitor: resource not configured" return $OCF_NOT_RUNNING elif [ "$DRBD_STATE_LOCAL" = "Primary" ]; then -# drbd_update_prefs + if [ -z "$OCF_RESKEY_CRM_meta_interval" ]; then + # Restore the master setting during probes + ocf_log debug "$RESOURCE monitor: restoring master setting during probe" + drbd_update_prefs + fi return $OCF_RUNNING_MASTER elif [ "$DRBD_STATE_LOCAL" = "Secondary" ]; then # drbd_update_prefs
_______________________________________________________ Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev Home Page: http://linux-ha.org/