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

bybusiness is the only load balancing method used #147

Merged
merged 1 commit into from
May 1, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions lib/gems/pending/util/miq_apache/miq_apache.rb
Original file line number Diff line number Diff line change
Expand Up @@ -188,13 +188,7 @@ def self.install_default_config(opts = {})
end

def self.create_balancer_config(opts = {})
lbmethod = case opts[:lbmethod]
when :busy then :bybusyness
when :traffic then :bytraffic
else :byrequests
end

"<Proxy balancer://#{opts[:cluster]}/ lbmethod=#{lbmethod}>\n</Proxy>\n"
"<Proxy balancer://#{opts[:cluster]}/ lbmethod=bybusyness>\n</Proxy>\n"
end

def self.create_redirects_config(opts = {})
Expand Down
14 changes: 0 additions & 14 deletions spec/util/miq_apache/conf_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,6 @@
end

context "building balancer config" do
context "lbmethod" do
it "should return a config with lbmethod of 'byrequests' by default" do
expect(MiqApache::Conf.create_balancer_config).to include("lbmethod=byrequests")
end

it "should return a config with lbmethod of 'bytraffic' if passed :traffic" do
expect(MiqApache::Conf.create_balancer_config(:lbmethod => :traffic)).to include("lbmethod=bytraffic")
end

it "should return a config with lbmethod of 'bybusyness' if passed :busy" do
expect(MiqApache::Conf.create_balancer_config(:lbmethod => :busy)).to include("lbmethod=bybusyness")
end
end

it "should set cluster name" do
expect(MiqApache::Conf.create_balancer_config(:cluster => 'evmcluster_ui')).to include("Proxy balancer://evmcluster_ui/")
end
Expand Down