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

Make brokers pod use a unique name to avoid collisions #12518

Conversation

garagatyi
Copy link

@garagatyi garagatyi commented Jan 25, 2019

What does this PR do?

Make brokers pod use a unique name to avoid collisions. This prevents failure of starting several workspaces concurrently.

What issues does this PR fix or reference?

Related to #12238

Docs PR

Signed-off-by: Oleksandr Garagatyi <ogaragat@redhat.com>
@garagatyi garagatyi requested a review from sleshchenko January 25, 2019 11:48
@che-bot che-bot added status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community. kind/enhancement A feature request - must adhere to the feature request template. labels Jan 25, 2019
Copy link
Member

@sleshchenko sleshchenko left a comment

Choose a reason for hiding this comment

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

OK for me.
Please take a look my inline comments

@@ -196,7 +196,7 @@ private Container newContainer(
private Pod newPod() {
return new PodBuilder()
.withNewMetadata()
.withName(BROKERS_POD_NAME)
.withName(generateUniqueName(BROKERS_POD_NAME))
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 it would be better to prefix BrokerPodName with workspace id if it is possible

Copy link
Member

Choose a reason for hiding this comment

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

Looks like you changed code line and no tests affected. I do not think that it is critical functionality that must be tested by still it would be nice to have some check in tests.

Copy link
Author

Choose a reason for hiding this comment

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

Workspace ID would not help to make it unique. Do you mean another purpose?

Copy link
Author

Choose a reason for hiding this comment

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

How to test that something was randomly generated? Should I just test that it starts from something? I do not think such tests are really needed.

Copy link
Member

Choose a reason for hiding this comment

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

As far as I know, there should be one Plugin Broker pod for one starting workspace. Could you elaborate why prefixing with workspace id won't help prevent failure of starting several workspaces concurrently?

Copy link
Member

Choose a reason for hiding this comment

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

Well, I see that name should be prefixed by environmentProvisioner here https://github.com/eclipse/che/blob/a4f8410e6e3bc1797baa10142079f71675596766/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/wsplugins/PluginBrokerManager.java#L104.
But wonder why there are any issues with starting several Che 7 workspaces concurrently in the same kubernetes namespace.

Copy link
Author

Choose a reason for hiding this comment

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

Because if we start several workspaces we start several brokers pods

Copy link
Member

Choose a reason for hiding this comment

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

But they are named workspace2hedhs4g-plugin-broker, workspace90rfhjcgg-plugin-broker, etc. And they are not conflicting. Did I miss something?

Copy link
Author

Choose a reason for hiding this comment

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

You are right. Closing this PR since it is not needed

@sleshchenko
Copy link
Member

sleshchenko commented Jan 25, 2019

@rkratky @dneary @slemeur People still fill in Release Notes section in PRs instead of preparing RN document in Che Docs repository[1]. So, it is needed to update GitHub template in Che repository.
@garagatyi Maybe (maybe not) it makes sense to have more details in Release Notes about an ability to run multiple Che 7 workspaces
[1] https://github.com/eclipse/che-docs/tree/master/release-notes

@garagatyi
Copy link
Author

@sleshchenko these changes are just part of the changes needed to allow starting several workspaces in the same namespace.

@garagatyi
Copy link
Author

ci-test

@sleshchenko
Copy link
Member

@sleshchenko these changes are just part of the changes needed to allow starting several workspaces in the same namespace.

@garagatyi Do you mean that detailed Release Notes will be provided in another PR or that an ability to run multiple Che 7 workspaces should not be detailed described?

@garagatyi
Copy link
Author

@sleshchenko This PR doesn't provide a complete solution, so it should not go to the release notes. I'll remove it from the PR description

@che-bot
Copy link
Contributor

che-bot commented Jan 25, 2019

Results of automated E2E tests of Eclipse Che Multiuser on OCP:
Build details
Test report
docker image: eclipseche/che-server:12518
https://github.com/orgs/eclipse/teams/eclipse-che-qa please check this report.

@garagatyi garagatyi closed this Jan 28, 2019
@garagatyi garagatyi deleted the makeBrokersUsePodWithUniqueName branch January 28, 2019 10:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement A feature request - must adhere to the feature request template. status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants