ansible-collections / ibm_zos_core

Red Hat Ansible Certified Content for IBM Z
77 stars 44 forks source link

[Bug] [zos_job_query] Subsystem not returned in v1.8.0(and v1.11.0-beta.1) but 1.4.1 does return it #1681

Open fernandofloresg opened 3 weeks ago

fernandofloresg commented 3 weeks ago

Is there an existing issue for this?

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.


Ansible configuration.

No response

Contents of the inventory

No response

Contents of group_vars or host_vars

No response

ddimatos commented 4 days ago

Relates to JIRA NAZARE-10756