-
-
Notifications
You must be signed in to change notification settings - Fork 152
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
LVS real server options - upper case not allowed by puppet but needed by keepalvied #77
Comments
The easiest way I can think of is adding something among the lines of:
|
I was hoping to have something more general purpose for all checks. Maybe in the main module store the possible checks from keepalived in an array and in the template match each against that array. If it matches key.upcase. I'll give this idea a try and see how it looks. |
Ok that seems to work somewhat cleanly. Posted here just for FYI, I have some other ideas on how to re-use a common set of backends for multiple VIPs so I will send a PR through once I have that worked out. I'll do them separately though.
|
That's an excellent idea. If you spec & doc it I'll merge it. 👍 |
This is working without any problems:
|
I think this issue can be closed. |
When setting up a real server settings in the keepalived.conf file is which check to use for the server. All of these checks seem to be required to be upper case. Ie, HTTP_GET works but http_get does not work.
Due to the way options are passed in the module the template takes the options hash and translates that directly into keepalived.conf config.
It turns out that puppet does not want you to start variable names with a capital letter. ( https://docs.puppetlabs.com/puppet/3.8/reference/deprecated_language.html#variable-names-beginning-with-capital-letters ).
This works:
options => { weight => 1, http_get => { ....
This does not work
options => { weight => 1, HTTP_GET => { ....
The puppet parser says: Error: Could not parse for environment production: Syntax error at 'HTTP_GET'; expected '}' at...
I'm pondering ways to solve this and will send a PR if I figure it out. I wanted to raise the issue in case someone has already solved it or has a bright idea of how to do so.
The best ideas I have so far is to make the check be specially called out and not part of the options template or to have some sort of postfix to the variable name that says to upper case is when turned into config.
The text was updated successfully, but these errors were encountered: