1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-06-10 18:15:39 +00:00
community.general/plugins
patchback[bot] 358770eb14
[PR #12185/213581be backport][stable-12] fix: treat chdev execution failures as module errors in aix_devices (#12196)
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:30 +02:00
..
action [PR #12078/e6ca0df5 backport][stable-12] Fix typing (#12079) 2026-05-19 08:25:30 +02:00
become [PR #11771/df252e5f backport][stable-12] incus, machinectl, run0 - fix become over pty connections (#11827) 2026-04-15 22:01:06 +02:00
cache [PR #11400/236b9c0e backport][stable-12] Sort imports with ruff check --fix (#11409) 2026-01-09 19:36:52 +01:00
callback [PR #12113/ef5b22d1 backport][stable-12] unixy callback: fix KeyError when task is delegated to host without ansible_host set (#12142) 2026-05-30 20:29:37 +02:00
connection [PR #12163/f9d4f0ad backport][stable-12] Fix incus Windows modules with ansible-core 2.21 (#12178) 2026-06-02 21:18:39 +02:00
doc_fragments [PR #11462/ce7cb4e9 backport][stable-12] New module icinga2_downtime (#11532) 2026-02-23 06:17:51 +01:00
filter [PR #12167/97b464de backport][stable-12] version_sort filter: fix example's description (#12170) 2026-06-02 21:18:20 +02:00
inventory [PR #11573/f9e583da backport][stable-12] fix: remove HTTPStatus constructs introduced in Python 3.11 (#11575) 2026-03-12 20:59:26 +01:00
lookup [PR #12140/48db8630 backport][stable-12] filetree lookup: handle invalid exclude regex with AnsibleError (#12183) 2026-06-04 06:28:35 +02:00
module_utils [PR #12124/b799c6f5 backport][stable-12] redfish_config: fix KeyError: 'ret' when SetManagerNic cannot find a matching NIC (#12173) 2026-06-02 21:18:06 +02:00
modules [PR #12185/213581be backport][stable-12] fix: treat chdev execution failures as module errors in aix_devices (#12196) 2026-06-05 13:47:30 +02:00
plugin_utils [PR #11567/9b72d954 backport][stable-12] Add missing __future__ imports (#11569) 2026-03-11 07:10:34 +01:00
test [PR #11400/236b9c0e backport][stable-12] Sort imports with ruff check --fix (#11409) 2026-01-09 19:36:52 +01:00