[
https://issues.jboss.org/browse/JBIDE-22608?page=com.atlassian.jira.plugi...
]
Rob Stryker commented on JBIDE-22608:
-------------------------------------
[~mmalina] I'm not able to replicate this.
Code for the shutdown controller is as follows:
{code}
@Override
public void stop(boolean force) {
getBehavior().setServerStopping();
IStatus state = PollThreadUtils.isServerStarted(getServer(), new VagrantPoller());
boolean started = state.isOK();
if( !started ) {
if( state.getSeverity() == IStatus.ERROR ) {
// server is stopped, cancel the poller
cancelPoller();
getBehavior().setServerStopped();
return;
}
}
try {
shutdownViaExternalTools();
} catch(CoreException ce) {
CDKCoreActivator.getDefault().getLog().log(
new Status(IStatus.ERROR, CDKCoreActivator.PLUGIN_ID, "Error shutting down
server", ce));
getBehavior().setServerStarted();
}
}
{code}
When the cdk is asked to stop, we first do a vagrant status. When we see it is already
stopped, we just market it as stopped and take no action.
Is there some difference between what build you're using and my devenv?
Support scenario when cdk is stopped from cli and then in devstudio
-------------------------------------------------------------------
Key: JBIDE-22608
URL:
https://issues.jboss.org/browse/JBIDE-22608
Project: Tools (JBoss Tools)
Issue Type: Feature Request
Components: cdk
Affects Versions: 4.4.0.Final
Reporter: Martin Malina
Assignee: Rob Stryker
Assume your cdk is started and it's shown as started in devstudio, now what if you
stop cdk from cli for whatever reason? Currently the tooling can't handle such
situation.
If you then try to stop cdk in devstudio, you get an error pop-up:
Server Container Development Environment failed to stop.
And the console will just say:
==> default: VM not created. Moving on...
But most importantly, the server adapter will stay in the Started state.
We should probably support this scenario - it's quite likely that it will happen to
users.
Right now there are several ways out of this situation:
a) Start cdk from cli again and everything will probably work as expected
b) Restart your IDE
So I suggest we improve the tooling in such a way that when you stop cdk, it will be able
to detect that it's actually not running and just change the state to Stopped. It may
be still ok to pop up the error saying it failed to stop. But at least you can now start
it again from the IDE.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)