Ticket 4912

Summary: spank_option_getopt returns ESPANK_ERROR in slurm_spank_user_init
Product: Slurm Reporter: joshua.weage
Component: OtherAssignee: Jacob Jenson <jacob>
Status: RESOLVED INVALID QA Contact:
Severity: 6 - No support contract    
Priority: ---    
Version: 17.11.2   
Hardware: Linux   
OS: Linux   
Site: -Other- Alineos Sites: ---
Atos/Eviden Sites: --- Confidential Site: ---
Coreweave sites: --- Cray Sites: ---
DS9 clusters: --- HPCnow Sites: ---
HPE Sites: --- IBM Sites: ---
NOAA SIte: --- OCF Sites: ---
Recursion Pharma Sites: --- SFW Sites: ---
SNIC sites: --- Linux Distro: ---
Machine Name: CLE Version:
Version Fixed: Target Release: ---
DevPrio: --- Emory-Cloud Sites: ---
Attachments: Sample plugin replicating the error

Description joshua.weage 2018-03-13 12:43:04 MDT
Created attachment 6364 [details]
Sample plugin replicating the error

The spank_option_getopt function does not appear to work correctly from slurm_spank_user_init(). It returns ESPANK_ERROR even though the option was set via sbatch. I have to use a global variable via the option callback to get access to the user supplied option.

Sample plugin code is attached.

Example output:

[2018-03-13T13:40:36.000] debug: slurm_spank_job_prolog start
[2018-03-13T13:40:36.000] debug: slurm_spank_job_prolog got debug option value 1000
[2018-03-13T13:40:36.000] debug: slurm_spank_job_prolog complete
[2018-03-13T13:40:36.046] _run_prolog: run job script took usec=54914
[2018-03-13T13:40:36.049] _run_prolog: prolog with lock for job 162 ran for 1 seconds
[2018-03-13T13:40:36.050] Launching batch job 162 for UID 1001
[2018-03-13T13:40:36.148] [162.batch] debug: _debug_opt_process S_CTX_REMOTE
[2018-03-13T13:40:36.149] [162.batch] debug: valid option --debug=1000
[2018-03-13T13:40:36.150] [162.batch] debug: slurm_spank_user_init start
[2018-03-13T13:40:36.150] [162.batch] debug: slurm_spank_user_init S_CTX_REMOTE
[2018-03-13T13:40:36.150] [162.batch] debug: slurm_spank_user_init S_JOB_ID 162
[2018-03-13T13:40:36.150] [162.batch] debug: slurm_spank_user_init S_JOB_STEPID 4294967294
[2018-03-13T13:40:36.150] [162.batch] debug: slurm_spank_user_init debug_option ESPANK_ERROR
[2018-03-13T13:40:36.150] [162.batch] debug: slurm_spank_user_init got _debug value 1000
[2018-03-13T13:40:36.150] [162.batch] debug: slurm_spank_user_init complete
[2018-03-13T13:40:36.187] [162.batch] sending REQUEST_COMPLETE_BATCH_SCRIPT, error:0 status 0
[2018-03-13T13:40:36.190] [162.batch] done with job
[2018-03-13T13:40:36.198] debug: slurm_spank_job_epilog start
[2018-03-13T13:40:36.198] debug: slurm_spank_job_epilog complete