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

Add settings key to disable console proxy #12675

Merged
merged 2 commits into from
Nov 28, 2016

Conversation

martinpovolny
Copy link
Member

@martinpovolny martinpovolny commented Nov 16, 2016

https://bugzilla.redhat.com/show_bug.cgi?id=1399369

Using 'server.console_proxy_disabled' set to 'true' the proxying can be
disabled even if the display ticket is being requested by a different
server than the one that originated the request.

This allows the server to behave the same as before Euwe.

This is an addition to the 2 keys:

'server.proxy_port.start', defaults to 6000
'server.proxy_port.end', defaults to 7000

that allow setting of the port range for the console proxy.

ping @skateman

@chessbyte chessbyte changed the title Add settings key to disable console proxy. Add settings key to disable console proxy Nov 16, 2016
@@ -93,8 +93,12 @@ def self.is_local?(originating_server)
end

def self.launch_proxy_if_not_local(console_args, originating_server, host_address, host_port)
proxy_disabled = ::Settings.server.try(:console_proxy_disabled)
Copy link
Member

Choose a reason for hiding this comment

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

No need for try. The server key will always exist because

:server:

Copy link
Member Author

Choose a reason for hiding this comment

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

Removed. Thx.

Using 'server.console_proxy_disabled' set to 'true' the proxying can be
disabled even if the display ticket is being requested by a different
server than the one that originated the request.

This allows the server to behave the same as before Euwe.

This is an addition to the 2 keys:

'server.proxy_port.start', defaults to 6000
'server.proxy_port.end', defaults to 7000

that allow setting of the port range for the console proxy.
@miq-bot
Copy link
Member

miq-bot commented Nov 25, 2016

Checked commits martinpovolny/manageiq@64e04b9~...b2ac616 with ruby 2.2.5, rubocop 0.37.2, and haml-lint 0.16.1
1 file checked, 0 offenses detected
Everything looks good. 🍪

@martinpovolny
Copy link
Member Author

ping @Fryguy. Can we merge this one?

@Fryguy
Copy link
Member

Fryguy commented Nov 28, 2016

cc @yrudman (not sure if you need to add this one to your spreadsheet as a "hidden" setting. Merging anyway.

@Fryguy Fryguy merged commit 5271c91 into ManageIQ:master Nov 28, 2016
@Fryguy Fryguy added this to the Sprint 50 Ending Dec 5, 2016 milestone Nov 28, 2016
@yrudman
Copy link
Contributor

yrudman commented Nov 28, 2016

  1. ::Settings.server.proxy_port is not present in settings.yml and calls ::Settings.server.proxy_port.start and ::Settings.server.proxy_port.end will throw errors. I would suggest to add default values to settings.yml and remove it from code.
    If we do not want to add above values to settings.tml than original code should be used:
    ::Settings.server.proxy_port.try(:start)

  2. I will add ::Settings.server.console_proxy_disabled to the list of hidden values if we do not want to add default value to settings.yml.

@Fryguy
Copy link
Member

Fryguy commented Nov 28, 2016

@yrudman Can you make the follow up PR?

@yrudman
Copy link
Contributor

yrudman commented Nov 28, 2016

ok

@simaishi
Copy link
Contributor

simaishi commented Jan 6, 2017

Euwe backport details:

$ git log -1
commit b603479542468929d05cd9470ad3abcac7305329
Author: Jason Frey <fryguy9@gmail.com>
Date:   Mon Nov 28 14:42:54 2016 -0500

    Merge pull request #12675 from martinpovolny/console_config
    
    Add settings key to disable console proxy
    (cherry picked from commit 5271c9157f255405b9af865edd02a8be7a461b3c)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1399677

@martinpovolny martinpovolny deleted the console_config branch November 28, 2017 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants