Correction to a problem when a cluster consisting of several nodes starts

initially in an order such that at least two nodes start after at least one
node has been started and its SUs has been instantiated. 


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1241 fd59a12c-fef9-0310-b244-a6a79926bd2f
This commit is contained in:
Hans Feldt 2006-09-20 08:27:01 +00:00
parent 9afe60d24d
commit 86431dfc6d
3 changed files with 16 additions and 13 deletions

View File

@ -1527,6 +1527,9 @@ static int amf_lib_init_fn (void *conn)
static void amf_dump_fn (void)
{
if (amf_cluster == NULL) {
return;
}
amf_runtime_attributes_print (amf_cluster);
}

View File

@ -144,13 +144,6 @@ void amf_cluster_sync_ready (struct amf_cluster *cluster)
break;
}
case CLUSTER_STARTING_COMPONENTS: {
if (cluster->timeout_handle) {
poll_timer_delete (
aisexec_poll_handle, cluster->timeout_handle);
cluster->timeout_handle = 0;
}
break;
}
case CLUSTER_STARTING_WORKLOAD: {

View File

@ -355,11 +355,18 @@ static int all_applications_on_node_started (struct amf_node *node,
for (app = cluster->application_head; app != NULL; app = app->next) {
for (sg = app->sg_head; sg != NULL; sg = sg->next) {
for (su = sg->su_head; su != NULL; su = su->next) {
if (su->saAmfSUPresenceState != SA_AMF_PRESENCE_INSTANTIATED &&
/* TODO: Replace the if-statement below with the if-statement in this comment when
the real problem is fixed !
if (su->saAmfSUPresenceState != SA_AMF_PRESENCE_INSTANTIATED &&
name_match(&su->saAmfSUHostedByNode,&node->name)) {
all_started = 0;
goto done;
}
*/
if (su->saAmfSUPresenceState != SA_AMF_PRESENCE_INSTANTIATED ) {
all_started = 0;
goto done;
}
}
}
}
@ -380,13 +387,13 @@ void amf_node_application_started (struct amf_node *node,
log_printf(LOG_NOTICE,
"Node: all applications started, assigning workload.");
for (app = _app->cluster->application_head; app != NULL;
app = app->next) {
amf_application_assign_workload (app, node);
}
}
for (app = _app->cluster->application_head; app != NULL;
app = app->next) {
amf_application_assign_workload (app, node);
}
}
void amf_node_application_workload_assigned (struct amf_node *node,