nicknezis opened a new issue #3652:
URL: https://github.com/apache/incubator-heron/issues/3652


   **Describe the bug**
   When running `heron kill` on a topology name that does not exist. The 
Kubernetes scheduler throws the following stacktrace exception:
   ```
   2020-12-29 08:23:22,449 ERROR 
org.apache.heron.apiserver.resources.TopologyResource kill qtp952486988-18 
error killing topology acking2
   java.lang.IllegalStateException: closed
        at okio.RealBufferedSource.select(RealBufferedSource.java:93)
        at okhttp3.internal.Util.bomAwareCharset(Util.java:467)
        at okhttp3.ResponseBody.string(ResponseBody.java:181)
        at 
org.apache.heron.scheduler.kubernetes.KubernetesUtils.errorMessageFromResponse(KubernetesUtils.java:72)
        at 
org.apache.heron.scheduler.kubernetes.V1Controller.deleteStatefulSet(V1Controller.java:264)
        at 
org.apache.heron.scheduler.kubernetes.V1Controller.killTopology(V1Controller.java:137)
        at 
org.apache.heron.scheduler.kubernetes.KubernetesScheduler.onKill(KubernetesScheduler.java:113)
        at 
org.apache.heron.scheduler.client.LibrarySchedulerClient.killTopology(LibrarySchedulerClient.java:61)
        at 
org.apache.heron.scheduler.RuntimeManagerRunner.killTopologyHandler(RuntimeManagerRunner.java:173)
        at 
org.apache.heron.scheduler.RuntimeManagerRunner.call(RuntimeManagerRunner.java:98)
        at 
org.apache.heron.scheduler.RuntimeManagerMain.callRuntimeManagerRunner(RuntimeManagerMain.java:498)
        at 
org.apache.heron.scheduler.RuntimeManagerMain.manageTopology(RuntimeManagerMain.java:411)
        at 
org.apache.heron.apiserver.actions.TopologyRuntimeAction.execute(TopologyRuntimeAction.java:39)
        at 
org.apache.heron.apiserver.resources.TopologyResource.kill(TopologyResource.java:493)
        at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at 
org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)
        at 
org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144)
        at 
org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161)
        at 
org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160)
        at 
org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99)
        at 
org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389)
        at 
org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347)
        at 
org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102)
        at 
org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326)
        at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
        at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
        at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
        at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
        at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
        at 
org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317)
        at 
org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305)
        at 
org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154)
        at 
org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:473)
        at 
org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:427)
        at 
org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:388)
        at 
org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:341)
        at 
org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:228)
        at 
org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:841)
        at 
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:535)
        at 
org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188)
        at 
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253)
        at 
org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168)
        at 
org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473)
        at 
org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166)
        at 
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155)
        at 
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
        at 
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
        at org.eclipse.jetty.server.Server.handle(Server.java:564)
        at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:317)
        at 
org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)
        at 
org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279)
        at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:110)
        at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124)
        at 
org.eclipse.jetty.util.thread.Invocable.invokePreferred(Invocable.java:128)
        at 
org.eclipse.jetty.util.thread.Invocable$InvocableExecutor.invoke(Invocable.java:222)
        at 
org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:294)
        at 
org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:199)
        at 
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:673)
        at 
org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:591)
        at java.base/java.lang.Thread.run(Thread.java:834)
   2020-12-29 08:23:22,451 DEBUG org.eclipse.jetty.server.HttpChannel 
sendResponse qtp952486988-18 sendResponse info=null 
content=HeapByteBuffer@24027e1e[p=0,l=20,c=8192,r=20]={<<<{"message":"closed"}>>>\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00...\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00}
 complete=true committing=true callback=Blocker@7258f178{null}
   2020-12-29 08:23:22,451 DEBUG org.eclipse.jetty.server.HttpChannel commit 
qtp952486988-18 COMMIT for /api/v1/topologies/heronkube/root/default/acking2 on 
HttpChannelOverHttp@72853180{r=1,c=true,a=DISPATCHED,uri=//heronkube-apiserver:9000/api/v1/topologies/heronkube/root/default/acking2}
   500 Internal Server Error HTTP/1.1
   Date: Tue, 29 Dec 2020 08:23:21 GMT
   Content-Length: 20
   Content-Type: application/json
   
   
   2020-12-29 08:23:22,452 DEBUG 
org.eclipse.jetty.server.HttpConnection$SendCallback process qtp952486988-18 
org.eclipse.jetty.server.HttpConnection$SendCallback@5a3ae62a[PROCESSING][i=HTTP/1.1{s=500,h=3,cl=20},cb=org.eclipse.jetty.server.HttpChannel$CommitCallback@5f977169]
 generate: NEED_HEADER (null,[p=0,l=20,c=8192,r=20],true)@START
   2020-12-29 08:23:22,452 DEBUG org.eclipse.jetty.http.HttpGenerator 
generateHeaders qtp952486988-18 generateHeaders HTTP/1.1{s=500,h=3,cl=20} 
last=true 
content=HeapByteBuffer@24027e1e[p=0,l=20,c=8192,r=20]={<<<{"message":"closed"}>>>\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00...\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00}
   2020-12-29 08:23:22,452 DEBUG org.eclipse.jetty.http.HttpGenerator 
generateHeaders qtp952486988-18 Date: Tue, 29 Dec 2020 08:23:21 GMT
   Content-Length: 20
   Content-Type: application/json
   ```
   
   **Expected behavior**
   Properly handle the k8s response when checking for a StatefulSet that does 
not exist.
   
   **Operating System**
    - OS: Centos7
    - Version 0.20.3-incubating-rc9
   
   **Additional context**
   Add any other context about the problem here.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to