gplv2/haproxy-postgresql

pgcheck user fixed to "pgc" in template

Closed this issue · 2 comments

tcp-check send-binary 70676300 # "<%= @bn.checkuser %>" ( <%= @bn.checkuserlen %> bytes )

It calculates the length of the user string, but not replacing the send-binary data.
I replaced it with:

tcp-check send-binary <%= @bn.checkuserhex %> # "<%= @bn.checkuser %>" ( <%= @bn.checkuserlen %> bytes )

and added

"<%= @bn.checkuserhex %>": checkuser.encode("utf-8").hex() + "00",

after

"<%= @bn.checkuser %>": checkuser,

gplv2 commented

Hi sorry I haven't noticed this issue earlier, I'll test and update the code, feel free to clone/patch/pull request it next time . I fixed it in 7a9a1e7

gplv2 commented

Thanks !