Skip to content

Add disabled servers #81

Closed
wants to merge 24 commits into from
Closed

Add disabled servers #81

wants to merge 24 commits into from

Commits on Apr 13, 2020

  1. Add .vimrc to repository

    donald committed Apr 13, 2020
    Configuration menu
    Copy the full SHA
    a2fe22f View commit details
    Browse the repository at this point in the history
  2. mxqd: Ignore failure to scan JOB_TMPDIR_MNTDIR

    Avoid unneeded warning when scanning JOB_TMPDIR_MNTDIR for possible
    leftover job mounts. The parent directory of JOB_TMPDIR_MNTDIR is
    created when the first job with the --tmpdir feature is started. So
    it won't exist in a new server.
    
    This cleanup path is only used in the exceptional case that the usual
    cleanup path (via job_has_finished) didn't succeed, e.g. when mxqd was
    killed. The cleanup is not essential for the currently running server.
    donald committed Apr 13, 2020
    Configuration menu
    Copy the full SHA
    a1f5b77 View commit details
    Browse the repository at this point in the history
  3. mxq.h: Add attribute unused

    Add function attribute ((unusged)) to avoid a compiler warning when the
    static inline function defined in the header file is not used by the
    compilation unit.
    donald committed Apr 13, 2020
    Configuration menu
    Copy the full SHA
    f0f5ddd View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    459c5a8 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    c9f13bd View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    3961297 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    106d658 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    0a335e5 View commit details
    Browse the repository at this point in the history
  9. Add xmalloc.h

    Add header file for the quasi-standard [1] xmalloc call.
    
    Include x-version of strndup. Other functions (e.g. xrealloc) can be
    added as needed.
    
    The current approach implemented in mx_util is to wait and retry on
    ENOMEM malloc failure. However, this overhead doesn't seem to be
    justified, because it is difficult to imagine a case, where a malloc
    would fail with ENOMEM at one time and a retry would succeed.
    
    [1] https://www.gnu.org/software/libc/manual/html_node/Malloc-Examples.html
    donald committed Apr 13, 2020
    Configuration menu
    Copy the full SHA
    1b6bf14 View commit details
    Browse the repository at this point in the history
  10. Add keywordset module

    Add a utility module which can store a set of keywords. The set can be
    created and update from a string and can be serialized into a string.
    
    The string representation is a space-separated list of keywordis. Strings
    created by this utility contain the keywords stored in the set sorted in
    lexical order separated by a single space character.
    
    Input strings used to create or update a keyword set contain keywords
    separated by whitespace. Words from the string are added to the set
    unless a word starts with '-' in which case it will be removed from the
    
    Usage example:
    
        struct keywordset *kws = keywordset_new("xxx yyy")
        keywordset_update(kws, "-yyy aaaa")
    
        char *s = keywordset_get(kws):   // s now "aaaaa xxx"
        free(s);                         // caller must free()
    
        if (keywordset_ismember(kws,"xxx")) ... // true
    
        keywordset_free(kws);
    donald committed Apr 13, 2020
    Configuration menu
    Copy the full SHA
    2706f39 View commit details
    Browse the repository at this point in the history
  11. Add keywordset to build system

    donald committed Apr 13, 2020
    Configuration menu
    Copy the full SHA
    085cb76 View commit details
    Browse the repository at this point in the history
  12. mxqsub: Add option --disabled-servers

    Add a new option so that specific servers can be excluded from starting
    jobs for this group. E.g.:
    
        mxqsub --disabled-servers="dontpanic sigusr2" sleep 100
    donald committed Apr 13, 2020
    Configuration menu
    Copy the full SHA
    230988e View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    a041fcd View commit details
    Browse the repository at this point in the history
  14. Add command "mxqset"

    Add a new command which can be used to modify an existing group:
    
        mxqset group 123 --closed
        mxqset group 123 --open
        mxqset group 123 --disabled-servers=dontpanic
        mxqset group 123 --update-disabled-servers="sigusr sigusr2 -dontpanic"
        mxqset group 123 --disabled-servers=
    
    The flags open and closed can be set from mxqadmin as well
    (`mxqadmin --close=123`) , but the synopsis, in which the options take
    the groupid as a value is difficult to expand to options, which take a
    value by themself.
    donald committed Apr 13, 2020
    Configuration menu
    Copy the full SHA
    f86710d View commit details
    Browse the repository at this point in the history
  15. Add mxqset to build system

    donald committed Apr 13, 2020
    Configuration menu
    Copy the full SHA
    42c1f44 View commit details
    Browse the repository at this point in the history
  16. mxqdump: Show disabled servers

    donald committed Apr 13, 2020
    Configuration menu
    Copy the full SHA
    3c7e9c1 View commit details
    Browse the repository at this point in the history
  17. mxqd: Only start jobs we are qualified for

    Check, whether this server is qualified to start jobs from a group.
    Lazy-evaluate qualification criteria and cache the result.
    Don't start jobs we are not qualified for.
    
    For now, the only qualification criteria is, that our short or fully
    qualified hostname is not included the the excluded_servers set of the
    group.
    
    This can later be expanded to additional criteria (e.g. hostconfig or
    processor flags).
    donald committed Apr 13, 2020
    Configuration menu
    Copy the full SHA
    d7abbb2 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    2c6199f View commit details
    Browse the repository at this point in the history
  19. MXQ bump version

    donald committed Apr 13, 2020
    Configuration menu
    Copy the full SHA
    c737da4 View commit details
    Browse the repository at this point in the history

Commits on Apr 14, 2020

  1. fixup! Add keywordset module

    donald committed Apr 14, 2020
    Configuration menu
    Copy the full SHA
    b04d939 View commit details
    Browse the repository at this point in the history
  2. xmalloc: Add xrealloc

    donald committed Apr 14, 2020
    Configuration menu
    Copy the full SHA
    4f7c781 View commit details
    Browse the repository at this point in the history
  3. keywordset: Use xrealloc

    donald committed Apr 14, 2020
    Configuration menu
    Copy the full SHA
    6affb1d View commit details
    Browse the repository at this point in the history
  4. fixup! xmalloc: Add xrealloc

    donald committed Apr 14, 2020
    Configuration menu
    Copy the full SHA
    17613e5 View commit details
    Browse the repository at this point in the history
  5. xmalloc: Remove poor micro optimization

    The optimizing compiler predicts that pointer != NULL is more likely
    than pointer == NULL anyway. The generated code by "gcc -O2" is the
    same with or without __builtin_expect builtin.
    
    However, probably based on special knowledge of malloc either because of
    its __attribute__ ((malloc)) declaration or hard-coded, the optimization
    without the __builtin_expect builtin seems to be a bit more stronger:
    The function out_of_memory() is put into a .text.unlikely code segment,
    as if had attribute ((cold)) had been declared for it.
    
    Remove __builtin_expect.
    donald committed Apr 14, 2020
    Configuration menu
    Copy the full SHA
    85c3109 View commit details
    Browse the repository at this point in the history