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

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
  4. mxqd: Don't try to unmount noexisting job tmpdir

    Only unmount and remove job temporary directories for jobs, which
    actually requested on to avoid meaningless warnings in the logfile.
    donald committed Apr 17, 2020
    Copy the full SHA
    5a07c9e View commit details
    Browse the repository at this point in the history
  5. Copy the full SHA
    76ca06e View commit details
    Browse the repository at this point in the history
  6. 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 17, 2020
    Copy the full SHA
    9c895a2 View commit details
    Browse the repository at this point in the history
  7. web: Add column daemon_flags

    donald committed Apr 17, 2020
    Copy the full SHA
    d93744f View commit details
    Browse the repository at this point in the history
  8. Copy the full SHA
    da1f32c View commit details
    Browse the repository at this point in the history
  9. Copy the full SHA
    290468e View commit details
    Browse the repository at this point in the history
  10. 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 17, 2020
    Copy the full SHA
    d80198d View commit details
    Browse the repository at this point in the history
  11. 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 17, 2020
    Copy the full SHA
    0c22c65 View commit details
    Browse the repository at this point in the history