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

graceful-stop shouldn't fail if system is not in RUNNING state #3988

Closed
voievodin opened this issue Feb 1, 2017 · 0 comments
Closed

graceful-stop shouldn't fail if system is not in RUNNING state #3988

voievodin opened this issue Feb 1, 2017 · 0 comments
Assignees
Labels
kind/enhancement A feature request - must adhere to the feature request template.

Comments

@voievodin
Copy link
Contributor

Current approach is to fail if system is not RUNNING.
But as we expose public API for preparing system to shutdown it makes sense to analyze
current system state and wait for READY_TO_SHUTDOWN instead of failing immediately.
The example of output i got when after i played with API and called cli stop.

Status: Image is up to date for eclipse/che:nightly

INFO: Waiting for graceful stop of services...
ERROR: (che action/graceful-stop): Status is not in RUNNING state so the graceful can't be called.

Currently the system can't go back to running state, so if system is in the state different from running all that cli needs to do is to wait for it to become READY_TO_SHUTDOWN.
Proposed action map for cli:

RUNNING -> call stop and wait for system to be in READY_TO_SHUTDOWN state
READY_TO_SHUTDOWN -> do nothing(maybe print something useful)
ANY_OTHER_STATE -> wait for system to be in READY_TO_SHUTDOWN state
@benoitf benoitf self-assigned this Feb 1, 2017
@voievodin voievodin changed the title graceful-stop should fail if system is not in RUNNING state graceful-stop shouldn't fail if system is not in RUNNING state Feb 1, 2017
@benoitf benoitf added kind/enhancement A feature request - must adhere to the feature request template. status/open-for-dev An issue has had its specification reviewed and confirmed. Waiting for an engineer to take it. labels Feb 1, 2017
@skabashnyuk skabashnyuk added kind/bug Outline of a bug - must adhere to the bug report template. kind/enhancement A feature request - must adhere to the feature request template. and removed kind/enhancement A feature request - must adhere to the feature request template. kind/bug Outline of a bug - must adhere to the bug report template. labels Feb 1, 2017
benoitf added a commit that referenced this issue Feb 8, 2017
  - RUNNING -> call stop and wait for system to be in READY_TO_SHUTDOWN state
  - READY_TO_SHUTDOWN -> do nothing(maybe print something useful)
  - ANY_OTHER_STATE -> wait for system to be in READY_TO_SHUTDOWN state

Change-Id: I55a8b5ecb2b016d31dbbd95b8793af4952d8116b
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. and removed status/open-for-dev An issue has had its specification reviewed and confirmed. Waiting for an engineer to take it. labels Feb 8, 2017
@benoitf benoitf closed this as completed in 5c7e9a9 Feb 9, 2017
@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 9, 2017
@benoitf benoitf added this to the 5.3.0 milestone Feb 9, 2017
@JamesDrummond JamesDrummond removed this from the 5.3.0 milestone Feb 17, 2017
JPinkney pushed a commit to JPinkney/che that referenced this issue Aug 17, 2017
eclipse-che#4063)

- RUNNING -> call stop and wait for system to be in READY_TO_SHUTDOWN state
  - READY_TO_SHUTDOWN -> do nothing(maybe print something useful)
  - ANY_OTHER_STATE -> wait for system to be in READY_TO_SHUTDOWN state

Change-Id: I55a8b5ecb2b016d31dbbd95b8793af4952d8116b
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.
Projects
None yet
Development

No branches or pull requests

4 participants