Skip to content

Add exclusive mode and prerequisites #86

Merged
merged 38 commits into from Apr 19, 2020
Merged

Add exclusive mode and prerequisites #86

merged 38 commits into from Apr 19, 2020

Commits on Apr 17, 2020

  1. 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.
    donald committed Apr 17, 2020
    Copy the full SHA
    35e6314 View commit details
    Browse the repository at this point in the history
  2. 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.
    donald committed Apr 17, 2020
    Copy the full SHA
    d954e89 View commit details
    Browse the repository at this point in the history
  3. 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.
    donald committed Apr 17, 2020
    Copy the full SHA
    102f936 View commit details
    Browse the repository at this point in the history

Commits on Apr 19, 2020

  1. 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.
    donald committed Apr 19, 2020
    Copy the full SHA
    edc5bd6 View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    47e6d34 View commit details
    Browse the repository at this point in the history
  3. sql: Add column daemon_flags

    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.
    donald committed Apr 19, 2020
    Copy the full SHA
    de092e0 View commit details
    Browse the repository at this point in the history
  4. web: Add column daemon_flags

    donald committed Apr 19, 2020
    Copy the full SHA
    278ee8a View commit details
    Browse the repository at this point in the history
  5. Copy the full SHA
    7f9c214 View commit details
    Browse the repository at this point in the history
  6. Copy the full SHA
    990514b View commit details
    Browse the repository at this point in the history
  7. 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.
    donald committed Apr 19, 2020
    Copy the full SHA
    9a47128 View commit details
    Browse the repository at this point in the history
  8. mxqd.c: Require whitelist on exclusive daemon

    If the daemon was stared with `--exclusive`, only start jobs which have
    the daemon in their whitelist.
    donald committed Apr 19, 2020
    Copy the full SHA
    5f0f6d9 View commit details
    Browse the repository at this point in the history
  9. Copy the full SHA
    5072c87 View commit details
    Browse the repository at this point in the history
  10. keywordset: Fix wrong substring match

    Do not match "abcdef" with "abc" in find_name().
    donald committed Apr 19, 2020
    Copy the full SHA
    6362a8d View commit details
    Browse the repository at this point in the history
  11. 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.
    donald committed Apr 19, 2020
    Copy the full SHA
    dbaa76b View commit details
    Browse the repository at this point in the history
  12. keywordset: Add keywordset_add

    Add function keywordset_add to update a keywordset with names from a
    string, not requiring  embedded "+" markers.
    donald committed Apr 19, 2020
    Copy the full SHA
    c083e4f View commit details
    Browse the repository at this point in the history
  13. Copy the full SHA
    19d0aac View commit details
    Browse the repository at this point in the history
  14. keywordset.h: Add keywordset_free_byref

    Add function keywordset_free_byref to be used with `__attribute__
    ((cleanup))`.
    donald committed Apr 19, 2020
    Copy the full SHA
    62c4f57 View commit details
    Browse the repository at this point in the history
  15. Makefile: Let test_mxqd_control use keywordset

    The inlined keywordset_free_byref from keywordset.h uses
    keywordset_free, so link keywordset.o in, too.
    donald committed Apr 19, 2020
    Copy the full SHA
    1b24dab View commit details
    Browse the repository at this point in the history
  16. Add parser.y

    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
    donald committed Apr 19, 2020
    Copy the full SHA
    74aaa54 View commit details
    Browse the repository at this point in the history
  17. Add test_parser

    Add a test for the expression parser.
    donald committed Apr 19, 2020
    Copy the full SHA
    90e790b View commit details
    Browse the repository at this point in the history
  18. Add parser to Makefile

    donald committed Apr 19, 2020
    Copy the full SHA
    fca297c View commit details
    Browse the repository at this point in the history
  19. .gitignore: Add parser

    donald committed Apr 19, 2020
    Copy the full SHA
    12945aa View commit details
    Browse the repository at this point in the history
  20. 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.
    donald committed Apr 19, 2020
    Copy the full SHA
    ab90990 View commit details
    Browse the repository at this point in the history
  21. Copy the full SHA
    2a8be9f View commit details
    Browse the repository at this point in the history
  22. Copy the full SHA
    a10e639 View commit details
    Browse the repository at this point in the history
  23. sql: Add column prerequisites for group

    Add add column to store a prerequisites expression which the group
    requires from the server.
    donald committed Apr 19, 2020
    Copy the full SHA
    5dfc5a8 View commit details
    Browse the repository at this point in the history
  24. Copy the full SHA
    2463cb9 View commit details
    Browse the repository at this point in the history
  25. Copy the full SHA
    9fe7aed View commit details
    Browse the repository at this point in the history
  26. Copy the full SHA
    10af18a View commit details
    Browse the repository at this point in the history
  27. Copy the full SHA
    e982239 View commit details
    Browse the repository at this point in the history
  28. 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.
    donald committed Apr 19, 2020
    Copy the full SHA
    4850634 View commit details
    Browse the repository at this point in the history
  29. Copy the full SHA
    4761df0 View commit details
    Browse the repository at this point in the history
  30. mxqd: Reformulate server_is_qualified

    Reformulate server_is_qualified to make it (IMO) easier to understand
    and easier to expand.
    donald committed Apr 19, 2020
    Copy the full SHA
    1b3faf5 View commit details
    Browse the repository at this point in the history
  31. mxqd: Check prerequisites

    donald committed Apr 19, 2020
    Copy the full SHA
    338b12d View commit details
    Browse the repository at this point in the history
  32. Copy the full SHA
    190d7d2 View commit details
    Browse the repository at this point in the history
  33. mxqsub: Add --prerequisites

    If the users specifies a prerequisites expression with --prerequisites,
    parse it to verify its syntax and store it as a group attribute.
    donald committed Apr 19, 2020
    Copy the full SHA
    405bfcb View commit details
    Browse the repository at this point in the history
  34. web: Add server detail page

    donald committed Apr 19, 2020
    Copy the full SHA
    c487c6c View commit details
    Browse the repository at this point in the history
  35. Copy the full SHA
    63d6f12 View commit details
    Browse the repository at this point in the history