Hydrospheredata / hydro-serving

MLOps Platform
http://docs.hydrosphere.io
Apache License 2.0
271 stars 41 forks source link

Can't create a service, if the same model is used in another service. #83

Closed KineticCookie closed 6 years ago

KineticCookie commented 6 years ago
[INFO ] c.s.d.c.DefaultDockerClient c.s.d.c.DefaultDockerClient.createContainer.635 Creating container with ContainerConfig: ContainerConfig{hostname=null, domainname=null, user=null, attachStdin=null, attachStdout=null, attachStderr=null, portSpecs=null, exposedPorts=null, tty=null, openStdin=null, stdinOnce=null, env=null, cmd=null, image=kek:1, volumes={/model={}}, workingDir=null, entrypoint=null, networkDisabled=null, onBuild=null, labels={MODEL_VERSION_ID=1, SERVICE_ID=0, MODEL_NAME=kek, MODEL_TYPE=spark:2.1, MODEL_VERSION=1, HS_SERVICE_MARKER=HS_SERVICE_MARKER, DEPLOYMENT_TYPE=MODEL}, macAddress=null, hostConfig=null, stopSignal=null, healthcheck=null, networkingConfig=null}
[ERROR] i.h.s.m.ManagerHttpApi i.h.s.m.ManagerHttpApi$$anonfun$1.applyOrElse.74 Request error: POST unix://localhost:80/containers/create?name=s0modelkek: 409, body: {"message":"Conflict. The container name \"/s0modelkek\" is already in use by container \"0905c30d604b1a869ba26404758bedbc121bb8bee2c1823edabe0c591b9270d3\". You have to remove (or rename) that container to be able to reuse that name."}

com.spotify.docker.client.exceptions.DockerRequestException: Request error: POST unix://localhost:80/containers/create?name=s0modelkek: 409, body: {"message":"Conflict. The container name \"/s0modelkek\" is already in use by container \"0905c30d604b1a869ba26404758bedbc121bb8bee2c1823edabe0c591b9270d3\". You have to remove (or rename) that container to be able to reuse that name."}

    at com.spotify.docker.client.DefaultDockerClient.propagate(DefaultDockerClient.java:2503) ~[docker-client-8.8.0.jar:8.8.0]
    at com.spotify.docker.client.DefaultDockerClient.request(DefaultDockerClient.java:2453) ~[docker-client-8.8.0.jar:8.8.0]
    at com.spotify.docker.client.DefaultDockerClient.createContainer(DefaultDockerClient.java:638) ~[docker-client-8.8.0.jar:8.8.0]
    at io.hydrosphere.serving.manager.service.clouddriver.LocalCloudDriverService.io$hydrosphere$serving$manager$service$clouddriver$LocalCloudDriverService$$startModel(LocalCloudDriverService.scala:47) ~[classes/:?]
    at io.hydrosphere.serving.manager.service.clouddriver.LocalCloudDriverService$$anonfun$deployService$1$$anonfun$3.apply(LocalCloudDriverService.scala:74) ~[classes/:?]
    at io.hydrosphere.serving.manager.service.clouddriver.LocalCloudDriverService$$anonfun$deployService$1$$anonfun$3.apply(LocalCloudDriverService.scala:74) ~[classes/:?]
    at scala.Option.map(Option.scala:146) ~[scala-library-2.11.11.jar:?]
    at io.hydrosphere.serving.manager.service.clouddriver.LocalCloudDriverService$$anonfun$deployService$1.apply(LocalCloudDriverService.scala:74) ~[classes/:?]
    at io.hydrosphere.serving.manager.service.clouddriver.LocalCloudDriverService$$anonfun$deployService$1.apply(LocalCloudDriverService.scala:72) ~[classes/:?]
    at scala.concurrent.impl.Future$PromiseCompletingRunnable.liftedTree1$1(Future.scala:24) ~[scala-library-2.11.11.jar:?]
    at scala.concurrent.impl.Future$PromiseCompletingRunnable.run$$$capture(Future.scala:24) ~[scala-library-2.11.11.jar:?]
    at scala.concurrent.impl.Future$PromiseCompletingRunnable.run(Future.scala) ~[scala-library-2.11.11.jar:?]
    at akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:40) [akka-actor_2.11-2.5.8.jar:?]
    at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(ForkJoinExecutorConfigurator.scala:43) [akka-actor_2.11-2.5.8.jar:?]
    at akka.dispatch.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) [akka-actor_2.11-2.5.8.jar:?]
    at akka.dispatch.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339) [akka-actor_2.11-2.5.8.jar:?]
    at akka.dispatch.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) [akka-actor_2.11-2.5.8.jar:?]
    at akka.dispatch.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107) [akka-actor_2.11-2.5.8.jar:?]
Caused by: javax.ws.rs.ClientErrorException: HTTP 409 Conflict
    at org.glassfish.jersey.client.JerseyInvocation.createExceptionForFamily(JerseyInvocation.java:1044) ~[jersey-client-2.22.2.jar:?]
    at org.glassfish.jersey.client.JerseyInvocation.convertToException(JerseyInvocation.java:1027) ~[jersey-client-2.22.2.jar:?]
    at org.glassfish.jersey.client.JerseyInvocation.translate(JerseyInvocation.java:816) ~[jersey-client-2.22.2.jar:?]
    at org.glassfish.jersey.client.JerseyInvocation.access$700(JerseyInvocation.java:92) ~[jersey-client-2.22.2.jar:?]
    at org.glassfish.jersey.client.JerseyInvocation$5.completed(JerseyInvocation.java:773) ~[jersey-client-2.22.2.jar:?]
    at org.glassfish.jersey.client.ClientRuntime.processResponse(ClientRuntime.java:198) ~[jersey-client-2.22.2.jar:?]
    at org.glassfish.jersey.client.ClientRuntime.access$300(ClientRuntime.java:79) ~[jersey-client-2.22.2.jar:?]
    at org.glassfish.jersey.client.ClientRuntime$2.run(ClientRuntime.java:180) ~[jersey-client-2.22.2.jar:?]
    at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) ~[jersey-common-2.22.2.jar:?]
    at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) ~[jersey-common-2.22.2.jar:?]
    at org.glassfish.jersey.internal.Errors.process(Errors.java:315) ~[jersey-common-2.22.2.jar:?]
    at org.glassfish.jersey.internal.Errors.process(Errors.java:297) ~[jersey-common-2.22.2.jar:?]
    at org.glassfish.jersey.internal.Errors.process(Errors.java:267) ~[jersey-common-2.22.2.jar:?]
    at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:340) ~[jersey-common-2.22.2.jar:?]
    at org.glassfish.jersey.client.ClientRuntime$3.run(ClientRuntime.java:210) ~[jersey-client-2.22.2.jar:?]
    at java.util.concurrent.Executors$RunnableAdapter.call$$$capture(Executors.java:511) ~[?:1.8.0_131]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java) ~[?:1.8.0_131]
    at java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:266) ~[?:1.8.0_131]
    at java.util.concurrent.FutureTask.run(FutureTask.java) ~[?:1.8.0_131]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[?:1.8.0_131]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[?:1.8.0_131]
    at java.lang.Thread.run(Thread.java:748) ~[?:1.8.0_131]
KineticCookie commented 6 years ago

Fixed in #81