diff --git a/.gitignore b/.gitignore index 65476f3bad3e8678e256558f671bba589eafa437..7589a8fe8d1f9c216aa281abbca47c9b96d4c869 100644 --- a/.gitignore +++ b/.gitignore @@ -18,6 +18,9 @@ Makefile /etc/cgroup.release_common.example /etc/init.d.slurm /etc/init.d.slurmdbd +/etc/slurmctld.service +/etc/slurmd.service +/etc/slurmdbd.service /libtool /slurm/slurm.h /slurm/stamp-h2 diff --git a/NEWS b/NEWS index 07df743d3cdbcccd257128d80826b1a4c6e88147..45203d7eecfea8de7b7093471fd81fc815f53abd 100644 --- a/NEWS +++ b/NEWS @@ -9,6 +9,14 @@ documents those changes that are of interest to users and administrators. -- Squeue recombines pending job array records only if their name and partition are identical. -- Fix some minor leaks in the job info and step info API. + -- Export missing QOS id when filling in association with the association + manager. + -- Fix invalid reference if a lua job_submit plugin references a default qos + when a user doesn't exist in the database. + -- Use association enforcement in the lua plugin. + -- Fix a few spots missing defines of accounting_enforce or acct_db_conn + in the plugins. + -- Show requested TRES in scontrol show jobs when job is pending. * Changes in Slurm 15.08.2 ========================== diff --git a/doc/html/Makefile.am b/doc/html/Makefile.am index 4c9488eef84d94325f80bcb1e770844517d5becb..90cc9f757585a50274df807f0ea5b65990659563 100644 --- a/doc/html/Makefile.am +++ b/doc/html/Makefile.am @@ -120,7 +120,6 @@ html_DATA = \ ibm_pe_fig2.png \ k_function.gif \ linuxstyles.css \ - lll.gif \ mc_support.gif \ plane_ex1.gif \ plane_ex2.gif \ diff --git a/doc/html/Makefile.in b/doc/html/Makefile.in index 5c85cd8f3a044d07f88970afbf413be62efa96ae..38c6fcbe8fd35f01b493fbe9dfb05a7fe8b1e954 100644 --- a/doc/html/Makefile.in +++ b/doc/html/Makefile.in @@ -550,7 +550,6 @@ html_DATA = \ ibm_pe_fig2.png \ k_function.gif \ linuxstyles.css \ - lll.gif \ mc_support.gif \ plane_ex1.gif \ plane_ex2.gif \ diff --git a/doc/html/download.shtml b/doc/html/download.shtml index 249c44351cf27c155203920d91cf87ab8fa78e5c..1292123657e33c0a57c20afa55dd637a83adbc9a 100644 --- a/doc/html/download.shtml +++ b/doc/html/download.shtml @@ -29,7 +29,7 @@ a message.</li> <li><b>MUNGE</b> (recommended)<br> In order to compile the "auth/munge" authentication plugin for Slurm, you will need to build and install MUNGE, available from -<a href="https://code.google.com/p/munge/">https://code.google.com/p/munge/</a> and +<a href="http://dun.github.io/munge/">http://dun.github.io/munge/</a> and <a href="http://packages.debian.org/src:munge">Debian</a> and <a href="http://fedoraproject.org/">Fedora</a> and <a href="http://packages.ubuntu.com/src:munge">Ubuntu</a>.</li> @@ -397,6 +397,6 @@ Slurm-based HPC supercomputers. The website of Slurm-web, with screenshots:<br> </ul> -<p style="text-align:center;">Last modified 27 July 2015</p> +<p style="text-align:center;">Last modified 19 October 2015</p> <!--#include virtual="footer.txt"--> diff --git a/doc/html/lll.gif b/doc/html/lll.gif deleted file mode 100644 index d1227248e0ac713e2206273b4009d96d3f5184b3..0000000000000000000000000000000000000000 Binary files a/doc/html/lll.gif and /dev/null differ diff --git a/doc/html/resource_limits.shtml b/doc/html/resource_limits.shtml index 447c2559574401d5f4c13fbe21f45c3b92ad74ab..41f6ba59621e56d6572fc4fe4fef59eff5fc22c4 100644 --- a/doc/html/resource_limits.shtml +++ b/doc/html/resource_limits.shtml @@ -9,10 +9,10 @@ is strongly recommended before use of this document.</p> Maui and Moab are not integrated with Slurm's resource limits, but should use their own resource limits mechanisms.</p> -<h2>Hierachy</h2> +<h2>Hierarchy</h2> <p>Slurm's hierarchical limits are enforced in the following order - with Job QOS and Partition QOS order being reversable by using the QOS + with Job QOS and Partition QOS order being reversible by using the QOS flag 'OverPartQOS':</p> <ol> <li>Partition QOS limit</li> @@ -24,7 +24,7 @@ but should use their own resource limits mechanisms.</p> <li>None</li> </ol> -<p>Note: If limits are defined at multiple points in this hierachy, +<p>Note: If limits are defined at multiple points in this hierarchy, the point in this list where the limit is first defined will be used. Consider the following example:</p> <ul> @@ -171,7 +171,7 @@ specified then no limit will apply.</p> <li><b>MaxTRESMinsPerJob=</b> A limit of TRES minutes to be used by a job. If this limit is reached the job will be killed if not running in - Safe mode, othewise the job will pend until enough time is given to + Safe mode, otherwise the job will pend until enough time is given to complete the job. </li> @@ -224,7 +224,7 @@ specified then no limit will apply.</p> children have to the above system. Can also be the string "parent", when used on a user this means that the parent association is used for fairshare. If Fairshare=parent is set on an account, that - account's children will be effectively reparented for fairshare + account's children will be effectively re-parented for fairshare calculations to the first parent of their parent that is not Fairshare=parent. Limits remain the same, only it's fairshare value is affected. @@ -265,6 +265,6 @@ data maintained in the Slurm database. More information can be found in the <a href="priority_multifactor.html">priority/multifactor</a> plugin description.</p> -<p style="text-align: center;">Last modified 24 September 2015</p> +<p style="text-align: center;">Last modified 19 October 2015</p> </ul></body></html> diff --git a/doc/html/team.shtml b/doc/html/team.shtml index 725de28e490300aed13ebe870ec8b5cfce3c7173..d1d48caa8d7c44838d8f0e9937cce4dc7b0c6264 100644 --- a/doc/html/team.shtml +++ b/doc/html/team.shtml @@ -229,7 +229,7 @@ Lead Slurm developers are: <li>Daniel M. Weeks (Rensselaer Polytechnic Institute)</li> <li>Nathan Weeks (Iowa State University)</li> <li>Andy Wettstein (University of Chicago)</li> -<li>Tim Wickberg (George Washington University)</li> +<li>Tim Wickberg (SchedMD)</li> <li>Chandler Wilkerson (Rice University)</li> <li>Ramiro Brito Willmersdorf (Universidade Federal de Pemambuco, Brazil)</li> <li>Jay Windley (Linux NetworX)</li> @@ -241,6 +241,6 @@ Lead Slurm developers are: <!-- INDIVIDUALS, PLEASE KEEP IN ALPHABETICAL ORDER --> </ul> -<p style="text-align:center;">Last modified 19 October 2015</p> +<p style="text-align:center;">Last modified 26 October 2015</p> <!--#include virtual="footer.txt"--> diff --git a/doc/html/tres.shtml b/doc/html/tres.shtml index f59b34cc2dc5acd41e13bd18011eb94b3aec0bdf..b4d9820705ef27cb4c774b7a38430355daebab5f 100644 --- a/doc/html/tres.shtml +++ b/doc/html/tres.shtml @@ -98,13 +98,13 @@ with: number of allocated CPUs. </p> -<p><b>NOTE:</b> TRESBillingWeights is only used when calcuating fairshare and +<p><b>NOTE:</b> TRESBillingWeights is only used when calculating fairshare and doesn't affect job priority directly as it is currently not used for the size of the job. If you want TRES' to play a role in the job's priority then refer to the PriorityWeightTRES option. </p> -<p><b>NOTE:</b> As with PriorityWeightTRES only TRES definied in +<p><b>NOTE:</b> As with PriorityWeightTRES only TRES defined in AccountingStorageTRES are available for TRESBillingWeights. </p> </li> @@ -128,6 +128,6 @@ the PriorityWeightTRES option. for the requested TRES types. More information about these reports can be found on the <a href="sreport.html">sreport manpage</a>. </p> -<p style="text-align:center;">Last modified 8 September 2015</p> +<p style="text-align:center;">Last modified 19 October 2015</p> <!--#include virtual="footer.txt"--> diff --git a/src/api/job_info.c b/src/api/job_info.c index 6a64b639bcbaa22cc01e220ddc35428cf21e0a79..97cfc0ffb1f30516298dda1d7e9112733a508bac 100644 --- a/src/api/job_info.c +++ b/src/api/job_info.c @@ -693,7 +693,8 @@ line6: /****** Line 16 ******/ /* Tres should already of been converted at this point from simple */ snprintf(tmp_line, sizeof(tmp_line), "TRES=%s", - job_ptr->tres_alloc_str); + job_ptr->tres_alloc_str ? job_ptr->tres_alloc_str : + job_ptr->tres_req_str); xstrcat(out, tmp_line); if (one_liner) xstrcat(out, " "); diff --git a/src/common/assoc_mgr.c b/src/common/assoc_mgr.c index e74ec3ec3f9af3589f71c769349d6da32b80c848..2ef983d60d44fe9d1e406279cfae6a7887c6fc75 100644 --- a/src/common/assoc_mgr.c +++ b/src/common/assoc_mgr.c @@ -2280,6 +2280,8 @@ extern int assoc_mgr_fill_in_assoc(void *db_conn, if (!assoc->cluster) assoc->cluster = ret_assoc->cluster; + assoc->def_qos_id = ret_assoc->def_qos_id; + if (!assoc->grp_tres_mins) assoc->grp_tres_mins = ret_assoc->grp_tres_mins; if (!assoc->grp_tres_run_mins) diff --git a/src/plugins/burst_buffer/cray/burst_buffer_cray.c b/src/plugins/burst_buffer/cray/burst_buffer_cray.c index c6e13eedf45d0d46c58a9d39c5d7c34fff7d93ce..3bb51f7170e7b0d3c23c553e5d98d41f406687aa 100644 --- a/src/plugins/burst_buffer/cray/burst_buffer_cray.c +++ b/src/plugins/burst_buffer/cray/burst_buffer_cray.c @@ -109,6 +109,19 @@ static bb_state_t bb_state; static uint32_t last_persistent_id = 1; static char * state_save_loc = NULL; +/* These are defined here so when we link with something other than + * the slurmctld we will have these symbols defined. They will get + * overwritten when linking with the slurmctld. + */ +#if defined (__APPLE__) +int accounting_enforce __attribute__((weak_import)) = 0; +void *acct_db_conn __attribute__((weak_import)) = NULL; +#else +int accounting_enforce = 0; +void *acct_db_conn = NULL; +#endif + + /* Description of each Cray DW configuration entry */ typedef struct bb_configs { diff --git a/src/plugins/job_submit/lua/job_submit_lua.c b/src/plugins/job_submit/lua/job_submit_lua.c index 2a08b4e408ae3021b5a83e2b15e92669b2e2d343..e5aaebf5a68592830ba72501ff6f976ed8d47e46 100755 --- a/src/plugins/job_submit/lua/job_submit_lua.c +++ b/src/plugins/job_submit/lua/job_submit_lua.c @@ -118,6 +118,18 @@ time_t last_lua_resv_update = (time_t) 0; static pthread_mutex_t lua_lock = PTHREAD_MUTEX_INITIALIZER; #endif +/* These are defined here so when we link with something other than + * the slurmctld we will have these symbols defined. They will get + * overwritten when linking with the slurmctld. + */ +#if defined (__APPLE__) +int accounting_enforce __attribute__((weak_import)) = 0; +void *acct_db_conn __attribute__((weak_import)) = NULL; +#else +int accounting_enforce = 0; +void *acct_db_conn = NULL; +#endif + /*****************************************************************************\ * We've provided a simple example of the type of things you can do with this * plugin. If you develop another plugin that may be of interest to others @@ -228,8 +240,8 @@ static char *_get_default_account(uint32_t user_id) memset(&user, 0, sizeof(slurmdb_user_rec_t)); user.uid = user_id; - if (assoc_mgr_fill_in_user(acct_db_conn, - &user, 0, NULL) != SLURM_ERROR) { + if (assoc_mgr_fill_in_user(acct_db_conn, &user, accounting_enforce, + NULL) != SLURM_ERROR) { return user.default_acct; } else { return NULL; @@ -240,9 +252,8 @@ static char *_get_default_account(uint32_t user_id) static char *_get_default_qos(uint32_t user_id, char *account, char *partition) { slurmdb_assoc_rec_t assoc; - slurmdb_assoc_rec_t *assoc_ptr; slurmdb_qos_rec_t qos; - uint32_t qos_id; + uint32_t qos_id = 0; memset(&assoc, 0, sizeof(slurmdb_assoc_rec_t)); assoc.uid = user_id; @@ -252,21 +263,18 @@ static char *_get_default_qos(uint32_t user_id, char *account, char *partition) } else { assoc.acct = _get_default_account(user_id); } - if (assoc_mgr_fill_in_assoc(acct_db_conn, &assoc, 0, - &assoc_ptr, false) != SLURM_ERROR) { - qos_id = assoc_ptr->def_qos_id; - } else { - return NULL; - } - if (!qos_id) { + if (assoc_mgr_fill_in_assoc(acct_db_conn, &assoc, accounting_enforce, + NULL, false) != SLURM_ERROR) + qos_id = assoc.def_qos_id; + + if (!qos_id) return NULL; - } memset(&qos, 0, sizeof(slurmdb_qos_rec_t)); qos.id = qos_id; - if (assoc_mgr_fill_in_qos(acct_db_conn, - &qos, 0, NULL, false) != SLURM_ERROR) { + if (assoc_mgr_fill_in_qos(acct_db_conn, &qos, accounting_enforce, + NULL, false) != SLURM_ERROR) { return qos.name; } else { return NULL; diff --git a/src/plugins/jobcomp/elasticsearch/jobcomp_elasticsearch.c b/src/plugins/jobcomp/elasticsearch/jobcomp_elasticsearch.c index f4225f71bf433126aa34c5a8cc041898cc0a7cb3..34459dc7e7f050bed38802a5c7135d480bb77ce7 100644 --- a/src/plugins/jobcomp/elasticsearch/jobcomp_elasticsearch.c +++ b/src/plugins/jobcomp/elasticsearch/jobcomp_elasticsearch.c @@ -110,6 +110,18 @@ const uint32_t plugin_version = SLURM_VERSION_NUMBER; "\"nodes\":\"%s\",\"total_cpus\":%lu,\"total_nodes\":%lu,"\ "\"derived_exitcode\":%lu,\"exitcode\":%lu,\"state\":\"%s\"" +/* These are defined here so when we link with something other than + * the slurmctld we will have these symbols defined. They will get + * overwritten when linking with the slurmctld. + */ +#if defined (__APPLE__) +int accounting_enforce __attribute__((weak_import)) = 0; +void *acct_db_conn __attribute__((weak_import)) = NULL; +#else +int accounting_enforce = 0; +void *acct_db_conn = NULL; +#endif + /* Type for error string table entries */ typedef struct { int xe_number;