-
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
CHE-249: Setting workspace Pod terminationGracePeriodSeconds to zero #5007
Conversation
Can one of the admins verify this patch? |
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.
Thanks Ilya! Looks mostly good -- just a minor issue with how the grace period is being set.
I've tested shutting down a workspace with the 0 second grace period, and it brings workspace shutdown down to ~5 seconds when running on minishift.
@@ -1530,6 +1532,7 @@ private String waitAndRetrieveContainerID(String deploymentName) throws IOExcept | |||
if (OPENSHIFT_POD_STATUS_RUNNING.equals(status)) { | |||
String containerID = pod.getStatus().getContainerStatuses().get(0).getContainerID(); | |||
String normalizedID = KubernetesStringUtils.normalizeContainerID(containerID); | |||
pod.getSpec().setTerminationGracePeriodSeconds(OPENSHIFT_POD_TERMINATION_GRACE_PERIOD); |
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.
Doing it this way will not update the actual Pod spec. I think we need to add this in createOpenShiftDeployment()
PodSpec podSpec = new PodSpecBuilder()
.withContainers(container)
.withVolumes(getVolumesFrom(volumes, workspaceID))
.withTerminationGracePeriodSeconds(OPENSHIFT_POD_TERMINATION_GRACE_PERIOD)
.build();
@amisevsk oh, thank you for review - I had no chance to test this PR due to weird issue with building che (I even posted a question on stack overflow - http://stackoverflow.com/questions/43792427/maven-hangs-forever-during-the-project-build-used-to-work-fine) lemme update the PR |
Signed-off-by: Ilya Buziuk <ibuziuk@redhat.com>
PR has been updated |
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! Thanks.
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.
Yes go ahead
Il 05 mag 2017 00:30, "Ilya Buziuk" <notifications@github.com> ha scritto:
… @l0rd <https://github.com/l0rd> @amisevsk <https://github.com/amisevsk>
shall we apply ? (code freeze is over I guess)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#5007 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAlC77CI8n0ELQNqtqg5Y_cRPxQBb0Xzks5r2lGOgaJpZM4NRJNF>
.
|
What does this PR do?
Setting workspace Pod terminationGracePeriodSeconds to zero
What issues does this PR fix or reference?
https://issues.jboss.org/browse/CHE-249