dotmesh-io / dotmesh

dotmesh (dm) is like git for your data volumes (databases, files etc) in Docker and Kubernetes
https://dotmesh.com
Apache License 2.0
539 stars 29 forks source link

[INTERRUPTION 0.5d] After pushing to another node, namespace is gone #641

Closed rusenask closed 5 years ago

rusenask commented 5 years ago

It seems like in the tests after pushing to remote:

        citools.RunOnNode(t, aliceNode.Container, citools.DockerRun("apples")+" touch /foo/alice")
        citools.RunOnNode(t, aliceNode.Container, "dm switch apples")
        citools.RunOnNode(t, aliceNode.Container, "dm commit -m'Alice commits'")
        citools.RunOnNode(t, aliceNode.Container, "dm push cluster_0 apples --remote-name alice/apples")

        citools.RunOnNode(t, bobNode.Container, citools.DockerRun("apples")+" touch /foo/bob")
        citools.RunOnNode(t, bobNode.Container, "dm switch apples")
        citools.RunOnNode(t, bobNode.Container, "dm commit -m'Bob commits'")
        citools.RunOnNode(t, bobNode.Container, "dm push cluster_0 apples --remote-name bob/apples")

Namespace is removed.

dm list output on nodes:

➜  dotmesh git:(test-failures) ✗ ./scripts/dex 0 0
root@cluster-20236966069537980-0-node-0:/# dm list                                                                                                                                                                                                                                    
Current remote: local (use 'dm remote -v' to list and 'dm remote switch' to switch)

  DOT           BRANCH  SERVER           CONTAINERS  SIZE       COMMITS  DIRTY
  alice/apples  master  298aec48b752bb2              25.00 kiB  1        -  
  bob/apples    master  298aec48b752bb2              38.00 kiB  2        -  
root@cluster-20236966069537980-0-node-0:/# exit
➜  dotmesh git:(test-failures) ✗ ./scripts/dex 2 0
root@cluster-20236966069537980-2-node-0:/# dm list                                                                                                                                                                                                                                    
Current remote: local (use 'dm remote -v' to list and 'dm remote switch' to switch)

  DOT                 BRANCH  SERVER            CONTAINERS  SIZE       COMMITS  DIRTY
  admin/alice-apples  master  7111ccb66e301f95              25.00 kiB  1        -  
* admin/apples        master  7111ccb66e301f95              38.00 kiB  2        -  
root@cluster-20236966069537980-2-node-0:/# exit
➜  dotmesh git:(test-failures) ✗ ./scripts/dex 1 0
root@cluster-20236966069537980-1-node-0:/# dm list                                                                                                                                                                                                                                    
Current remote: local (use 'dm remote -v' to list and 'dm remote switch' to switch)

  DOT               BRANCH  SERVER            CONTAINERS  SIZE       COMMITS  DIRTY
* admin/apples      master  99fd6b689d581b35              25.00 kiB  1        -  
  admin/bob-apples  master  99fd6b689d581b35              38.00 kiB  2        -  
alaric-dotmesh commented 5 years ago

Issue was due to refactoring of types, we were accidentally using the server's String() method on VolumeName that always gives the namespace; there's a StringWithoutAdmin() method for use in the UI.

alaric-dotmesh commented 5 years ago

That change seemed to fix it.