* Create a dependency graph to send to the transitioner (via the CRMd) */
| 2186 | * Create a dependency graph to send to the transitioner (via the CRMd) |
| 2187 | */ |
| 2188 | gboolean |
| 2189 | stage8(pe_working_set_t * data_set) |
| 2190 | { |
| 2191 | GListPtr gIter = NULL; |
| 2192 | const char *value = NULL; |
| 2193 | |
| 2194 | transition_id++; |
| 2195 | crm_trace("Creating transition graph %d.", transition_id); |
| 2196 | |
| 2197 | data_set->graph = create_xml_node(NULL, XML_TAG_GRAPH); |
| 2198 | |
| 2199 | value = pe_pref(data_set->config_hash, "cluster-delay"); |
| 2200 | crm_xml_add(data_set->graph, "cluster-delay", value); |
| 2201 | |
| 2202 | value = pe_pref(data_set->config_hash, "stonith-timeout"); |
| 2203 | crm_xml_add(data_set->graph, "stonith-timeout", value); |
| 2204 | |
| 2205 | crm_xml_add(data_set->graph, "failed-stop-offset", "INFINITY"); |
| 2206 | |
| 2207 | if (is_set(data_set->flags, pe_flag_start_failure_fatal)) { |
| 2208 | crm_xml_add(data_set->graph, "failed-start-offset", "INFINITY"); |
| 2209 | } else { |
| 2210 | crm_xml_add(data_set->graph, "failed-start-offset", "1"); |
| 2211 | } |
| 2212 | |
| 2213 | value = pe_pref(data_set->config_hash, "batch-limit"); |
| 2214 | crm_xml_add(data_set->graph, "batch-limit", value); |
| 2215 | |
| 2216 | crm_xml_add_int(data_set->graph, "transition_id", transition_id); |
| 2217 | |
| 2218 | value = pe_pref(data_set->config_hash, "migration-limit"); |
| 2219 | if (crm_int_helper(value, NULL) > 0) { |
| 2220 | crm_xml_add(data_set->graph, "migration-limit", value); |
| 2221 | } |
| 2222 | |
| 2223 | /* errors... |
| 2224 | slist_iter(action, action_t, action_list, lpc, |
| 2225 | if(action->optional == FALSE && action->runnable == FALSE) { |
| 2226 | print_action("Ignoring", action, TRUE); |
| 2227 | } |
| 2228 | ); |
| 2229 | */ |
| 2230 | |
| 2231 | gIter = data_set->resources; |
| 2232 | for (; gIter != NULL; gIter = gIter->next) { |
| 2233 | resource_t *rsc = (resource_t *) gIter->data; |
| 2234 | |
| 2235 | pe_rsc_trace(rsc, "processing actions for rsc=%s", rsc->id); |
| 2236 | rsc->cmds->expand(rsc, data_set); |
| 2237 | } |
| 2238 | |
| 2239 | crm_log_xml_trace(data_set->graph, "created resource-driven action list"); |
| 2240 | |
| 2241 | /* catch any non-resource specific actions */ |
| 2242 | crm_trace("processing non-resource actions"); |
| 2243 | |
| 2244 | gIter = data_set->actions; |
| 2245 | for (; gIter != NULL; gIter = gIter->next) { |
no test coverage detected