ansible-collections / ibm_zos_core

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

zos_job_query getting BGYSC5308E Failed to serialize JSON object #1764

Open EdwardMcCarthy opened 1 week ago

EdwardMcCarthy commented 1 week ago

Is there an existing issue for this?

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"
fernandofloresg commented 1 week ago

Slack conversation /archives/CSLEJ8VGV/p1729567603778039