Skip to content
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_job_query] getting BGYSC5308E Failed to serialize JSON object #1764

Open
1 task done
EdwardMcCarthy opened this issue Oct 22, 2024 · 3 comments
Open
1 task done
Assignees
Labels
Bug Something isn't working as designed. In Plan Issue has been accepted put into a planned release

Comments

@EdwardMcCarthy
Copy link

Is there an existing issue for this?

  • There are no existing issues.

Bug description

when run

- name: "STC running check"
  delegate_to: zceeZosLpar
  ibm.ibm_zos_core.zos_job_query:
    job_name: "EDMCAR1L"

get

[ZOAUResponse]
        rc: 255
        response_format: UTF-8
        stdout_response:
        stderr_response: BGYSC5308E Failed to serialize JSON object.

        command: jls -j -o owner,name,id,status,ccode,jobclass,serviceclass,priority,asid,creationdate,creationtime,queueposition,jobtype,programname --

using job_id like this works ok

- name: "STC running check"
  delegate_to: zceeZosLpar
  ibm.ibm_zos_core.zos_job_query:
    job_id: "JOB04719"

IBM z/OS Ansible core Version

v1.11.0

IBM Z Open Automation Utilities

v1.3.3

IBM Enterprise Python

v3.11.x (default)

ansible-version

v2.15.x

z/OS version

v3.1 (unsupported)

Ansible module

zos_job_query

Playbook verbosity output.

running this task

- name: "STC running check"
  delegate_to: zceeZosLpar
  ibm.ibm_zos_core.zos_job_query:
    job_name: "EDMCAR1L"
  register: bcResult  

get

msg: |-
[ZOAUResponse]
rc: 255
response_format: UTF-8
stdout_response:
stderr_response: BGYSC5308E Failed to serialize JSON object.

        command: jls -j -o owner,name,id,status,ccode,jobclass,serviceclass,priority,asid,creationdate,creationtime,queueposition,jobtype,programname --

using job_id works ok like this

- name: "STC running check"
  delegate_to: zceeZosLpar
  ibm.ibm_zos_core.zos_job_query:
    job_id: "JOB04719"
  register: bcResult

this worked ok in older version of Ansible and at zaou 1.2
oct-22-zoau-prob.txt

Ansible configuration.

[defaults]
forks = 25
# remote_tmp = /u/ansible/tmp
# remote_port = 2022
stdout_callback = yaml
callback_whitelist = profile_tasks

[callback_profile_tasks]
sort_order = none
task_output_limit=400

[ssh_connection]
pipelining = True

Contents of the inventory

No response

Contents of group_vars or host_vars

all.yaml

ZOAU: "/usr/lpp/IBM/zoau/v1r3"
PYZ: "/usr/lpp/IBM/cyp/v3r11/pyz"
JAVA: "/usr/lpp/java/J8.0_64"

environment_vars:
  _BPXK_AUTOCVT: "ON"
  ZOAU_HOME: "{{ ZOAU }}"
  PYTHONPATH: "{{ ZOAU }}/lib"
  LIBPATH: "{{ ZOAU }}/lib:{{ PYZ }}/lib:/lib:/usr/lib:."
  PATH: "{{ ZOAU }}/bin:{{ PYZ }}/bin:{{JAVA}}/bin:/var/bin:/usr/sbin:/bin"
  JAVA_HOME: "{{ JAVA }}"
  _CEE_RUNOPTS: "FILETAG(AUTOCVT,AUTOTAG) POSIX(ON)"
  _TAG_REDIR_ERR: "txt"
  _TAG_REDIR_IN: "txt"
  _TAG_REDIR_OUT: "txt"
  LANG: "C"
  PYTHONSTDINENCODING: "cp1047"
@EdwardMcCarthy EdwardMcCarthy added Bug Something isn't working as designed. Needs Triage Issue need assessment by a team member(s) labels Oct 22, 2024
@fernandofloresg
Copy link
Collaborator

Slack conversation /archives/CSLEJ8VGV/p1729567603778039

@ddimatos
Copy link
Collaborator

One more slack thread to add: /archives/C037EFBNPAN/p1731437335317249

@ddimatos
Copy link
Collaborator

I want to add that when the task was changed to use a job ID instead of a job name which can return more than one job, it succeeded.

I noticed in the log that when a job name is used, somehow the job_name is not passed along and this results in a ZOAU querying all jobs on the system, which means one of those jobs are causing a JOSN serialization issue, I wonder if its a started task coming back with nothing thats causing this.

The other important thing to note is that the task specified a job_name but ZOAU did not receive that so it default to querying the entire system, this would be a performance issue.

Task passed:

{"module_args": {"job_name": "EDMCARD1", "owner": null, "job_id": null}

Log claims it ran:

jls -j -o owner,name,id,status,ccode,jobclass,serviceclass,priority,asid,creationdate,creationtime,queueposition,jobtype,programname --

@fernandofloresg fernandofloresg changed the title zos_job_query getting BGYSC5308E Failed to serialize JSON object [Bug] zos_job_query getting BGYSC5308E Failed to serialize JSON object Dec 16, 2024
@fernandofloresg fernandofloresg removed the Needs Triage Issue need assessment by a team member(s) label Dec 16, 2024
@fernandofloresg fernandofloresg added this to the [Q1] [2025] Bugs milestone Dec 16, 2024
@fernandofloresg fernandofloresg added the In Plan Issue has been accepted put into a planned release label Dec 16, 2024
@fernandofloresg fernandofloresg changed the title [Bug] zos_job_query getting BGYSC5308E Failed to serialize JSON object [Bug] [zos_job_query] getting BGYSC5308E Failed to serialize JSON object Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working as designed. In Plan Issue has been accepted put into a planned release
Projects
Status: 📗In plan
Development

No branches or pull requests

5 participants