Closed gngrossi closed 2 weeks ago
I'm trying to see what's different here, because I haven't duplicated the error.
I'll check source code on our side for clarity
zos_job_submit, line 699: job_submitted = jobs.submit(src, is_unix=is_unix, **kwargs)
I don't see anything version specific here, but it is passing potentially 3 arguments.
Right now, there are 2 possible issues that I can see:
update: looking at other recent tickets, he is stating Ansible core 1.9, so I'll pull a copy of that for a deeper duplication, and a check of the line number.
In 1.9.0 and 1,.9.1 source, the line I commented on above is exactly at 707. I'll check with zoau team to see if this rings a bell, because we are consistently passing 3 parameters.
Just to confirm: ansible [core 2.16.6] ibm.ibm_zos_core 1.9.0
The issue applies to z/OS 2.5 and 3.1
thanks
Trying the zos_data_set module:
TASK [Delete and define LDS] *** fatal: [mvs-sysd]: FAILED! => {"changed": false, "message": "", "msg": "TypeError(\"_create() missing 1 required positional argument: 'dataset_type'\")", "names": ["@02858.LDS"]}
I'm seeing an issue in python 3.12 documentation (https://peps.python.org/pep-0692/), which means the way ibm_zos_core passes 'kwargs' might be at issue here. I'll run some tests in the next day or so to see if I can duplicate this and correct it.
Unfortunately, the current answer would be "this combination doesn't work with Python 3.12... use 3.11 until we understand what's going on better".
Ok thanks. My understanding is/was zoau 1.2.x.x worked with python 3.11.x and 3.12.x. And zoau1.3.x.x works with python 3.12.x but is waiting on ibm.ibm_zos_core 1.10.x
I believe there is a combination of zos _core1.9.x + zoau 1.2 and 3.12 that causes this. I should duplicate this tonight, but because of the 3.12 pep change, I think you will need to wait for 1.10, so you can use zoau 1.3.x, which doesn't have this issue.
I tried that exact combination: zoau 1.2.5 (tried .6 and .8), and got this on our official 1.9 test pipeline:
File : "/tmp/ansible_ibm.ibm_zos_core.zos_job_submit_payload_1u359rpg/ansible_ibm.ibm_zos_core.zos_job_submit_payload.zip/ansible_collections/ibm/ibm_zos_core/plugins/modules/zos_job_submit.py", line 908, in run_module
File: "/tmp/ansible_ibm.ibm_zos_core.zos_job_submit_payload_1u359rpg/ansible_ibm.ibm_zos_core.zos_job_submit_payload.zip/ansible_collections/ibm/ibm_zos_core/plugins/modules/zos_job_submit.py", line 694, in submit_src_jcl
TypeError: submit() takes from 1 to 2 positional arguments but 3 were given
.
This is a coflict betweem zoau and python 3.12: using 3.11, as you have seen, works okay.
I will relay this to the zoau team, to see if they have a work-around.
Will make a python recreate to make sure zoau can duplicate this.
@gngrossi : I'm getting odd responses using 1.2.4 versus 1.2.5.8, so I'm beginning to believe something was 'fixed' in 1.2.5.8, compared to earlier versions. This was done at the USS/console level. I'll try 2 other versions, then go to python duplication, but patching up to 1.2.5.8 may resolve this.
I am not able to duplicate that specific error message using 1.2.3, 1.2.4, 1.2.5.6, or 1.2.5.8 with python 3.12. I even ported our core code to isolate the call even further, but no luck. My first suggestion will be to re-install 1.2.5.8, in case something was damaged from switching between 1.3.x and 1.2.x
I note you have PYTHONPATH commented out in the environment... could you try this with that value set, as well? I'm not aware of any compatibility issue there, but I don't use pip installs... our zoau versions are on a read-only volume in the testing area.
I have now migrated to using zos_core:==1.10.0-beta.1, zoau 1.3.1.1 with python 3.12.1 on z/OS 3.1.
@gngrossi Following up: since you upgraded zos_core and zoau modules, are you satisfied so we can close this ticket?
Yes, closing. thanks
Is there an existing issue for this?
Bug description
Trying to use Python 3.12.1 on z/OS 2.5. Python 3.11.5 works.
IBM z/OS Ansible core Version
v1.9.0
IBM Z Open Automation Utilities
v1.2.5 (default)
IBM Enterprise Python
v3.12.x
ansible-version
v2.16.x (default)
z/OS version
v2.5 (default)
Ansible module
zos_job_submit
Playbook verbosity output.
bash-4.4$ ansible-playbook submit.yml
PLAY [MA1] *****
TASK [Submit a job] **** An exception occurred during task execution. To see the full traceback, use -vvv. The error was: TypeError: submit() takes from 1 to 2 positional arguments but 3 were given fatal: [mvs-sysd]: FAILED! => {"changed": false, "module_stderr": "Traceback (most recent call last):\n File \"\", line 107, in \n File \"\", line 99, in _ansiballz_main\n File \"\", line 47, in invoke_module\n File \"\", line 226, in run_module\n File \"\", line 98, in _run_module_code\n File \"\", line 88, in _run_code\n File \"/tmp/ansible_ibm.ibm_zos_core.zos_job_submit_payload_781lrow0/ansible_ibm.ibm_zos_core.zos_job_submit_payload.zip/ansible_collections/ibm/ibm_zos_core/plugins/modules/zos_job_submit.py\", line 1108, in \n File \"/tmp/ansible_ibm.ibm_zos_core.zos_job_submit_payload_781lrow0/ansible_ibm.ibm_zos_core.zos_job_submit_payload.zip/ansible_collections/ibm/ibm_zos_core/plugins/modules/zos_job_submit.py\", line 1104, in main\n File \"/tmp/ansible_ibm.ibm_zos_core.zos_job_submit_payload_781lrow0/ansible_ibm.ibm_zos_core.zos_job_submit_payload.zip/ansible_collections/ibm/ibm_zos_core/plugins/modules/zos_job_submit.py\", line 921, in run_module\n File \"/tmp/ansible_ibm.ibm_zos_core.zos_job_submit_payload_781lrow0/ansible_ibm.ibm_zos_core.zos_job_submit_payload.zip/ansible_collections/ibm/ibm_zos_core/plugins/modules/zos_job_submit.py\", line 707, in submit_src_jcl\nTypeError: submit() takes from 1 to 2 positional arguments but 3 were given\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}
PLAY RECAP ***** mvs-sysd : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
Ansible configuration.
Contents of the inventory
Contents of
group_vars
orhost_vars