-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] zos_jobs_submit failed without any explanation when having a JCL Error #624
Comments
Hello @vlodeibm - starting to triage this so we can evaluate it, looks like your JCL error was a data set not found, can you confirm so that we know how to recreate if needed. |
@IBMAnsibleHelper - looks like it was introduced in PR #251 when other features were added. It so happens 1.5.0-beta.1 coming out very soon includes a large rewrite of the In 1.4.0-beta.1 this was introduced in the noted PR and happens because the check throws a submitError that has no content and nothing catches it further to throw a module.fail_json(...). In 1.5.0-beta.1 the code is capturing the JCL error yet the full job output does not appear it will be not be propagated by design and instead what is propagated are more specific messages as to why the job failed and also includes the job ID so that one can use Additionally, a more complete test case is needed, there are some but we should be more specific in what is captured for comparison. We will be looking into this to decide how to handle a 1.4.x change. |
If 1.5.0-beta.1 is confirmed to not return job ouput and by design provides more targeted messaging this should be an announcement in our discussions. |
hello @ddimatos I confirm that in this case, the JCL error is due to Data set indicated in joblib car doe not exist |
Ok, thank you @vlodeibm - we will try to recreate this with JCL such that the DSN does not exist, for that matter it could probably be any JCL error that would exercise the issue no job_output came back. |
@vlodeibm - I am trying this on 1.4 and not able to recreate it, i have similar NOT FOUND for JOBLIB entry in my output: JCL:
Output:
|
In 1.5.0-beta.1 same test I get:
|
In what will be 1.5.0 GA in a few weeks (not available in galaxy/hub yet) the same test returns the job log a bit more information. Msg in response:
Response:
|
Was not able to reproduce in 1.4.0 or 1.5.0-beta.1. There is no more work being done for 1.4.0 past the next 1.4.1 which is already code frozen, thus thus this can be considered fixed in 1.5.0. |
Bug description
When using zos_jobs_submit to submit a JCL on which one we have an JCL Error, with have this message :
module_stderr: Shared connection to 9.30.222.103 closed.
module_stdout: |-
Traceback (most recent call last):
File "/u/vlode/.ansible/tmp/ansible-tmp-1675089822.939972-3762-210145075551644/AnsiballZ_zos_job_submit.py", line 100, in
_ansiballz_main()
File "/u/vlode/.ansible/tmp/ansible-tmp-1675089822.939972-3762-210145075551644/AnsiballZ_zos_job_submit.py", line 92, in _ansiballz_main
invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
File "/u/vlode/.ansible/tmp/ansible-tmp-1675089822.939972-3762-210145075551644/AnsiballZ_zos_job_submit.py", line 40, in invoke_module
runpy.run_module(mod_name='ansible_collections.ibm.ibm_zos_core.plugins.modules.zos_job_submit', init_globals=dict(_module_fqn='ansible_collections.ibm.ibm_zos_core.plugins.modules.zos_job_submit', _modlib_path=modlib_path),
File "/var/usr/lpp/IBM/cyp/v3r10/pyz/lib/python3.10/runpy.py", line 224, in run_module
return _run_module_code(code, init_globals, run_name, mod_spec)
File "/var/usr/lpp/IBM/cyp/v3r10/pyz/lib/python3.10/runpy.py", line 96, in _run_module_code
_run_code(code, mod_globals, init_globals,
File "/var/usr/lpp/IBM/cyp/v3r10/pyz/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/tmp/ansible_ibm.ibm_zos_core.zos_job_submit_payload_czn4l_ba/ansible_ibm.ibm_zos_core.zos_job_submit_payload.zip/ansible_collections/ibm/ibm_zos_core/plugins/modules/zos_job_submit.py", line 907, in
File "/tmp/ansible_ibm.ibm_zos_core.zos_job_submit_payload_czn4l_ba/ansible_ibm.ibm_zos_core.zos_job_submit_payload.zip/ansible_collections/ibm/ibm_zos_core/plugins/modules/zos_job_submit.py", line 903, in main
File "/tmp/ansible_ibm.ibm_zos_core.zos_job_submit_payload_czn4l_ba/ansible_ibm.ibm_zos_core.zos_job_submit_payload.zip/ansible_collections/ibm/ibm_zos_core/plugins/modules/zos_job_submit.py", line 854, in run_module
File "/tmp/ansible_ibm.ibm_zos_core.zos_job_submit_payload_czn4l_ba/ansible_ibm.ibm_zos_core.zos_job_submit_payload.zip/ansible_collections/ibm/ibm_zos_core/plugins/modules/zos_job_submit.py", line 656, in assert_valid_return_code
main.SubmitJCLError
msg: |-
MODULE FAILURE
See stdout/stderr for the exact error
In 1.3.6, we had all the output of the job (= zos_jobs_output) with the JCL Error :
jobs:
- class: A
content_type: JOB
ddnames:
- byte_count: '1079'
content:
- '1 J E S 2 J O B L O G -- S Y S T E M I
P O 1 -- N O D E T I V L P 0 2 '
- '0 '
- ' 10.29.26 JOB09018 ---- MONDAY, 30 JAN 2023 ----'
- ' 10.29.26 JOB09018 IRR010I USERID VLODE IS ASSIGNED TO THIS
JOB.'
- ' 10.29.26 JOB09018 ICH70001I VLODE LAST ACCESS AT 10:29:07
ON MONDAY, JANUARY 30, 2023'
- ' 10.29.26 JOB09018 $HASP373 FREE STARTED - INIT F - CLASS
A - SYS IPO1'
- ' 10.29.26 JOB09018 - --TIMINGS
(MINS.)-- ----PAGING COUNTS---'
- ' 10.29.26 JOB09018 -JOBNAME STEPNAME PROCSTEP RC EXCP CONN TCB SRB CLOCK SERV PG PAGE SWAP VIO
SWAPS'
- ' 10.29.26 JOB09018 -FREE STEP1 FLUSH 0 0 .00 .00 .0 0 0 0 0 0 0'
- ' 10.29.26 JOB09018 IEF453I FREE - JOB FAILED - JCL ERROR'
- ' 10.29.26 JOB09018 -FREE ENDED. NAME- TOTAL
TCB CPU TIME= .00 TOTAL ELAPSED TIME= .0'
- ' 10.29.26 JOB09018 $HASP395 FREE ENDED'
- 0------ JES2 JOB STATISTICS ------
- '- 30 JAN 2023 JOB EXECUTION DATE'
- '- 11 CARDS READ'
- '- 47 SYSOUT PRINT RECORDS'
- '- 0 SYSOUT PUNCH RECORDS'
- '- 6 SYSOUT SPOOL KBYTES'
- '- 0.00 MINUTES EXECUTION TIME'
- ' 1 //FREE JOB ''FREE'',MSGLEVEL=(1,1),MSGCLASS=R,NOTIFY=&SYSUID JOB09018'
- ' IEFC653I SUBSTITUTION JCL - ''FREE'',MSGLEVEL=(1,1),MSGCLASS=R,NOTIFY=VLODE'
- ' 2 //JOBLIB DD DISP=SHR,DSN=NAZARE.WDEPLOY.BNPP.LOADBA '
- ' 3 // DD DISP=SHR,DSN=NAZARE.WDEPLOY.BNPP.LOADSP '
- ' //* '
- ' 4 //STEP1 EXEC PGM=IDCAMS '
- ' 5 //SYSPRINT DD SYSOUT=* '
- ' 6 //SYSOUT DD SYSOUT=* '
- ' /* '
- ' 7 //SYSIN DD * '
- ' ICH70001I VLODE LAST ACCESS AT 10:29:07 ON MONDAY, JANUARY
30, 2023'
- ' IEFA111I FREE IS USING THE FOLLOWING JOB RELATED SETTINGS:'
- ' SWA=BELOW,TIOT SIZE=32K,DSENQSHR=DISALLOW,GDGBIAS=JOB'
- ' IEFA107I FREE STEP1 JOBLIB - DATA SET NAZARE.WDEPLOY.BNPP.LOADBA
NOT FOUND'
- ' IEF272I FREE STEP1 - STEP WAS NOT EXECUTED.'
- ' IEF373I STEP/STEP1 /START 2023030.1029'
- ' IEF032I STEP/STEP1 /STOP 2023030.1029 '
- ' CPU: 0 HR 00 MIN 00.00 SEC SRB: 0 HR 00
MIN 00.00 SEC '
- ' VIRT: 0K SYS: 0K EXT: 0K SYS: 0K'
- ' ATB- REAL: 1044K SLOTS: 0K'
- ' VIRT- ALLOC: 11M SHRD: 0M'
- ' IEF375I JOB/FREE /START 2023030.1029'
- ' IEF033I JOB/FREE /STOP 2023030.1029 '
- ' CPU: 0 HR 00 MIN 00.00 SEC SRB: 0 HR 00
MIN 00.00 SEC '
ddname: JESMSGLG
id: '2'
procstep: ''
record_count: '19'
stepname: JES2
- byte_count: '502'
content:
- '1 J E S 2 J O B L O G -- S Y S T E M I
P O 1 -- N O D E T I V L P 0 2 '
- '0 '
- ' 10.29.26 JOB09018 ---- MONDAY, 30 JAN 2023 ----'
- ' 10.29.26 JOB09018 IRR010I USERID VLODE IS ASSIGNED TO THIS
JOB.'
- ' 10.29.26 JOB09018 ICH70001I VLODE LAST ACCESS AT 10:29:07
ON MONDAY, JANUARY 30, 2023'
- ' 10.29.26 JOB09018 $HASP373 FREE STARTED - INIT F - CLASS
A - SYS IPO1'
- ' 10.29.26 JOB09018 - --TIMINGS
(MINS.)-- ----PAGING COUNTS---'
- ' 10.29.26 JOB09018 -JOBNAME STEPNAME PROCSTEP RC EXCP CONN TCB SRB CLOCK SERV PG PAGE SWAP VIO
SWAPS'
- ' 10.29.26 JOB09018 -FREE STEP1 FLUSH 0 0 .00 .00 .0 0 0 0 0 0 0'
- ' 10.29.26 JOB09018 IEF453I FREE - JOB FAILED - JCL ERROR'
- ' 10.29.26 JOB09018 -FREE ENDED. NAME- TOTAL
TCB CPU TIME= .00 TOTAL ELAPSED TIME= .0'
- ' 10.29.26 JOB09018 $HASP395 FREE ENDED'
- 0------ JES2 JOB STATISTICS ------
- '- 30 JAN 2023 JOB EXECUTION DATE'
- '- 11 CARDS READ'
- '- 47 SYSOUT PRINT RECORDS'
- '- 0 SYSOUT PUNCH RECORDS'
- '- 6 SYSOUT SPOOL KBYTES'
- '- 0.00 MINUTES EXECUTION TIME'
- ' 1 //FREE JOB ''FREE'',MSGLEVEL=(1,1),MSGCLASS=R,NOTIFY=&SYSUID JOB09018'
- ' IEFC653I SUBSTITUTION JCL - ''FREE'',MSGLEVEL=(1,1),MSGCLASS=R,NOTIFY=VLODE'
- ' 2 //JOBLIB DD DISP=SHR,DSN=NAZARE.WDEPLOY.BNPP.LOADBA '
- ' 3 // DD DISP=SHR,DSN=NAZARE.WDEPLOY.BNPP.LOADSP '
- ' //* '
- ' 4 //STEP1 EXEC PGM=IDCAMS '
- ' 5 //SYSPRINT DD SYSOUT=* '
- ' 6 //SYSOUT DD SYSOUT=* '
- ' /* '
- ' 7 //SYSIN DD * '
- ' ICH70001I VLODE LAST ACCESS AT 10:29:07 ON MONDAY, JANUARY
30, 2023'
- ' IEFA111I FREE IS USING THE FOLLOWING JOB RELATED SETTINGS:'
- ' SWA=BELOW,TIOT SIZE=32K,DSENQSHR=DISALLOW,GDGBIAS=JOB'
- ' IEFA107I FREE STEP1 JOBLIB - DATA SET NAZARE.WDEPLOY.BNPP.LOADBA
NOT FOUND'
- ' IEF272I FREE STEP1 - STEP WAS NOT EXECUTED.'
- ' IEF373I STEP/STEP1 /START 2023030.1029'
- ' IEF032I STEP/STEP1 /STOP 2023030.1029 '
- ' CPU: 0 HR 00 MIN 00.00 SEC SRB: 0 HR 00
MIN 00.00 SEC '
- ' VIRT: 0K SYS: 0K EXT: 0K SYS: 0K'
- ' ATB- REAL: 1044K SLOTS: 0K'
- ' VIRT- ALLOC: 11M SHRD: 0M'
- ' IEF375I JOB/FREE /START 2023030.1029'
- ' IEF033I JOB/FREE /STOP 2023030.1029 '
- ' CPU: 0 HR 00 MIN 00.00 SEC SRB: 0 HR 00
MIN 00.00 SEC '
ddname: JESJCL
id: '3'
procstep: ''
record_count: '10'
stepname: JES2
- byte_count: '878'
content:
- '1 J E S 2 J O B L O G -- S Y S T E M I
P O 1 -- N O D E T I V L P 0 2 '
- '0 '
- ' 10.29.26 JOB09018 ---- MONDAY, 30 JAN 2023 ----'
- ' 10.29.26 JOB09018 IRR010I USERID VLODE IS ASSIGNED TO THIS
JOB.'
- ' 10.29.26 JOB09018 ICH70001I VLODE LAST ACCESS AT 10:29:07
ON MONDAY, JANUARY 30, 2023'
- ' 10.29.26 JOB09018 $HASP373 FREE STARTED - INIT F - CLASS
A - SYS IPO1'
- ' 10.29.26 JOB09018 - --TIMINGS
(MINS.)-- ----PAGING COUNTS---'
- ' 10.29.26 JOB09018 -JOBNAME STEPNAME PROCSTEP RC EXCP CONN TCB SRB CLOCK SERV PG PAGE SWAP VIO
SWAPS'
- ' 10.29.26 JOB09018 -FREE STEP1 FLUSH 0 0 .00 .00 .0 0 0 0 0 0 0'
- ' 10.29.26 JOB09018 IEF453I FREE - JOB FAILED - JCL ERROR'
- ' 10.29.26 JOB09018 -FREE ENDED. NAME- TOTAL
TCB CPU TIME= .00 TOTAL ELAPSED TIME= .0'
- ' 10.29.26 JOB09018 $HASP395 FREE ENDED'
- 0------ JES2 JOB STATISTICS ------
- '- 30 JAN 2023 JOB EXECUTION DATE'
- '- 11 CARDS READ'
- '- 47 SYSOUT PRINT RECORDS'
- '- 0 SYSOUT PUNCH RECORDS'
- '- 6 SYSOUT SPOOL KBYTES'
- '- 0.00 MINUTES EXECUTION TIME'
- ' 1 //FREE JOB ''FREE'',MSGLEVEL=(1,1),MSGCLASS=R,NOTIFY=&SYSUID JOB09018'
- ' IEFC653I SUBSTITUTION JCL - ''FREE'',MSGLEVEL=(1,1),MSGCLASS=R,NOTIFY=VLODE'
- ' 2 //JOBLIB DD DISP=SHR,DSN=NAZARE.WDEPLOY.BNPP.LOADBA '
- ' 3 // DD DISP=SHR,DSN=NAZARE.WDEPLOY.BNPP.LOADSP '
- ' //* '
- ' 4 //STEP1 EXEC PGM=IDCAMS '
- ' 5 //SYSPRINT DD SYSOUT=* '
- ' 6 //SYSOUT DD SYSOUT=* '
- ' /* '
- ' 7 //SYSIN DD * '
- ' ICH70001I VLODE LAST ACCESS AT 10:29:07 ON MONDAY, JANUARY
30, 2023'
- ' IEFA111I FREE IS USING THE FOLLOWING JOB RELATED SETTINGS:'
- ' SWA=BELOW,TIOT SIZE=32K,DSENQSHR=DISALLOW,GDGBIAS=JOB'
- ' IEFA107I FREE STEP1 JOBLIB - DATA SET NAZARE.WDEPLOY.BNPP.LOADBA
NOT FOUND'
- ' IEF272I FREE STEP1 - STEP WAS NOT EXECUTED.'
- ' IEF373I STEP/STEP1 /START 2023030.1029'
- ' IEF032I STEP/STEP1 /STOP 2023030.1029 '
- ' CPU: 0 HR 00 MIN 00.00 SEC SRB: 0 HR 00
MIN 00.00 SEC '
- ' VIRT: 0K SYS: 0K EXT: 0K SYS: 0K'
- ' ATB- REAL: 1044K SLOTS: 0K'
- ' VIRT- ALLOC: 11M SHRD: 0M'
- ' IEF375I JOB/FREE /START 2023030.1029'
- ' IEF033I JOB/FREE /STOP 2023030.1029 '
- ' CPU: 0 HR 00 MIN 00.00 SEC SRB: 0 HR 00
MIN 00.00 SEC '
ddname: JESYSMSG
id: '4'
procstep: ''
record_count: '14'
stepname: JES2
job_id: JOB09018
job_name: FREE
owner: VLODE
ret_code:
msg: JCL ERROR
msg_txt: ''
subsystem: IPO1
system: ''
md5sum: 6d827110c269da5d3219c9e044d310bf
mode: '0600'
msg: SubmitJCLError('')
owner: VLODE
size: 1075
src: /u/vlode/.ansible/tmp/ansible-tmp-1675092551.1458178-3994-235740038396439/source
state: file
uid: 10148
Playbook verbosity output
No response
Contents of
ansible.cfg
Contents of the inventory
Contents of
group_vars
orhost_vars
Ansible version
IBM z/OS Ansible core Version
v1.4.0
IBM ZOAU version
v1.1.1
z/OS version
2.4
Ansible module
zos_job_submit
The text was updated successfully, but these errors were encountered: