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

CLI - Create graceful and forced stop options #3886

Closed
TylerJewell opened this issue Jan 24, 2017 · 3 comments
Closed

CLI - Create graceful and forced stop options #3886

TylerJewell opened this issue Jan 24, 2017 · 3 comments
Assignees
Labels
kind/enhancement A feature request - must adhere to the feature request template. severity/blocker Causes system to crash and be non-recoverable or prevents Che developers from working on Che code.

Comments

@TylerJewell
Copy link

TylerJewell commented Jan 24, 2017

Eclipse Che is implementing a REST service that will offer a graceful shutdown of all services. Today, when we stop the server, Tomcat will be stopped if it has not naturally stopped within 4 minutes. If you have a large number of running workspaces, you may want them to all be stopped (with appropriate snapshots) before initiating Tomcat shutdown. This REST service executes this process.

We need to extend the CLI to support two forms of stop:

  1. forced stop (essentially what we do now where we just stop all containers without concern for internals)
  2. graceful stop (default - which will execute the REST service).

The REST service is documented here. For Codenvy variations of this implemementation, it will require an admin token to complete.

The syntax:

eclipse/che stop [--force] [--user username] [--password password]

The [--force] is the current approach to stopping. The new default would invoke the REST service first. We would then need to implement a periodic polling mechanism that prints out appropriate status while the stopping process is completing. In the Codenvy variant, we will need to also ask for username / password on the command line to proceed. These parameters can optionally be provided as parameters.

@TylerJewell TylerJewell added the kind/enhancement A feature request - must adhere to the feature request template. label Jan 24, 2017
@benoitf
Copy link
Contributor

benoitf commented Jan 25, 2017

issue for che for REST API is #3892

@TylerJewell
Copy link
Author

We discussed some implementation details:

  1. We may opt to use custom action to interact with REST service.
  2. We will not need any prompts for Che shutdown - we may need them for Codenvy shutdown.

@TylerJewell TylerJewell added the status/blocked Issue that can’t be moved forward. Must include a comment on the reason for the blockage. label Jan 25, 2017
@benoitf benoitf added the status/in-progress This issue has been taken by an engineer and is under active development. label Jan 31, 2017
@benoitf benoitf added this to the 5.2.0 milestone Jan 31, 2017
@benoitf benoitf added severity/blocker Causes system to crash and be non-recoverable or prevents Che developers from working on Che code. and removed status/blocked Issue that can’t be moved forward. Must include a comment on the reason for the blockage. labels Jan 31, 2017
benoitf added a commit that referenced this issue Jan 31, 2017
if —force is used, then it is the same behaviour than before
else by default a new action graceful-stop is called which calls the /api/system/stop and wait that the remote side is going into “READY_TO_SHUTDOWN” mode.
after that the stop of containers is performed

if auth is required, —user and —password can provide the auth data

Change-Id: Ifea9bd32b0dfd2965e5365bc4ee54eb7c8714fc9
Signed-off-by: Florent BENOIT <fbenoit@codenvy.com>
@benoitf
Copy link
Contributor

benoitf commented Jan 31, 2017

Adding pull request #3968

benoitf added a commit that referenced this issue Jan 31, 2017
… is the same behaviour than before else by default a new action graceful-stop is called which calls the /api/system/stop and wait that the remote side is going into “READY_TO_SHUTDOWN” mode. after that the stop of containers is performed

Change-Id: Ibfd684a5f8fb17d13e8b86f42a10c76fe66a70dd
Signed-off-by: Florent BENOIT <fbenoit@codenvy.com>
@benoitf benoitf added status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community. status/pending-merge and removed status/in-progress This issue has been taken by an engineer and is under active development. status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community. labels Jan 31, 2017
@JamesDrummond JamesDrummond removed this from the 5.2.0 milestone Jan 31, 2017
benoitf added a commit to eclipse-che/che-docs that referenced this issue Jan 31, 2017
che#3886 : add graceful stop command
benoitf added a commit that referenced this issue Jan 31, 2017
… is the same behaviour than before else by default a new action graceful-stop is called which calls the /api/system/stop and wait that the remote side is going into “READY_TO_SHUTDOWN” mode. after that the stop of containers is performed

Change-Id: Ibfd684a5f8fb17d13e8b86f42a10c76fe66a70dd
Signed-off-by: Florent BENOIT <fbenoit@codenvy.com>
@benoitf benoitf added this to the 5.2.0 milestone Jan 31, 2017
@JamesDrummond JamesDrummond removed this from the 5.2.0 milestone Feb 2, 2017
JPinkney pushed a commit to JPinkney/che that referenced this issue Aug 17, 2017
if —force is used, then it is the same behaviour than before
else by default a new action graceful-stop is called which calls the /api/system/stop and wait that the remote side is going into “READY_TO_SHUTDOWN” mode.
after that the stop of containers is performed

if auth is required, —user and —password can provide the auth data

Change-Id: Ifea9bd32b0dfd2965e5365bc4ee54eb7c8714fc9
Signed-off-by: Florent BENOIT <fbenoit@codenvy.com>
JPinkney pushed a commit to JPinkney/che that referenced this issue Aug 17, 2017
…ed, then it is the same behaviour than before else by default a new action graceful-stop is called which calls the /api/system/stop and wait that the remote side is going into “READY_TO_SHUTDOWN” mode. after that the stop of containers is performed

Change-Id: Ibfd684a5f8fb17d13e8b86f42a10c76fe66a70dd
Signed-off-by: Florent BENOIT <fbenoit@codenvy.com>
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. severity/blocker Causes system to crash and be non-recoverable or prevents Che developers from working on Che code.
Projects
None yet
Development

No branches or pull requests

3 participants