@@ -446,12 +446,15 @@ def gather(self):
446
446
#
447
447
#
448
448
449
- node_maps = {"FRONTEND" : {}, "COMPUTE" : {}, "DRIVES" : {}, "MANAGEMENT" : {}} # initial state of maps
449
+ #node_maps = {"FRONTEND": {}, "COMPUTE": {}, "DRIVES": {}, "MANAGEMENT": {}} # initial state of maps
450
+ node_maps = dict ()
450
451
451
452
# log.debug(f'{weka_maps["node-role"]}')
452
453
453
454
for node in node_role_map : # node == "NodeId<xx>"
454
455
for role in node_role_map [node ]:
456
+ if role not in node_maps :
457
+ node_maps [role ] = dict ()
455
458
nid = int (node .split ('<' )[1 ].split ('>' )[0 ]) # make nodeid numeric
456
459
hostname = node_host_map [node ]
457
460
if hostname not in node_maps [role ]:
@@ -460,15 +463,16 @@ def gather(self):
460
463
461
464
# log.debug(f"{str(self.cluster)} {json.dumps(node_maps, indent=4)}")
462
465
466
+ # no longer used
463
467
# find a better place to define this... for now here is good (vince)
464
- category_nodetypes = {
465
- 'cpu' : ['FRONTEND' , 'COMPUTE' , 'DRIVES' ],
466
- 'ops' : ['FRONTEND' ],
467
- 'ops_driver' : ['FRONTEND' ],
468
- 'ops_nfs' : ['COMPUTE' ], # not sure about this one
469
- 'ssd' : ['DRIVES' ],
470
- 'network' : ['FRONTEND' , 'COMPUTE' , 'DRIVES' ]
471
- }
468
+ # category_nodetypes = {
469
+ # 'cpu': ['FRONTEND', 'COMPUTE', 'DRIVES'],
470
+ # 'ops': ['FRONTEND'],
471
+ # 'ops_driver': ['FRONTEND'],
472
+ # 'ops_nfs': ['COMPUTE'], # not sure about this one
473
+ # 'ssd': ['DRIVES'],
474
+ # 'network': ['FRONTEND', 'COMPUTE', 'DRIVES']
475
+ # }
472
476
473
477
# new impl
474
478
# up_list is a list of all the good hosts (ie: not down)
0 commit comments