1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-06-11 10:35:34 +00:00
community.general/changelogs
patchback[bot] 876f8ca18c
[PR #12185/213581be backport][stable-13] fix: treat chdev execution failures as module errors in aix_devices (#12197)
fix: treat chdev execution failures as module errors in aix_devices (#12185)

* fix: treat chdev execution failures as module errors in aix_devices

##### SUMMARY
Fix the aix_devices module so that a failed chdev command is reported as a module failure instead of a successful result.

The previous implementation called fail_json incorrectly by returning success through the normal completion path when chdev returned a non-zero exit status. This could allow a playbook to continue even though the requested device attribute change was not applied.

This change replaces the success-style error handling with proper failure handling in the chdev execution path, making task results consistent with the actual command outcome.

##### ISSUE TYPE
- Bugfix Pull Request

##### COMPONENT NAME
aix_devices

##### ADDITIONAL INFORMATION
The affected code path is in change_device_attr() when the module executes chdev to apply attribute updates.

Before this change:
- chdev could fail
- the module could still report success
- later tasks could run against an unexpected system state

After this change:
- chdev failures are returned through fail_json
- the task stops with an error
- playbook behavior matches the real execution result

```paste below
Before:
module.exit_json(msg="Failed to run chdev.", rc=rc, err=err)

After:
module.fail_json(msg="Failed to run chdev.", rc=rc, err=err)
```

* Add changelog fragment for aix_devices chdev failure fix (#12185)

---------


(cherry picked from commit 213581bef8)

Co-authored-by: Hirofumi Arimoto <hiro0107@users.noreply.github.com>
Co-authored-by: Hirofumi Arimoto <harimoto@jp.ibm.com>
2026-06-05 13:47:25 +02:00
..
fragments [PR #12185/213581be backport][stable-13] fix: treat chdev execution failures as module errors in aix_devices (#12197) 2026-06-05 13:47:25 +02:00
.gitignore
changelog.yaml Release 13.0.1. 2026-05-25 21:19:41 +02:00
changelog.yaml.license
config.yaml Normalize changelog configs. 2025-07-27 16:36:35 +02:00