-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
aerospike_migrations: check_mode does not check state #9448
Comments
Files identified in the description: If these files are incorrect, please update the |
The module also returns with It probably doesn't hurt to add |
The problem is not whether |
Depending on how you define check mode that is totally fine. One big motivation for check mode is to find out whether the module would cause a change or not. The implementation does that. I know too little about Aerospike to be able to say which requests that the module executes would be safe, so I don't know much more the module could check. I guess it also depends a lot on your workflow. It's probably a good idea to document what the module does, and potentially do more in check mode, without breaking existing workflows. |
Thanks for fielding this so far @felixfontein . To make it have the behavior you want, I think you just need to get rid of this conditional and have it just skip to L214:
I managed to get this working in aerolab and pinning aerospike library version to 10.0.0. The change I mentioned should do the trick. It will make the playbooks that use CD mode take much longer though.. but I don't think there is much risk. This module just checks replication metrics by default and doesn't actually modify anything or run dangerous commands. |
Summary
The code for check_mode simply returns
changed=false
without validating any state. Arguably, it does not support check_mode.Issue Type
Bug Report
Component Name
aerospike_migrations
Ansible Version
$ ansible --version
Community.general Version
10.2.0 (verified in the code)
Configuration
$ ansible-config dump --only-changed
OS / Environment
No response
Steps to Reproduce
N/A
Expected Results
I expected the module to verify the state and return whether the module execution without check_mode would incur in a change or not.
Actual Results
The module always states there was no change in check_mode without even connecting to the aerospike database.
Code of Conduct
The text was updated successfully, but these errors were encountered: