1. 28 Mar, 2012 3 commits
  2. 27 Mar, 2012 2 commits
  3. 26 Mar, 2012 5 commits
  4. 24 Mar, 2012 1 commit
  5. 23 Mar, 2012 7 commits
  6. 22 Mar, 2012 11 commits
  7. 21 Mar, 2012 11 commits
    • Mark A. Grondona's avatar
      Add NEWS items for spank enhancements · 7662d736
      Mark A. Grondona authored
      7662d736
    • Mark A. Grondona's avatar
      spank: Update spank man page · 18dd332d
      Mark A. Grondona authored
      Update spank(8) man page with documentation of new functionality,
      including new callbacks: slurm_spank_slurmd_init, slurm_spank_slurmd_exit,
      slurm_spank_job_prolog, and slurm_spank_job_epilog, as well as the new
      spank_option_getopt() call for use in option processing by plugins.
      18dd332d
    • Mark A. Grondona's avatar
      spank: Update spank.h header · 4db90340
      Mark A. Grondona authored
      Update spank header comments and documentation.
      
      Add #defines for new slurmd and job prolog/epilog contexts, so that
      their existence can be tested at compile time.
      4db90340
    • Mark A. Grondona's avatar
      spank: add spank_option_getopt to spank api · 22895652
      Mark A. Grondona authored
      Add a new call to process spank options from a plugin.
      
      The spank_option_getopt() function will search the current
      spank environment for use of the option passed as an argument.
      The current option cache, and the local environment are checked
      for the use of the given spank option. This call is an alternative
      to use of a global variable in combination with the option callback,
      and is also needed for processing options in the isolated contexts
      of slurm_spank_job_prolog() and slurm_spank_job_epilog().
      22895652
    • Mark A. Grondona's avatar
      spank: clear unneded spank option environment vars · 1dbecf48
      Mark A. Grondona authored
      Add spank_clear_remote_options_env() to clear any spank options
      passed through the environment after they are no longer needed.
      This is done in slurmd after running the spank job prolog || epilog,
      as well as in the spank_post_opt function, after the env has been
      searched for spank variables.
      1dbecf48
    • Mark A. Grondona's avatar
      spank: always set options in environment · e1aae025
      Mark A. Grondona authored
      Always set spank options in the environemnt and spank job environment
      to ensure that used options are propagated to the job prolog and
      epilog.  (Previously, spank options were set in the environment
      only in allocator context)
      e1aae025
    • Mark A. Grondona's avatar
      spank: avoid loading plugins with no callbacks for current context · 83f7922b
      Mark A. Grondona authored
      In slurmd and job prolog/epilog contexts, avoid loading plugins that
      have no callbacks in the context in which they are loaded. That is
      for slurmd, if there are no slurm_spank_slurmd_init or
      slurm_spank_slurmd_exit callbacks, there is no reason to keep the
      current plugin loaded.
      83f7922b
    • Mark A. Grondona's avatar
      slurmd: Refactor code to run prolog/epilog · cac3ae6d
      Mark A. Grondona authored
      We now want to return error on failure of either spank prolog/epilog
      or regular prolog/epilog scripts, so add a common function _run_job_script
      to handle return of shared error code.
      
      For now, we continue to run the normal prolog or epilog even if the spank
      prolog/epilog fail. In the future, a failure the spank prolog/epilog may
      short-circuit the run of the normal scripts.
      cac3ae6d
    • Mark A. Grondona's avatar
      slurmd: Call spank prolog and epilog hooks · e33b820c
      Mark A. Grondona authored
      Call spank_job_prolog() and spank_job_epilog() at prolog/epilog
      time by invoking "slurmstepd spank [prolog|epilog]"
      
      The prolog and epilog spank plugin hooks are not called within the
      virtual address space of slurmd for at least a couple of reasons,
      including
      
       1. Plugins dlopened in the address space of slurmd cannot be dlopened
         a second time. Therefore, static and global state in the DSO may
         be "dirty" in that some state may be preserved from the last epilog
         or prolog call, or even from the slurmd_init callback.
      
       2. The prolog and epilog need to be guaranteed reentrant. The safest
         way to guarantee this is to ensure prolog/epilog hooks are called
         from a separate address space.
      
       3. To satisfy "principle of least surprise" we want to have new plugins
         installed run their prolog/epilog hooks on the next job, just as
         if an update to the prolog/epilog script was made. The only way to
         guarantee this is to reload the spank plugin stack from plugstack.conf
         on each run. Because of #1 above, this needs to be done in a separate
         process.
      e33b820c
    • Mark A. Grondona's avatar
      slurmd: Always set conf->stepd_loc to slurmstepd path · 6722705f
      Mark A. Grondona authored
      Greatly simplify ability of code to get at current slurmstepd path
      by setting slurmd's conf->stepd_loc to the default slurmstped path
      if that path was not overridden on the command line.
      
      This allows slurmd code to directly use conf->stepd_loc, instead of
      requiring the duplicated code that created the default slurmstepd
      path if conf->stepd_loc was not set at each call site.
      6722705f
    • Mark A. Grondona's avatar
      use exponential backoff in waitpid_timeout · 8e201175
      Mark A. Grondona authored
      Make waitpid_timeout() return more quickly when the child exits before
      1s but after the initial call to waitpid(2).
      8e201175