Qos limits associations and AD auth Sorry for all the wierd symbols, I
   was copying the code from linux terminal
   here is the clean code(I hope):

   if ((accounting_enforce & ACCOUNTING_ENFORCE_QOS)
   && assoc_ptr
   && !admin
   && (!assoc_ptr->usage->valid_qos
   || !bit_test(assoc_ptr->usage->valid_qos, qos_rec->id))) {
   error("This association %d(account='%s', "
   "user='%s', partition='%s') does not have "
   "access to qos %s",
   assoc_ptr->id, assoc_ptr->acct, assoc_ptr->user,
   assoc_ptr->partition, qos_rec->name);
   *error_code = ESLURM_INVALID_QOS;
   return NULL;
   }

   \[\-\-HhwWKyboDM_TMP[if !supportLineBreakNewLine]DM_TMPHhwWKybo\-\-\]
   \[\-\-HhwWKyboDM_TMP[endif]DM_TMPHhwWKybo\-\-\]
   \[\-\-HhwWKyboDM_TMP[if gte mso 9]> \[\-\-HhwWKyboDM_TMP[if gte mso
   9]> Normal 0 false false false EN-US X-NONE HE \[\-\-HhwWKyboDM_TMP /*
   Font Definitions */ @font-face {font-family:Calibri; panose-1:2 15 5 2
   2 2 4 3 2 4; mso-font-charset:0; mso-generic-font-family:swiss;
   mso-font-pitch:variable; mso-font-signature:-536870145 1073786111 1 0
   415 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal,
   div.MsoNormal {mso-style-unhide:no; mso-style-qformat:yes;
   mso-style-parent:""; margin-top:0cm; margin-right:0cm;
   margin-bottom:10.0pt; margin-left:0cm; text-align:right;
   line-height:115%; mso-pagination:widow-orphan; direction:rtl;
   unicode-bidi:embed; font-size:11.0pt;
   font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri;
   mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri;
   mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri;
   mso-hansi-theme-font:minor-latin; mso-bidi-font-family:Arial;
   mso-bidi-theme-font:minor-bidi;} .MsoChpDefault
   {mso-style-type:export-only; mso-default-props:yes;
   font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri;
   mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri;
   mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri;
   mso-hansi-theme-font:minor-latin; mso-bidi-font-family:Arial;
   mso-bidi-theme-font:minor-bidi;} .MsoPapDefault
   {mso-style-type:export-only; margin-bottom:10.0pt; line-height:115%;}
   @page WordSection1 {size:612.0pt 792.0pt; margin:72.0pt 90.0pt 72.0pt
   90.0pt; mso-header-margin:36.0pt; mso-footer-margin:36.0pt;
   mso-paper-source:0;} div.WordSection1 {page:WordSection1;}
   DM_TMPHhwWKybo\-\-\] \[\-\-HhwWKyboDM_TMP[if gte mso 10]>

   if (assoc_mgr_fill_in_assoc(acct_db_conn, &assoc_rec,
   accounting_enforce, &assoc_ptr, false)) {
   info("_job_create: invalid account or partition for user %u, "
   "account '%s', and partition '%s'",
   job_desc->user_id, assoc_rec.acct, assoc_rec.partition);
   error_code = ESLURM_INVALID_ACCOUNT;
   goto cleanup_fail;

   \[\-\-HhwWKyboDM_TMP[if gte mso 9]> \[\-\-HhwWKyboDM_TMP[if gte mso
   9]> Normal 0 false false false EN-US X-NONE HE \[\-\-HhwWKyboDM_TMP /*
   Font Definitions */ @font-face {font-family:Calibri; panose-1:2 15 5 2
   2 2 4 3 2 4; mso-font-charset:0; mso-generic-font-family:swiss;
   mso-font-pitch:variable; mso-font-signature:-536870145 1073786111 1 0
   415 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal,
   div.MsoNormal {mso-style-unhide:no; mso-style-qformat:yes;
   mso-style-parent:""; margin-top:0cm; margin-right:0cm;
   margin-bottom:10.0pt; margin-left:0cm; text-align:right;
   line-height:115%; mso-pagination:widow-orphan; direction:rtl;
   unicode-bidi:embed; font-size:11.0pt;
   font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri;
   mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri;
   mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri;
   mso-hansi-theme-font:minor-latin; mso-bidi-font-family:Arial;
   mso-bidi-theme-font:minor-bidi;} .MsoChpDefault
   {mso-style-type:export-only; mso-default-props:yes;
   font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri;
   mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri;
   mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri;
   mso-hansi-theme-font:minor-latin; mso-bidi-font-family:Arial;
   mso-bidi-theme-font:minor-bidi;} .MsoPapDefault
   {mso-style-type:export-only; margin-bottom:10.0pt; line-height:115%;}
   @page WordSection1 {size:595.3pt 841.9pt; margin:72.0pt 90.0pt 72.0pt
   90.0pt; mso-header-margin:35.4pt; mso-footer-margin:35.4pt;
   mso-paper-source:0; mso-gutter-direction:rtl;} div.WordSection1
   {page:WordSection1;} DM_TMPHhwWKybo\-\-\] \[\-\-HhwWKyboDM_TMP[if gte
   mso 10]> \[\-\-HhwWKyboDM_TMP[if gte mso 9]> \[\-\-HhwWKyboDM_TMP[if
   gte mso 9]> Normal 0 false false false EN-US X-NONE HE
   \[\-\-HhwWKyboDM_TMP /* Font Definitions */ @font-face
   {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4;
   mso-font-charset:0; mso-generic-font-family:swiss;
   mso-font-pitch:variable; mso-font-signature:-536870145 1073786111 1 0
   415 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal,
   div.MsoNormal {mso-style-unhide:no; mso-style-qformat:yes;
   mso-style-parent:""; margin-top:0cm; margin-right:0cm;
   margin-bottom:10.0pt; margin-left:0cm; text-align:right;
   line-height:115%; mso-pagination:widow-orphan; direction:rtl;
   unicode-bidi:embed; font-size:11.0pt;
   font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri;
   mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri;
   mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri;
   mso-hansi-theme-font:minor-latin; mso-bidi-font-family:Arial;
   mso-bidi-theme-font:minor-bidi;} .MsoChpDefault
   {mso-style-type:export-only; mso-default-props:yes;
   font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri;
   mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri;
   mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri;
   mso-hansi-theme-font:minor-latin; mso-bidi-font-family:Arial;
   mso-bidi-theme-font:minor-bidi;} .MsoPapDefault
   {mso-style-type:export-only; margin-bottom:10.0pt; line-height:115%;}
   @page WordSection1 {size:612.0pt 792.0pt; margin:72.0pt 90.0pt 72.0pt
   90.0pt; mso-header-margin:36.0pt; mso-footer-margin:36.0pt;
   mso-paper-source:0;} div.WordSection1 {page:WordSection1;}
   DM_TMPHhwWKybo\-\-\] \[\-\-HhwWKyboDM_TMP[if gte mso 10]>
   On 18/10/2017 08:26, Nadav Toledo wrote:

   Hey everyone,
   I am working at a university and we trying to setup a slurm cluster
   for courses and research.
   for the courses we would like to enforce qos on users that can connect
   via pbis-open auth. meaning they are authenticating against AD server.
   There are alot of users and each semester they are changing.

   My question is, how can i achieve :

   A. enforce qosן¿½ (AccountingStorageEnforce=limits,qos)
   B. Don't enforce associations , meaning anyone who can login to the
   server can submit jobs
   C. having slurmdbd record each user activity
   D. The users are not in /etc/passwd, loging being made by pbis-open

   about B:ן¿½ The reason is I dont want to manually adding each user to
   the slurm database (sacctmgr create user...)

   Regarding A+B:
   I have seen this answer :<!-- tmpl_var LEFT_BRACKET -->1<!-- tmpl_var 
RIGHT_BRACKET 
-->https://groups.google.com/forum/#!msg/slurm-devel/9Iu4c_qTb8w/ec0O36eW7dsJ;context-place=searchin/slurm-devel/Association$20ldap|sort:relevance

   But for me atleast it doesn't seem to work, I comment out the
   following code(inside src/slurmctld/job_mgr.c), then make clean, make,
   make install, still got the error: srun: error: Unable to allocate
   resources: Invalid account or account/partition combination specified

   the error on slurmctld :
   slurmctld: error: User 243309139 not found
   slurmctld: _job_create: invalid account or partition for user
   243309139, account '(null)', and partition 'all'
   slurmctld: _slurm_rpc_allocate_resources: Invalid account or
   account/partition combination specified

   (243309139ן¿½ is the uid of a user auth against AD server, and doesn't
   show up in passwd nor in slurm database)

   /*ן¿½ן¿½ן¿½ן¿½ן¿½ if ((accounting_enforce & ACCOUNTING_ENFORCE_QOS)
   ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ && assoc_ptr
   ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ && !admin
   ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ && (!assoc_ptr->usage->valid_qos
   ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ ||
   !bit_test(assoc_ptr->usage->valid_qos, qos_rec->id))) {
   ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ error("This association
   %d(account='%s', "
   ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½
   "user='%s', partition='%s') does not have "
   ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½
   "access to qos %s",
   ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½
   assoc_ptr->id, assoc_ptr->acct, assoc_ptr->user,
   ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½
   assoc_ptr->partition, qos_rec->name);
   ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ *error_code =
   ESLURM_INVALID_QOS;
   ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ return NULL;
   ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ }
   */

   perhaps I should do something with these lines (same file)?
   ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ if (assoc_mgr_fill_in_assoc(acct_db_conn,
   &assoc_rec,
   
ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½
   accounting_enforce, &assoc_ptr, false)) {
   ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ info("_job_create:
   invalid account or partition for user %u, "
   ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ "account
   '%s', and partition '%s'",
   ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½
   job_desc->user_id, assoc_rec.acct, assoc_rec.partition);
   ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ error_code =
   ESLURM_INVALID_ACCOUNT;
   ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ן¿½ goto cleanup_fail;


   Thank you all for helping, Nadav

   

   <!-- tmpl_var LEFT_BRACKET -->1<!-- tmpl_var RIGHT_BRACKET --> 
https://groups.google.com/forum/#%21msg/slurm-devel/9Iu4c_qTb8w/ec0O36eW7dsJ;context-place=searchin/slurm-devel/Association$20ldap


Reply via email to