Skip to content

Commit 4298977

Browse files
committed
add feature-based node owner identification
1 parent a96b9d8 commit 4298977

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

coldfront/plugins/slurmrest/associations.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,12 @@ def import_node_data(self):
196196
)
197197

198198
def determine_node_owner(self, node_data):
199+
features = node_data.get('features', [])
200+
joined = ','.join(features)
201+
if 'o_s_' in joined or 'o_g_' in joined:
202+
for feature in features:
203+
if feature.startswith('o_s_') or feature.startswith('o_g_'):
204+
return feature[4:]
199205
node_partitions = node_data.get('partitions', [])
200206
for partition_name in ['serial_requeue', 'gpu_requeue']:
201207
if partition_name in node_partitions:

0 commit comments

Comments
 (0)