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
538 stars 29 forks source link

registry reset functionality #619

Closed rusenask closed 5 years ago

rusenask commented 5 years ago

currently there's a:


        // From time to time, the entire registry will be deleted (see rpc.go
        // RestoreEtcd). Detect this case and wipe out the registry records as
        // commonly dots will be re-owned in this scenario.

        if node.Node.Key == fmt.Sprintf("%s/registry", ETCD_PREFIX) {
            s.resetRegistry()
            return fmt.Errorf(
                "intentionally reloading from etcd because " +
                    "we noticed the registry disappear.",
            )
        }

in the etcd watcher. That RPC should have a better way of telling the remaining cluster nodes to reset their registries. If this is still in use, let's change it to a NATS message, if not, don't reimplement it.

lukemarsden commented 5 years ago

this is how dm cluster restore-etcd works, so yea, still in use...

rusenask commented 5 years ago

this is done, reset is performed via nats message