-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 Container Lifecycle support #16391
Conversation
✅ E2E Happy path tests succeed 🎉 See Details
Tested with Eclipse Che Multiuser User on K8S (minikube v1.1.1) |
❌ E2E Happy path tests failed ❗ See Details
Tested with Eclipse Che Multiuser User on K8S (minikube v1.1.1) ℹ️ |
crw-ci-test |
✅ E2E Happy path tests succeed 🎉 See Details
Tested with Eclipse Che Multiuser User on K8S (minikube v1.1.1) |
❌ E2E Happy path tests failed ❗ See Details
Tested with Eclipse Che Multiuser User on K8S (minikube v1.1.1) ℹ️ |
✅ E2E Happy path tests succeed 🎉 See Details
Tested with Eclipse Che Multiuser User on K8S (minikube v1.1.1) |
Signed-off-by: Vitalii Parfonov <[email protected]>
✅ E2E Happy path tests succeed 🎉 See Details
Tested with Eclipse Che Multiuser User on K8S (minikube v1.1.1) |
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.
Generally LGTM apart from 2 minor objections.
...e-api-workspace/src/main/java/org/eclipse/che/api/workspace/server/wsplugins/model/Exec.java
Outdated
Show resolved
Hide resolved
|
||
@Override | ||
public String toString() { | ||
StringBuilder sb = new StringBuilder(); |
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.
toString()
formatting.
...-workspace/src/main/java/org/eclipse/che/api/workspace/server/wsplugins/model/Lifecycle.java
Outdated
Show resolved
Hide resolved
...kspace/src/test/java/org/eclipse/che/api/workspace/server/wsplugins/PluginFQNParserTest.java
Outdated
Show resolved
Hide resolved
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.
I wonder if preStop handlers are run even when we forcibly remove pods
https://github.com/eclipse/che/blob/master/assembly/assembly-wsmaster-war/src/main/webapp/WEB-INF/classes/che/che.properties#L413
For normal work preStop handlers we need to increase If one of the Pod’s containers has defined a preStop hook, it is invoked inside of the container. If the preStop hook is still running after the grace period expires, step 2 is then invoked with a small (2 second) one-time extended grace period. You must modify terminationGracePeriodSeconds if the preStop hook needs longer to complete. |
Signed-off-by: Vitalii Parfonov <[email protected]>
Signed-off-by: Vitalii Parfonov <[email protected]>
✅ E2E Happy path tests succeed 🎉 See Details
Tested with Eclipse Che Multiuser User on K8S (minikube v1.1.1) |
The reason we initially set the termination grace period to 0 is that workspaces would be in a terminating state until it expired, so maybe some process in the workspace isn't properly respecting signals? |
...kspace/src/test/java/org/eclipse/che/api/workspace/server/wsplugins/PluginFQNParserTest.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Vitalii Parfonov <[email protected]>
So @davidfestal @ibuziuk @amisevsk @sleshchenko @l0rd what do you think about |
...kspace/src/test/java/org/eclipse/che/api/workspace/server/wsplugins/PluginFQNParserTest.java
Outdated
Show resolved
Hide resolved
IMHO, we should make this property configurable via toggle per-workspace smth. similar to what is proposed in #15960 |
Signed-off-by: Vitalii Parfonov <[email protected]>
So it this case it will be done via separate PR, right? |
sure |
❌ E2E Happy path tests failed ❗ See Details
Tested with Eclipse Che Multiuser User on K8S (minikube v1.1.1) ℹ️ |
crw-ci-test |
❌ E2E Happy path tests failed ❗ See Details
Tested with Eclipse Che Multiuser User on K8S (minikube v1.1.1) ℹ️ |
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, having some tests would be really nice to have though ;)
crw-ci-test |
❌ E2E Happy path tests failed ❗ See Details
Tested with Eclipse Che Multiuser User on K8S (minikube v1.1.1) ℹ️ |
✅ E2E Happy path tests succeed 🎉 See Details
Tested with Eclipse Che Multiuser User on K8S (minikube v1.1.1) |
@metlos @sleshchenko @amisevsk can i merge it? |
@metlos @sleshchenko folks, are you ok to merge this PR? |
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, sorry about the delay.
I agree with Ilya that TerminationGracePeriod should be configurable (separate PR/issue), but it might open the door to some subtle configuration issues that are hard to notice. I also think there's some work to be done in implementing a nonzero termination grace period, as in my experience workspaces will take the entire termination grace period (even if it's a minute) -- that may have changed somewhere along the line though.
Signed-off-by: Vitalii Parfonov [email protected]
What does this PR do?
Add Container Lifecycle support.
This should allow postStart and preStop actions for plugin containers.
More information here: https://kubernetes.io/docs/tasks/configure-pod-container/attach-handler-lifecycle-event/
depends on: eclipse-che/che-plugin-broker#98
What issues does this PR fix or reference?
#16464
Release Notes
Docs PR