Skip to content
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

Make bind parameter processing more flexible #154

Merged
merged 1 commit into from
Feb 16, 2015

Conversation

antaflos
Copy link

@antaflos antaflos commented Feb 4, 2015

This fixes https://tickets.puppetlabs.com/browse/MODULES-1741.

HAProxy's bind parameter for listen and frontend services accepts
multiple ways of specifying addresses, ports, port ranges, sockets and
bind options. The template templates/fragments/_bind.erb that
processes the haproxy::listen::bind and haproxy::frontend::bind hash
should accomodate that, meaning specifically that it should not assume
that a valid bind configuration is universally of the format
bind <ip address>:<port> [<options>*]. The HAProxy documentation at
http://cbonte.github.io/haproxy-dconv/configuration-1.5.html#4.2-bind
details how complex the bind configuration can be.

The templates/fragments/_bind.erb template now processes the bind
hash very simply by using the hash keys as "address and/or port" and the
key's value as a list of bind options that together make up a single
bind line in the resulting listen or frontend service configuration.

Most notably there is no more IP address or port validation. The values
are taken as is from the bind hash. The rationale behind that is
discussed in https://tickets.puppetlabs.com/browse/MODULES-1741.

Contains updated and expanded documentation, and updated spec tests.

This fixes <https://tickets.puppetlabs.com/browse/MODULES-1741>.

HAProxy's `bind` parameter for listen and frontend services accepts
multiple ways of specifying addresses, ports, port ranges, sockets and
bind options. The template `templates/fragments/_bind.erb` that
processes the `haproxy::listen::bind` and `haproxy::frontend::bind` hash
should accomodate that, meaning specifically that it should not assume
that a valid bind configuration is universally of the format
`bind <ip address>:<port> [<options>*]`. The HAProxy documentation at
http://cbonte.github.io/haproxy-dconv/configuration-1.5.html#4.2-bind
details how complex the `bind` configuration can be.

The `templates/fragments/_bind.erb` template now processes the `bind`
hash very simply by using the hash keys as "address and/or port" and the
key's value as a list of bind options that together make up a single
`bind` line in the resulting listen or frontend service configuration.

Most notably there is no more IP address or port validation. The values
are taken as is from the `bind` hash. The rationale behind that is
discussed in <https://tickets.puppetlabs.com/browse/MODULES-1741>.

Contains updated and expanded documentation, and updated spec tests.
@igalic
Copy link

igalic commented Feb 6, 2015

now i finally understand the title of your jira.

@antaflos
Copy link
Author

antaflos commented Feb 6, 2015

Granted, I created the Jira issue at 5 AM but I didn't think the title was going to be a problem :) Do you have a suggestion for a better title?

@igalic
Copy link

igalic commented Feb 6, 2015

no worries, it's alright!

@duritong
Copy link

Would be nice if we could this get merged :-)

@igalic
Copy link

igalic commented Feb 16, 2015

ping @cmurphy / @mhaskel: ping, given that @antaflos and me use this in our prod infra, maye we could merge it :)


also, now that concat has a validate_cmd we could also simplify this whole thing in the next release…

cmurphy added a commit that referenced this pull request Feb 16, 2015
Make `bind` parameter processing more flexible
@cmurphy cmurphy merged commit 4f0009d into puppetlabs:master Feb 16, 2015
cegeka-jenkins pushed a commit to cegeka/puppet-haproxy that referenced this pull request Dec 19, 2017
…ility

Make `bind` parameter processing more flexible
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants