generated from ansible-collections/collection_template
-
Notifications
You must be signed in to change notification settings - Fork 26
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
proxysql_query_rules_fast_routing module can not update existed rules #107
Labels
bug
Something isn't working
Comments
I found the root cause is at proxysql_query_rules_fast_routing.py#L381. The if statement evaluated to |
Nice catch. Because CREATE TABLE mysql_query_rules_fast_routing (
username VARCHAR NOT NULL,
schemaname VARCHAR NOT NULL,
flagIN INT NOT NULL DEFAULT 0,
destination_hostgroup INT CHECK (destination_hostgroup >= 0) NOT NULL,
comment VARCHAR NOT NULL,
PRIMARY KEY (username,
schemaname,
flagIN) ) diff --git a/plugins/modules/proxysql_query_rules_fast_routing.py b/plugins/modules/proxysql_query_rules_fast_routing.py
index 601caf6..07e79b8 100644
--- a/plugins/modules/proxysql_query_rules_fast_routing.py
+++ b/plugins/modules/proxysql_query_rules_fast_routing.py
@@ -379,7 +379,7 @@ def main():
try:
if not query_rule.check_rule_cfg_exists(cursor):
if query_rule.config_data["username"] and query_rule.config_data["schemaname"] and \
- query_rule.config_data["flagIN"] and query_rule.check_rule_pk_exists(cursor):
+ query_rule.check_rule_pk_exists(cursor):
query_rule.update_rule(module.check_mode, result, cursor)
else:
query_rule.create_rule(module.check_mode, result, cursor) @squirrel532 do you have some time to provide a PR? |
Sure, I'll file a PR later. |
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
SUMMARY
proxysql_query_rules_fast_routing
module can not updatedestination_hostgroup
of a rule.ISSUE TYPE
COMPONENT NAME
proxysql_query_rules_fast_routing
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
Ubuntu 20.04
STEPS TO REPRODUCE
admin/admin
.ansible-playbook proxysql.yml
EXPECTED RESULTS
ACTUAL RESULTS
The text was updated successfully, but these errors were encountered: