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
[FINE] Disable connection reuse for WebSocket connections in Apache #219
Conversation
22b31ec
to
0f5e5c8
Compare
end | ||
ports | ||
end | ||
|
||
def remove_ports(ports, protocol) | ||
ports = Array(ports) | ||
ports.each do |port| | ||
@raw_lines.delete_if { |line| line =~ /BalancerMember\s+#{protocol}:\/\/0\.0\.0\.0:#{port}$/ } | ||
@raw_lines.delete_if { |line| line =~ /BalancerMember\s+#{protocol}:\/\/0\.0\.0\.0:#{port}( disablereuse=on)?$/ } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@skateman does this mean we only remove the ws
protocol BalancerMembers? What about non-ws? I guess I'm wondering why we are checking for disablereuse at all if no other line will match the protocol, 0.0.0.0 and port... Right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, AFAIK the ?
at the end of the regexp makes the disablereuse
part optional, but maybe I'm wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I believe so, but if it's not required, I wouldn't include it. I think it's not required so I'd prefer we keep the regexp as simple as possible. Maybe I'm wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, I saw the $
at the end and did not wanted to drop it.
|
||
it 'remove_ports should remove the line with a suffix' do | ||
before = @conf.raw_lines.dup | ||
@conf.raw_lines = ["<Proxy balancer://evmcluster/ lbmethod=byrequests>\n", "BalancerMember ws://0.0.0.0:3000 disablereuse=on\n", "</Proxy>\n"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@skateman can you add a non-ws remove_ports test to confirm the regexp works for both?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jrafanie done
This is a temporary workaround for the issue described here: https://bugzilla.redhat.com/show_bug.cgi?id=1404354 This can be reverted after httpd is updated to 2.4.25 or newer
0f5e5c8
to
65842a4
Compare
Checked commit skateman@65842a4 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM @simaishi 👍
@skateman this can be |
We aren't using websocket notifications in |
Then... what change will fix the issue for Euwe branch?? |
@simaishi uh, I got confused by the names, sure, backport it to |
@skateman Thanks 😄 Euwe backport (to manageiq repo) details:
|
This is a temporary workaround for the issue described here:
https://bugzilla.redhat.com/show_bug.cgi?id=1404354
This can be reverted after httpd is updated to 2.4.25 or newer