Skip to content
This repository was archived by the owner on Jan 8, 2019. It is now read-only.

add attributes support to haproxy #1269

Merged
merged 3 commits into from
Sep 20, 2018

Conversation

leochen4891
Copy link
Contributor

@leochen4891 leochen4891 commented Sep 14, 2018

Added attributes to remove some dependency from bcpc to bcpc-hadoop, and makes it easier to support HA services.
Also, included existing oozie ha to above mechanism.

@leochen4891
Copy link
Contributor Author

leochen4891 commented Sep 14, 2018

add_haproxy_services
Tested on a physical cluster. The screenshot was taken after bouncing hbase-master on head node 1.
We can observe that head node 3 became hbase-master


defaults
log global
maxconn 8000
source <%="#{node[:bcpc][:management][:vip]}"%>
source <%= @local_ip %>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea! This allows us to properly health-check MySQL again?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes

@cbaenziger
Copy link
Member

@leochen4891 is this good to merge?

@leochen4891
Copy link
Contributor Author

Tested.

default_backend backend_oozie

backend backend_oozie
<% @ha_services.each do |service| -%>
Copy link
Member

@vt0r vt0r Sep 20, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This logic should probably move back out to the recipe, if possible. JK LOL

<% @oozie_servers.each do |server| -%>
<%= "server #{float_host(server[:fqdn])} #{server['bcpc']['floating']['ip']}:11000 check" %>
<% end -%>
<% if !service['http_check_url'].nil? and !service['http_check_expect_str'].nil? -%>
Copy link
Member

@vt0r vt0r Sep 20, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here. Never mind.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants