Просмотр исходного кода

State change from standby-active to outofservice could
result in invalid number of active units. Found and fixed by
Sakai Miyotaka.

(Logical change 1.65)


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@236 fd59a12c-fef9-0310-b244-a6a79926bd2f

Steven Dake 21 лет назад
Родитель
Сommit
cc9f12bbd0
1 измененных файлов с 6 добавлено и 0 удалено
  1. 6 0
      exec/amf.c

+ 6 - 0
exec/amf.c

@@ -961,6 +961,7 @@ static void dsmDisabledUnlockedOutOfServiceCompleted (
 	struct list_head *comp_list = 0;
 	struct list_head *comp_list = 0;
 	struct list_head *unit_list = 0;
 	struct list_head *unit_list = 0;
 	int serviceUnitInStandby = 0;
 	int serviceUnitInStandby = 0;
+	int activeServiceUnits = 0;
 
 
 	/*
 	/*
 	 * Once all components of a service unit are out of service,
 	 * Once all components of a service unit are out of service,
@@ -988,6 +989,11 @@ static void dsmDisabledUnlockedOutOfServiceCompleted (
 	}
 	}
 
 
 	group = unit->saAmfGroup;
 	group = unit->saAmfGroup;
+	activeServiceUnits = activeServiceUnitsCount(group);
+	if (activeServiceUnits>=group->saAmfActiveUnitsDesired) {
+		return;
+	}
+
 	if (serviceUnitOutOfService == 1) {
 	if (serviceUnitOutOfService == 1) {
 		log_printf (LOG_LEVEL_DEBUG, "SU has gone out of service.\n");
 		log_printf (LOG_LEVEL_DEBUG, "SU has gone out of service.\n");
 		/*
 		/*