-
Notifications
You must be signed in to change notification settings - Fork 43
Open
Copy link
Labels
EnhancementEnhancement to existing collection contentEnhancement to existing collection contentIn PlanIssue has been accepted put into a planned releaseIssue has been accepted put into a planned releaseWaiting on dependencyThis issue requires a change on a dependnecy out of scop for this team but tracked by this teamThis issue requires a change on a dependnecy out of scop for this team but tracked by this team
Milestone
Description
Is there an existing issue for this?
- There are no existing issues.
Enhancement or feature description
Currently there are some conditions that will make a GDG creation to fail. For example, if FIFO is set to true but the system does not have that feature enabled is going to fail, the current error message is ugly and is just a stack trace
File "/tmp/ansible_zos_data_set_payload_2oqiykph/ansible_zos_data_set_payload.zip/ansible_collections/ibm/ibm_zos_core/plugins/modules/zos_data_set.py", line 1889, in run_module
result["changed"] = perform_data_set_operations(
~~~~~~~~~~~~~~~~~~~~~~~~~~~^
data_set=data_set,
^^^^^^^^^^^^^^^^^^
...<3 lines>...
force=data_set_params.get("force"),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
) or result.get("changed", False)
^
File "/tmp/ansible_zos_data_set_payload_2oqiykph/ansible_zos_data_set_payload.zip/ansible_collections/ibm/ibm_zos_core/plugins/modules/zos_data_set.py", line 1410, in perform_data_set_operations
changed = data_set.ensure_present(replace=replace)
File "/tmp/ansible_zos_data_set_payload_2oqiykph/ansible_zos_data_set_payload.zip/ansible_collections/ibm/ibm_zos_core/plugins/module_utils/data_set.py", line 2413, in ensure_present
gdg = gdgs.create(**arguments)
File "/u/vcorfma/.local/lib/python3.13/site-packages/zoautil_py/gdgs.py", line 482, in create
raise GenerationDataGroupCreateException(response)
fatal: [zos_host_01]: FAILED! => {
"changed": false,
"invocation": {
"module_args": {
"batch": null,
"block_size": null,
"directory_blocks": null,
"empty": false,
"extended": false,
"fifo": false,
"force": false,
"key_length": null,
"key_offset": null,
"limit": 3,
"name": "NAZARE.WDEPLOY.ANSIBLE.GDTEST.SEQA",
"purge": true,
"record_format": "fb",
"record_length": null,
"replace": false,
"scratch": false,
"sms_data_class": null,
"sms_management_class": null,
"sms_storage_class": null,
"space_primary": 5,
"space_secondary": 3,
"space_type": "m",
"state": "present",
"tmp_hlq": null,
"type": "gdg",
"volumes": null
}
},
"message": "",
"msg": "GenerationDataGroupCreateException(<zoautil_py.ztypes.ZOAUResponse object at 0x5009804050>)",
"names": [
"NAZARE.WDEPLOY.ANSIBLE.GDTEST.SEQA"
]
}
The goal of this task is to enhance error messages when GDG creation fails, some scenarios identified are:
- Failure when a GDG name is larger than 35 characters.
- Failure when two parameters are not compatible.
- Failure when FIFO is not enabled on the system.
Ansible module
zos_data_set
Metadata
Metadata
Assignees
Labels
EnhancementEnhancement to existing collection contentEnhancement to existing collection contentIn PlanIssue has been accepted put into a planned releaseIssue has been accepted put into a planned releaseWaiting on dependencyThis issue requires a change on a dependnecy out of scop for this team but tracked by this teamThis issue requires a change on a dependnecy out of scop for this team but tracked by this team
Type
Projects
Status
🔍 Validation