1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-06-12 19:15:31 +00:00
community.general/changelogs/fragments
Hirofumi Arimoto 213581bef8
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)

---------

Co-authored-by: Hirofumi Arimoto <harimoto@jp.ibm.com>
2026-06-05 13:02:06 +02:00
..
.keep Rename changelogs/fragments/.empty -> changelogs/fragments/.keep 2020-08-07 08:17:57 +02:00
11588-nmcli-bond-arp-diff.yml nmcli: fix check/diff for bond arp_interval and arp_ip_target (#11588) (#12085) 2026-05-23 13:35:40 +02:00
11998-xenserver-disk-uuid-vdi-type.yml xenserver_guest_info: add VDI uuid and vdi_type to disk info (#12119) 2026-05-30 19:43:30 +02:00
12032-slack-files-support.yml slack: support file upload (#12032) 2026-05-30 13:37:04 +02:00
12087-keycloak-realm-max-secondary-auth-failures.yml keycloak_realm - add `max_secondary_auth_failures` parameter to configure brute force detection for secondary authentication mechanisms. (#12087) 2026-06-02 18:27:11 +02:00
12093-iptables_state.yml iptables_state: clean up code (#12093) 2026-05-25 14:58:55 +02:00
12094-namedtuple-to-dataclass.yml multiple: replace namedtuple with dataclass (#12094) 2026-05-25 15:50:34 +02:00
12097-snap-hold-revision.yml snap: enforce hold when installing at a specific revision (#12097) 2026-05-25 15:34:48 +02:00
12106-fix-lxc-create_script.yml lxc_container: Fix create_script in plugins/module_utils/_lxc.py (#12106) 2026-05-27 08:01:56 +02:00
12113-unixy-delegated-host.yml unixy callback: fix KeyError when task is delegated to host without ansible_host set (#12113) 2026-05-30 20:02:20 +02:00
12120-consul-kv-empty-value.yml consul_kv: add empty_value option for null Consul values (#12120) 2026-05-31 20:48:48 +12:00
12121-parted-suse-msdos-type-code.yml parted: ignore MBR partition type codes in flags on SUSE systems (#12121) 2026-05-31 10:37:26 +12:00
12123-htpasswd-crypt-schemes.yml htpasswd: fix hash_scheme aliases and Apache-compatible bcrypt (#12123) 2026-05-31 22:01:51 +12:00
12124-redfish-setmanagernic-keyerror.yml redfish_config: fix KeyError: 'ret' when SetManagerNic cannot find a matching NIC (#12124) 2026-06-02 18:25:26 +02:00
12137-pamd-authselect.yml pamd: handle non-PAM lines in authselect profile files (#12137) 2026-05-31 09:44:49 +12:00
12140-filetree-exclude-regex-error.yml filetree lookup: handle invalid exclude regex with AnsibleError (#12140) 2026-06-04 06:19:10 +02:00
12158-incus-windows-ansible-core-221.yml Fix incus Windows modules with ansible-core 2.21 (#12163) 2026-06-02 21:04:02 +02:00
12182-opkg-path-prefix.yml opkg - path_prefix needs to be a list (#12182) 2026-06-05 06:37:23 +02:00
12185-aix-devices-chdev-fail.yml fix: treat chdev execution failures as module errors in aix_devices (#12185) 2026-06-05 13:02:06 +02:00
composer-working-dir-and-config-sha256.yaml composer: config file hash to evaluate whether a change occurred (#12084) 2026-05-30 13:47:09 +02:00
portage-depclean-fail_json-msg.yml portage: include msg in depclean failure fail_json (#12168) 2026-06-02 18:25:44 +02:00