Skip to content

Add exclusive flag #85

Closed
wants to merge 11 commits into from
Closed

Add exclusive flag #85

wants to merge 11 commits into from

Conversation

donald
Copy link
Contributor

@donald donald commented Apr 17, 2020

If mxqd is started with --exclusive, it will only take jobs, which have an explicit whitelist which include the server. "default" without a whitelist will not be started.

And some minor fixes as usual.

The only two functions from the mx_strvec familiy which are used by
mxqd and mxqsub have no tests currently. Add test.
Remove test for a "cache bug", as we are going to remove the mx_strvec
cache feature in the next commit.
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.
Only unmount and remove job temporary directories for jobs, which
actually requested on 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.
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.
If the daemon was stared with `--exclusive`, only start jobs which have
the daemon in their whitelist.
@donald
Copy link
Contributor Author

donald commented Apr 19, 2020

Closed for #86

@donald donald closed this Apr 19, 2020
Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant