Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [che-dev] ApplicationStatus.FAILD

Hello Dany
Sorry for long reply.

If runner is failed to start it has to handle this and close all used resources during "run" method call.
That's why if runner has status NEW or RUNNING he has a stop link.
 Only on this stages there is something that we could do.  

Sergii Kabashniuk

On Thu, Nov 5, 2015 at 1:04 PM, Shapiro, Dany <dany.shapiro@xxxxxxx> wrote:

Hi,

A gentle reminder , any one ?

Please see below..

 

Thanks

Dany

 

From: che-dev-bounces@xxxxxxxxxxx [mailto:che-dev-bounces@xxxxxxxxxxx] On Behalf Of Shapiro, Dany
Sent: Monday 02 November 2015 18:05
To: che-dev@xxxxxxxxxxx
Subject: [che-dev] ApplicationStatus.FAILD

 

Hi.

Lets say  my  runner threw a RunnerException during run request, as a result the status request for that runner Pid returns Faild.

The ApplicationProcessDescriptor doesn’t contain the Stop link , following the logic implemented in stop of RunnerService. getStatus

 

 

 

Now , I would like to stop that runner process but  can't , because of the following code  in RemoteRunnerProcess :

 

public ApplicationProcessDescriptor stop() throws RunnerException, NotFoundException {

        final ApplicationProcessDescriptor descriptor = getApplicationProcessDescriptor();

        final Link link = descriptor.getLink(Constants.LINK_REL_STOP);

        if (link == null) {

            switch (descriptor.getStatus()) {

                case STOPPED:

                case CANCELLED:

                    LOG.debug("Can't stop process, status is {}", descriptor.getStatus());

                    return descriptor;

                default:

                    throw new RunnerException("Can't stop application. Link for stop application is not available.");

            }

        }

        try {

            return HttpJsonHelper.request(ApplicationProcessDescriptor.class, DtoFactory.getInstance().clone(link));

        } catch (IOException e) {

            throw new RunnerException(e);

        } catch (ServerException | UnauthorizedException | ForbiddenException | ConflictException e) {

            throw new RunnerException(e.getServiceError());

        }

    }

 

 

Is that a  bug  , or am I missing some thing ?

How can I stop a failed runner process .

Thanks.

 

Best Regards,

Dany Shapiro.

DI Cloud Exp DevX | SaaS Extensions &  Ecosystem Team | SAP Labs Israel | 15 Hatidhar st. | Raanana 43665, Israel

T +972-(0)9-777-5201

SAP_logo_small

 

 


_______________________________________________
che-dev mailing list
che-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/che-dev



Back to the top