voxpupuli / puppet-proxysql

Puppet module to configure ProxySQL

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problem with escaped Strings on query rules

CyberLine opened this issue · comments

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 4.8
  • Ruby: 2.5.1p273
  • Distribution: Debian
  • Module version: 2.0.0

How to reproduce (e.g Puppet code you use)

  - "mysql_query_rule-2":
      rule_id: 2
      active: 1
      apply: 1
      match_pattern: "^SELECT `account`\\.\\* FROM `account` WHERE \\(\\(\\(`account`.`account_id` = .*\\)\\)\\)"
      cache_ttl: 10000
      destination_hostgroup: 20

What are you seeing

Notice: /Stage[main]/Test::Services::Proxysql/Proxy_mysql_query_rule[mysql_query_rule-2]/match_pattern: match_pattern changed '^SELECT account\\.\\* FROM account WHERE \\(\\(\\(account.account_id= .*\\)\\)\\)' to '^SELECTaccount\.\* FROM account WHERE \(\(\(account.account_id = .*\)\)\)'

What behaviour did you expect instead

Nothing changed

Output log

Any additional information you'd like to impart

After initial import of escaped query rules (yaml needs double backslashes) on every puppet run i got this notice telling me that the rule is changed because it doesn't compare correct as the rule in the proxy is correct with single backslash.