4343 *
4444 * noverify = true
4545 * Skip verification that configured resources match local hwloc
46+ *
47+ * norestrict = false
48+ * When generating hwloc topology XML, do not restrict to current cpumask
4649 */
4750static int parse_config (struct resource_ctx * ctx ,
4851 const flux_conf_t * conf ,
4952 const char * * excludep ,
5053 json_t * * R ,
5154 bool * noverifyp ,
55+ bool * norestrictp ,
5256 flux_error_t * errp )
5357{
5458 flux_error_t error ;
5559 const char * exclude = NULL ;
5660 const char * path = NULL ;
5761 int noverify = 0 ;
62+ int norestrict = 0 ;
5863 json_t * o = NULL ;
5964
6065 if (flux_conf_unpack (conf ,
6166 & error ,
62- "{s?:{s?:s s?:s s?:b !}}" ,
67+ "{s?:{s?:s s?:s s?:b s?b !}}" ,
6368 "resource" ,
6469 "path" , & path ,
6570 "exclude" , & exclude ,
71+ "norestrict" , & norestrict ,
6672 "noverify" , & noverify ) < 0 ) {
6773 errprintf (errp ,
6874 "error parsing [resource] configuration: %s" ,
@@ -97,6 +103,8 @@ static int parse_config (struct resource_ctx *ctx,
97103 * excludep = exclude ;
98104 if (noverifyp )
99105 * noverifyp = noverify ? true : false;
106+ if (norestrictp )
107+ * norestrictp = norestrict ? true : false;
100108 if (R )
101109 * R = o ;
102110 return 0 ;
@@ -126,6 +134,7 @@ static void config_reload_cb (flux_t *h,
126134 & exclude ,
127135 NULL ,
128136 NULL ,
137+ NULL ,
129138 & error ) < 0 ) {
130139 errstr = error .text ;
131140 goto error ;
@@ -397,6 +406,7 @@ int mod_main (flux_t *h, int argc, char **argv)
397406 json_t * eventlog = NULL ;
398407 bool monitor_force_up = false;
399408 bool noverify = false;
409+ bool norestrict = false;
400410 json_t * R_from_config ;
401411
402412 if (!(ctx = resource_ctx_create (h )))
@@ -410,6 +420,7 @@ int mod_main (flux_t *h, int argc, char **argv)
410420 & exclude_idset ,
411421 & R_from_config ,
412422 & noverify ,
423+ & norestrict ,
413424 & error ) < 0 ) {
414425 flux_log (h , LOG_ERR , "%s" , error .text );
415426 goto error ;
@@ -426,7 +437,7 @@ int mod_main (flux_t *h, int argc, char **argv)
426437 }
427438 if (!(ctx -> inventory = inventory_create (ctx , R_from_config )))
428439 goto error ;
429- if (!(ctx -> topology = topo_create (ctx , noverify )))
440+ if (!(ctx -> topology = topo_create (ctx , noverify , norestrict )))
430441 goto error ;
431442 if (!(ctx -> monitor = monitor_create (ctx , monitor_force_up )))
432443 goto error ;
0 commit comments