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

Fix webapp startup if no docker IP's set. #8655

Merged
merged 4 commits into from
Feb 8, 2018
Merged

Fix webapp startup if no docker IP's set. #8655

merged 4 commits into from
Feb 8, 2018

Conversation

mshaposhnik
Copy link
Contributor

What does this PR do?

Fix webapp startup if no docker_ip or external_docker_ip is set. That can be possible when running without CLI.

What issues does this PR fix or reference?

N//A

Release Notes

N/A

Docs PR

N/A

@benoitf benoitf added kind/bug Outline of a bug - must adhere to the bug report template. status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community. labels Feb 7, 2018
@Nullable @Named("che.docker.ip") String internalIpOfContainers,
@Named("che.port") int chePort,
@Nullable @Named("che.docker.ip.external") String externalIpOfContainers,
@Nullable @Named("che.singleport.wildcard_domain.host") String wildcardHost) {
if (internalIpOfContainers == null && externalIpOfContainers == null) {
if (isSinglePortEnabled && internalIpOfContainers == null && externalIpOfContainers == null) {
Copy link
Member

Choose a reason for hiding this comment

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

Can we move this check into SinglePortHostnameBuilder?

@Nullable @Named("che.docker.ip") String internalIpOfContainers,
@Nullable @Named("che.docker.ip.external") String externalIpOfContainers,
@Nullable @Named("che.docker.network") String dockerNetwork,
@Nullable @Named("che.singleport.wildcard_domain.host") String wildcardHost) {
if (internalIpOfContainers == null && externalIpOfContainers == null) {
if (isSinglePortEnabled && internalIpOfContainers == null && externalIpOfContainers == null) {
throw new IllegalStateException(
Copy link
Member

Choose a reason for hiding this comment

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

I think ConfigurationException would be better here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agree

@mshaposhnik mshaposhnik merged commit 3700d41 into master Feb 8, 2018
@benoitf benoitf removed the status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community. label Feb 8, 2018
@benoitf benoitf added this to the 6.1.0 milestone Feb 8, 2018
@skabashnyuk skabashnyuk deleted the fix_non-cli branch March 13, 2018 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Outline of a bug - must adhere to the bug report template.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants