ibm_zos_core icon indicating copy to clipboard operation
ibm_zos_core copied to clipboard

[Bug] [zos_job_query] Subsystem not in return values

Open fernandofloresg opened this issue 5 months ago • 0 comments

Is there an existing issue for this?

  • [X] There are no existing issues.

Bug description

Job query was changed after 1.4.0, previously it would issue a REXX command and gather different fields, system(SYSNAME) and subsystem(ESYSID) were just a couple, now that is retrieved using a parsing mechanism in the following line.

https://github.com/ansible-collections/ibm_zos_core/blob/42158ff2ed651dfe4f95b8af0bb1bfcfd915b916/plugins/module_utils/job.py#L346

We can get this output when using zos_job_submit, since version v1.8.0 return_output option was introduced in zos_job_submit it changed the way we get some values from system adding dd_scan into get_job_status interface, in short, we need to set the flag to true in the following line:

https://github.com/ansible-collections/ibm_zos_core/blob/ef7069ea7dc0ff743c8391270e358168d1fc07b2/plugins/module_utils/job.py#L243

and here

https://github.com/ansible-collections/ibm_zos_core/blob/ef7069ea7dc0ff743c8391270e358168d1fc07b2/plugins/module_utils/job.py#L255

but that is a hot fix only, it will impact performance for sure, we should think if we want a new option in zos_job_query for getting more info about the job or just update this and make zos_job_query less performant but with a more complete output.

IBM z/OS Ansible core Version

v1.11.0-beta.1

IBM Z Open Automation Utilities

v1.3.2

IBM Enterprise Python

v3.11.x (default)

ansible-version

v2.16.x (default)

z/OS version

v2.5 (default)

Ansible module

zos_job_output, zos_job_query

Playbook verbosity output.


  • hosts: zvm collections:

    • ibm.ibm_zos_core gather_facts: false vars: ZOAU: "/zoau/v1.2.5.8" # to test with 1.4.1 PYZ: "/allpython/3.11-3/usr/lpp/IBM/cyp/v3r11/pyz"

    environment: "{{ environment_vars }}"

    tasks:

    Test role

    • name: get job details zos_job_query: job_id: "JOB00339" register: debug_msg

    • name: Print out debug msg debug: msg : "{{ debug_msg }} "

Ansible configuration.

No response

Contents of the inventory

No response

Contents of group_vars or host_vars

No response

fernandofloresg avatar Sep 17 '24 20:09 fernandofloresg