ContainerSolutions / minimesos

The experimentation and testing tool for Apache Mesos - NO LONGER MAINTANED!
https://www.minimesos.org
Apache License 2.0
429 stars 61 forks source link

`minimesos up` crashes when local docker contains image with no tags. #502

Closed maasg closed 7 years ago

maasg commented 7 years ago

The minimesos up command will fail with the following exception when the local docker registry contains images with no tags (denoted as "" on the docker cli)

Exception:

java.lang.NullPointerException: null
    at com.containersol.minimesos.container.AbstractContainer.imageExists(AbstractContainer.java:223) ~[minimesos-cli.jar:0.10.2]
    at com.containersol.minimesos.container.AbstractContainer.pullImage(AbstractContainer.java:234) ~[minimesos-cli.jar:0.10.2]
    at com.containersol.minimesos.container.AbstractContainer.pullImage(AbstractContainer.java:57) ~[minimesos-cli.jar:0.10.2]
    at com.containersol.minimesos.container.AbstractContainer.start(AbstractContainer.java:88) ~[minimesos-cli.jar:0.10.2]
    at com.containersol.minimesos.cluster.MesosCluster.lambda$start$0(MesosCluster.java:131) ~[minimesos-cli.jar:0.10.2]
    at java.util.ArrayList.forEach(ArrayList.java:1249) ~[na:1.8.0_92-internal]
    at com.containersol.minimesos.cluster.MesosCluster.start(MesosCluster.java:131) ~[minimesos-cli.jar:0.10.2]
    at com.containersol.minimesos.cluster.MesosCluster.start(MesosCluster.java:117) ~[minimesos-cli.jar:0.10.2]
    at com.containersol.minimesos.main.CommandUp.execute(CommandUp.java:85) ~[minimesos-cli.jar:0.10.2]
    at com.containersol.minimesos.main.Main.run(Main.java:107) [minimesos-cli.jar:0.10.2]
    at com.containersol.minimesos.main.Main.main(Main.java:59) [minimesos-cli.jar:0.10.2]

Example docker images listing that causes the failure:

localhost:5000/newbum                            <none>              d09fd2058cb2        40 hours ago        849.8 MB
<none>                                           <none>              54c34e2e4396        41 hours ago        849.9 MB

Suspected cause in the code:

com.containersol.minimesos.container.AbstractContainer#223
  for (String repoTag : image.getRepoTags()) {
adam-sandor commented 7 years ago

Thanks for the report @maasg ! We'll fix this asap, looks like an easy one.

frankscholten commented 7 years ago

Thanks for reporting @maasg!

radek1st commented 7 years ago

I've just installed the latest version (0.13.0) and getting the exact same problem:

$ minimesos up # Created minimesos directory at /Users/radek/Downloads/minimesos-0.13.0/bin/.minimesos. Failed to run command 'up'. null

@maasg did the fix work for you? :D

jensendw commented 6 years ago

@radek1st I just had the same issue, and resolved it by removing any images locally that didn't have a tag.