Commits on Apr 17, 2020
-
test_mx_util: Test mx_strvec functions used by daemon
The only two functions from the mx_strvec familiy which are used by mxqd and mxqsub have no tests currently. Add test.
-
test_mx_util: Remove mx_strvec cache test
Remove test for a "cache bug", as we are going to remove the mx_strvec cache feature in the next commit.
-
mx_util: Remove mx_strvec cache
The idea of the cache was to store the address and the number of the elements of a single vector in variables each time the length was determined. However, this aliases the pointer to the string vector owned by the user. If the users free()s his pointer to the vector, the cached pointer becomes invalid. An approach would be to require the user to always use a library routine to free the vector. This library routine would need to invalidate the static alias pointer, too. However, the assumed performance win doesn't seem worth the complexity. Remove the cache code.
Commits on Apr 19, 2020
-
mxqd: Don't try to unmount noexisting job tmpdir
Only unmount and remove job temporary directories for jobs, which actually requested one to avoid meaningless warnings in the logfile.
-
-
We'd like to have a daemon flag, namely "exclusive". This flag should be published by the daemon into the database, so that is visible to the web interface. Although we currently need only a single boolean flag, make it a integer, so that we can add more flags at a later time without changing the database scheme.
-
-
-
-
mxqd.c: Add --exclusive option
When a daemon is started, with --exclusive it will set daemon_flags to 1 to indicate, that it is running in exclusive mode. In exclusive mode, the daemon should only start jobs which have an implicit whitelist (`mxqsub --whitelist`) which includes the daemons name. This is implemented in the next commit.
-
mxqd.c: Require whitelist on exclusive daemon
If the daemon was stared with `--exclusive`, only start jobs which have the daemon in their whitelist.
-
-
keywordset: Fix wrong substring match
Do not match "abcdef" with "abc" in find_name().
-
test_keywordset: Add test for substring bug
Update of "abcdef" with "+ab" wrongly resulted in "ab", because the substring was matched for the keywords. Add a test for the bug fixed in the last commit.
-
keywordset: Add keywordset_add
Add function keywordset_add to update a keywordset with names from a string, not requiring embedded "+" markers.
-
-
keywordset.h: Add keywordset_free_byref
Add function keywordset_free_byref to be used with `__attribute__ ((cleanup))`.
-
Makefile: Let test_mxqd_control use keywordset
The inlined keywordset_free_byref from keywordset.h uses keywordset_free, so link keywordset.o in, too.
-
Add a simple bison based expression parser and evaluator for boolean expressions with identifiers from keywordsets. Identifiers existing in the supplied keywordset evaluate to true, others to false. This can be combined with boolean arithmetic w using '!', '&', '|', '(' and ')'. White space is ignored. Example valid expressions: cuda cuda & ssse3 amd & !desktop theinternet | deadpool
-
-
-
sql: Add column prerequisites for the daemon
Add field "prerequisites" to mxq_daemon which hold the prerequisites the server offers (e.g. cpu feature flags and hostconfig keywords). This field is used to publish the discovered prerequisites.
-
-
-
sql: Add column prerequisites for group
Add add column to store a prerequisites expression which the group requires from the server.
-
-
-
-
-
mxqd: Init server prerequisties
Initialize set of prerequisites available on the server from hostname, short hostname, hostconfig and cpu features. Also include a keyword "true". Store the preqrequisites as keywordset in the server structure to use for cehcking group requiresments and as as string in the daemon structure to be published to the database for documentation.
-
-
mxqd: Reformulate server_is_qualified
Reformulate server_is_qualified to make it (IMO) easier to understand and easier to expand.
-
-
-
If the users specifies a prerequisites expression with --prerequisites, parse it to verify its syntax and store it as a group attribute.
-
-