Ticket 5432

Summary: sacct CamelCase user names
Product: Slurm Reporter: Tony <anthony.delsorbo>
Component: AccountingAssignee: Jacob Jenson <jacob>
Status: RESOLVED INVALID QA Contact:
Severity: 6 - No support contract    
Priority: --- CC: anthony.delsorbo, fordste5, tim
Version: 17.11.7   
Hardware: Linux   
OS: Linux   
Site: NOAA Slinky Site: ---
Alineos Sites: --- Atos/Eviden Sites: ---
Confidential Site: --- Coreweave sites: ---
Cray Sites: --- DS9 clusters: ---
Google sites: --- HPCnow Sites: ---
HPE Sites: --- IBM Sites: ---
NOAA SIte: NESCC NoveTech Sites: ---
Nvidia HWinf-CS Sites: --- OCF Sites: ---
Recursion Pharma Sites: --- SFW Sites: ---
SNIC sites: --- Tzag Elita Sites: ---
Linux Distro: --- Machine Name:
CLE Version: Version Fixed: 18.08.0
Target Release: --- DevPrio: ---
Emory-Cloud Sites: ---

Description Tony 2018-07-16 12:25:23 MDT
We're getting started using slurm.  Our organization uses CamelCase user names of the form John.Q.Smith.  This is an enterprise-side configuration that is controlled via ldap servers throughout the enterprise.  When setting up accounting, we were surprise to find a note for the User spec stating: "The login name. Only lowercase usernames are supported."  This is quite unfortunate for us as we rely heavily on accounting.  

We are now stuck.  Is there a workaround for this issue?  


I noticed in a previous bug that mixed case usernames was removed due to 'postgres' issues (?).  Are there plans to restore this capability?  Are there plans for supporting mixed case in the near future?  If so, when?  

Thanks

Tony.
Comment 1 Tony 2018-07-18 05:25:28 MDT
Update:

As per our telephone discussion, I am on a fast track to meet a very aggressive schedule.  I took a shot at making minor changes to the source code where it seemed appropriate for our needs.  Two files were changed: src/common/slurm_protocol_defs.c and src/sacctmgr/user_functions.c.  Below is a diff of the two files from their original.  

What I really need to know at this point is, what are the ramifications of making these seemingly minor changes that affect the "name" part of the sacctmgr command?  Are there other areas I missed that might also have to be changed?  To recap, here's the command and the error message that would be presented before the changes:

  sacctmgr add user John.Q.Smith Account=nesccmgmt DefaultAccount=nesccmgmt
  There is no uid for user 'john.q.smith'

==================== Code Changes =====================

--- slurm-17.11.7.orig/src/common/slurm_protocol_defs.c	2018-05-30 18:30:59.000000000 +0000
+++ slurm-17.11.7.noaa/src/common/slurm_protocol_defs.c	2018-07-18 11:03:50.978893998 +0000
@@ -304,7 +304,7 @@
 					} else
 						count++;
 
-					xstrtolower(name);
+					/* xstrtolower(name); */
 					list_append(char_list, name);
 
 					list_iterator_reset(itr);
@@ -384,7 +384,7 @@
 			} else
 				count++;
 
-			xstrtolower(name);
+			/* xstrtolower(name); */
 			list_append(char_list, name);
 		}
 	}


--- slurm-17.11.7.orig/src/sacctmgr/user_functions.c	2018-05-30 18:30:59.000000000 +0000
+++ slurm-17.11.7.noaa/src/sacctmgr/user_functions.c	2018-07-18 10:59:43.128327945 +0000
@@ -253,7 +253,7 @@
 					 MAX(command_len, 1))) {
 			if (user->name)
 				xfree(user->name);
-			user->name = strip_quotes(argv[i]+end, NULL, 1);
+			user->name = strip_quotes(argv[i]+end, NULL, 0);
 			u_set = 1;
 		} else if (!xstrncasecmp(argv[i], "RawUsage",
 					 MAX(command_len, 7))) {
Comment 2 Tim Wickberg 2018-10-04 18:16:59 MDT
This was fixed with the addition of Parameters=PreserveCaseUser in slurmdbd.conf which is available in 18.08.0 and on.
Comment 3 Tim Wickberg 2018-10-04 18:17:30 MDT
*** Ticket 5813 has been marked as a duplicate of this ticket. ***