@@ -2048,17 +2048,6 @@ int osm_subn_verify_config(IN osm_subn_opt_t * p_opts)
}
}
- if (p_opts->root_guid_file != NULL) {
- FILE *root_file = fopen(p_opts->root_guid_file, "r");
- if (!root_file) {
- log_report("Root guid file provided: %s doesn't exist.\n"
- "Using default roots discovery algorithm\n",
- p_opts->root_guid_file);
- p_opts->root_guid_file = NULL;
- } else
- fclose(root_file);
- }
-
return 0;
}
@@ -3558,6 +3558,9 @@ static boolean_t fabric_load_roots(IN ftree_fabric_t * p_ftree,
context.list = p_ranking_bfs_list;
if (parse_node_map(p_ftree->p_osm->subn.opt.root_guid_file,
rank_root_sw_by_guid, &context)) {
+ OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_ERROR, "ERR AB2A: "
+ "cannot parse root guids file \'%s\'\n",
+ p_ftree->p_osm->subn.opt.root_guid_file);
return FALSE;
}
@@ -3722,10 +3725,9 @@ static int fabric_rank(IN ftree_fabric_t * p_ftree)
OSM_LOG_ENTER(&p_ftree->p_osm->log);
- if (fabric_roots_provided(p_ftree)){
- if (fabric_load_roots(p_ftree, &ranking_bfs_list))
+ if (fabric_roots_provided(p_ftree) &&
+ fabric_load_roots(p_ftree, &ranking_bfs_list))
res = fabric_rank_from_roots(p_ftree, &ranking_bfs_list);
- }
else {
res = fabric_rank_from_hcas(p_ftree);
if (!res)
@@ -594,12 +594,14 @@ static int updn_lid_matrices(void *ctx)
ret = parse_node_map(p_updn->p_osm->subn.opt.root_guid_file,
rank_root_node, p_updn);
- if (ret)
+ if (ret) {
OSM_LOG(&p_updn->p_osm->log, OSM_LOG_ERROR, "ERR AA02: "
"cannot parse root guids file \'%s\'\n",
p_updn->p_osm->subn.opt.root_guid_file);
- if (p_updn->p_osm->subn.opt.connect_roots &&
- p_updn->num_roots > 1)
+ osm_ucast_mgr_build_lid_matrices(&p_updn->p_osm->sm.ucast_mgr);
+ updn_find_root_nodes_by_min_hop(p_updn);
+ } else if (p_updn->p_osm->subn.opt.connect_roots &&
+ p_updn->num_roots > 1)
osm_ucast_mgr_build_lid_matrices(&p_updn->p_osm->sm.ucast_mgr);
} else {
osm_ucast_mgr_build_lid_matrices(&p_updn->p_osm->sm.ucast_mgr);