preserve_relative_paths adds requirements expression that breaks for 8.9.10

Description

The preserve_relative_paths submit file command (and, indeed, any job ClassAd with a true PreserveRealtivePaths attribute) adds a clause to the requirements expression –

– which undesirably becomes false when the CondorVersion is 8.9.10.

Luckily, the fix is trivial: replace strcmp with the new versioncmp (added in 8.9.9 and 8.8.12).

If the requirements expression fails to evaluate, the job won’t match; this is fine, unless the startd in question is new enough to run the job but the negotiator predates strcmp().

TJ correctly points out that the targeted version should be the version in which versioncmp() was introduced, because the startd needs to evaluate the requirements expression as well.

Activity

Show:
Greg Thain
January 27, 2021, 8:58 PM

CODE REVIEW Looks good to me, as we discussed online.

Todd L Miller
January 19, 2021, 8:17 PM

The description used to contain the following proposal:

Another option would be extract in the build ID instead of the version string, convert it to an integer, and compare that. It’s less obvious what’s going on that way, but it should match 8.9.10 and should work in older negotiators.

but this won’t work because the build IDs are a monotonic wall-clock and not tied to release branch. Specifically, the 8.9.7 release is build ID 504263, which is less than 513586, which is release 8.8.10 and does not contain an implementation of preserve_relative_paths.

Todd L Miller
January 19, 2021, 5:19 PM

Consider creating a longer-term ticket – or maybe short-term to get it in before 9.0? – to advertise the major, minor, and micro version of HTCondor explicitly as integer (or perhaps a single large integer).

Due date

2021/01/22

Time remaining

0m

Assignee

Todd L Miller

Is PATh development

None

Fix versions

Priority

Minor

HTCondorCustomerGroup

LIGO

Components

Reporter

Todd L Miller