Advertise only properties of Assigned custom resources in the Slot ads

Description

When a custom resource like GPUs has properties, we currently publish all of the properties of all of the resources in all slots. This makes it difficult to see what the properties are for the assigned resources in that slot, and even more difficult to do matchmaking on that basis.

The STARTD should be changed so that when custom resource properties are supplied as nested classads with an ID in the ad (like condor_gpu_discovery -nested), Only the properties of resources listed in the Assigned<Tag> attribute should be merged from the custom resource ad into the STARTD ad.

Activity

John (TJ) Knoeller August 31, 2021 at 7:17 PM

Regarding the issues

  1. MachAttributes::DevIdMatches will be not called if the tag does not exist.

  2. It could be, if there is ever a reason to touch that code again I would change it, but it’s not worth changing all by itself.

  3. I believe this is logging is useful for now, it’s more interesting than the other logging so having that log at D_ALWAYS is ok. This will log only on slot creation.

As a general point, it might be good to do an audit of the logging in the Startd and decide what things we really want to see at D_ALWAYS,

Todd L Miller August 31, 2021 at 6:39 PM

Code Review

This generally looks good. The comments were helpful (in part because some of the variable names were not, in part because the STL container API is a little clumsy); thanks.

I find it highly unlikely that the scheme used to represent multiple assigned resources in this patch really solves the problem of matchmaking with multiple resources. However, that is, strictly speaking, out of scope, so as long as the scheme remains undocumented, I’m OK with it; we have to have something, after all.

Minor issues:

  • In MachAttributes::DevIdMatches(), why does the special case for indices not care if the resource tag doesn’t exist?

  • Shouldn’t lines 967 and 971 of ResAttributes.cpp just be a single line before the conditional?

  • Is line 1590 of ResAttributes.cpp debugging spam?

John (TJ) Knoeller April 27, 2021 at 3:00 PM
Edited

This can be tested by putting this in config, the multi-line form of SLOT_TYPE_n allows for a constraint expression, resource index or resource id string after an optional : on the line declaring the quantity of a custom resource.

Fixed

Details

Time tracking

13.75h logged

Assignee

Fix versions

Priority

HTCondorCustomerGroup

LIGO

Reporter

Created April 27, 2021 at 2:57 PM
Updated September 10, 2021 at 5:59 PM
Resolved September 10, 2021 at 5:58 PM